Kernel compilation error recipe for target 'deb-pkg' failed












5















I am compiling the latest kernel cloned from Linus's git repository for a challenge. Here are the steps I followed,

1. Installed cross compilation tools



sudo apt-get install git build-essential kernel-package fakeroot libncurses5-dev  


2. cloned the latest git repository



$ git clone https://github.com/torvalds/linux.git  


3. Copied the current build configuration to the root of the source tree and updated the configuration file.



yes '' | make oldconfig  


4. make clean

5. Made the linux image and header .deb files



make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-custom  


After a few minutes of compilation, it shows the error



dpkg-genchanges: warning: package linux-firmware-image-4.2.0-rc3-custom listed in files list but not in control info
dpkg-genchanges: warning: package linux-headers-4.2.0-rc3-custom listed in files list but not in control info
dpkg-genchanges: warning: package linux-headers-4.3.0-rc1-eudyptula listed in files list but not in control info
dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom-dbg listed in files list but not in control info
dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula listed in files list but not in control info
dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom listed in files list but not in control info
dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula-dbg listed in files list but not in control info
dpkg-genchanges: warning: package linux-firmware-image-4.3.0-rc1-eudyptula listed in files list but not in control info
dpkg-genchanges: error: package linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list
scripts/package/Makefile:91: recipe for target 'deb-pkg' failed
make[1]: *** [deb-pkg] Error 255
Makefile:1226: recipe for target 'deb-pkg' failed
make: *** [deb-pkg] Error 2


I think the error has occurred in the making of .deb package. I really don't understand the error message



 linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list  


What does it really means?. Please help!










share|improve this question



























    5















    I am compiling the latest kernel cloned from Linus's git repository for a challenge. Here are the steps I followed,

    1. Installed cross compilation tools



    sudo apt-get install git build-essential kernel-package fakeroot libncurses5-dev  


    2. cloned the latest git repository



    $ git clone https://github.com/torvalds/linux.git  


    3. Copied the current build configuration to the root of the source tree and updated the configuration file.



    yes '' | make oldconfig  


    4. make clean

    5. Made the linux image and header .deb files



    make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-custom  


    After a few minutes of compilation, it shows the error



    dpkg-genchanges: warning: package linux-firmware-image-4.2.0-rc3-custom listed in files list but not in control info
    dpkg-genchanges: warning: package linux-headers-4.2.0-rc3-custom listed in files list but not in control info
    dpkg-genchanges: warning: package linux-headers-4.3.0-rc1-eudyptula listed in files list but not in control info
    dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom-dbg listed in files list but not in control info
    dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula listed in files list but not in control info
    dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom listed in files list but not in control info
    dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula-dbg listed in files list but not in control info
    dpkg-genchanges: warning: package linux-firmware-image-4.3.0-rc1-eudyptula listed in files list but not in control info
    dpkg-genchanges: error: package linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list
    scripts/package/Makefile:91: recipe for target 'deb-pkg' failed
    make[1]: *** [deb-pkg] Error 255
    Makefile:1226: recipe for target 'deb-pkg' failed
    make: *** [deb-pkg] Error 2


    I think the error has occurred in the making of .deb package. I really don't understand the error message



     linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list  


    What does it really means?. Please help!










    share|improve this question

























      5












      5








      5








      I am compiling the latest kernel cloned from Linus's git repository for a challenge. Here are the steps I followed,

      1. Installed cross compilation tools



      sudo apt-get install git build-essential kernel-package fakeroot libncurses5-dev  


      2. cloned the latest git repository



      $ git clone https://github.com/torvalds/linux.git  


      3. Copied the current build configuration to the root of the source tree and updated the configuration file.



      yes '' | make oldconfig  


      4. make clean

      5. Made the linux image and header .deb files



      make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-custom  


      After a few minutes of compilation, it shows the error



      dpkg-genchanges: warning: package linux-firmware-image-4.2.0-rc3-custom listed in files list but not in control info
      dpkg-genchanges: warning: package linux-headers-4.2.0-rc3-custom listed in files list but not in control info
      dpkg-genchanges: warning: package linux-headers-4.3.0-rc1-eudyptula listed in files list but not in control info
      dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom-dbg listed in files list but not in control info
      dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula listed in files list but not in control info
      dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom listed in files list but not in control info
      dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula-dbg listed in files list but not in control info
      dpkg-genchanges: warning: package linux-firmware-image-4.3.0-rc1-eudyptula listed in files list but not in control info
      dpkg-genchanges: error: package linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list
      scripts/package/Makefile:91: recipe for target 'deb-pkg' failed
      make[1]: *** [deb-pkg] Error 255
      Makefile:1226: recipe for target 'deb-pkg' failed
      make: *** [deb-pkg] Error 2


      I think the error has occurred in the making of .deb package. I really don't understand the error message



       linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list  


      What does it really means?. Please help!










      share|improve this question














      I am compiling the latest kernel cloned from Linus's git repository for a challenge. Here are the steps I followed,

      1. Installed cross compilation tools



      sudo apt-get install git build-essential kernel-package fakeroot libncurses5-dev  


      2. cloned the latest git repository



      $ git clone https://github.com/torvalds/linux.git  


      3. Copied the current build configuration to the root of the source tree and updated the configuration file.



      yes '' | make oldconfig  


      4. make clean

      5. Made the linux image and header .deb files



      make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-custom  


      After a few minutes of compilation, it shows the error



      dpkg-genchanges: warning: package linux-firmware-image-4.2.0-rc3-custom listed in files list but not in control info
      dpkg-genchanges: warning: package linux-headers-4.2.0-rc3-custom listed in files list but not in control info
      dpkg-genchanges: warning: package linux-headers-4.3.0-rc1-eudyptula listed in files list but not in control info
      dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom-dbg listed in files list but not in control info
      dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula listed in files list but not in control info
      dpkg-genchanges: warning: package linux-image-4.2.0-rc3-custom listed in files list but not in control info
      dpkg-genchanges: warning: package linux-image-4.3.0-rc1-eudyptula-dbg listed in files list but not in control info
      dpkg-genchanges: warning: package linux-firmware-image-4.3.0-rc1-eudyptula listed in files list but not in control info
      dpkg-genchanges: error: package linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list
      scripts/package/Makefile:91: recipe for target 'deb-pkg' failed
      make[1]: *** [deb-pkg] Error 255
      Makefile:1226: recipe for target 'deb-pkg' failed
      make: *** [deb-pkg] Error 2


      I think the error has occurred in the making of .deb package. I really don't understand the error message



       linux-image-4.2.0-rc3-custom-dbg has section kernel in control file but debug in files list  


      What does it really means?. Please help!







      debian linux-kernel compiling






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 7 '15 at 11:56









      ebinebin

      4329




      4329






















          2 Answers
          2






          active

          oldest

          votes


















          5














          First, the yes '' | make oldconfig step is more easily done by way of make olddefconfig (not make defconfig, as that ignores existing .config).



          Having said that,



          What happens is that the kernel's Makefile generates a number of files inside a debian/ directory which are not completely following the spec. Combined with a gradual stricter enforcement of this spec in the build tools over the years, means that a hack which used to work in the past (generating .deb packages which aren't listed in debian/control, or which are listed but whose details differ) don't work anymore these days.



          Personally, I recommend against the make deb-pkg method of building a Debian package of a vanilla kernel. If you want to do that, a method which works better IME is to use the kernel-package package which is part of Debian proper:



          apt install kernel-package fakeroot
          cd /path/to/git/checkout
          make defconfig
          make-kpkg --rootcmd fakeroot kernel_image


          This should get you a package (with the .config file you created) that you can install on your Debian system.






          share|improve this answer


























          • "make-kpkg --rootcmd fakeroot make-kpkg kernel_image" shows error "Error: Unknown target make-kpkg use --targets to display help on valid targets". So I used "fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers". Now it's compiled succesfully. I installed all the generated deb packages using "dpkg -i *.deb" but the new kernel is not booting up !

            – ebin
            Oct 7 '15 at 18:04













          • That probably means you need to switch some .config options; Debian assumes a few things, some of which may not be part of the default configuration. This is a different problem, however, so I would suggest you ask a new question about that (and that you add some details about the failure to boot...)

            – Wouter Verhelst
            Oct 8 '15 at 12:47











          • Updated to remove my mistake...

            – Wouter Verhelst
            Oct 19 '15 at 6:06











          • @WouterVerheist Can you answer this question ? unix.stackexchange.com/questions/238469/…

            – ebin
            Nov 4 '15 at 16:11





















          0














          I was seeing the same problem as you, and solved it by cherry-picking this patch into my tree:



          It looks like it could also be solved by doing



          rm -f debian/files





          share|improve this answer


























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f234507%2fkernel-compilation-error-recipe-for-target-deb-pkg-failed%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            First, the yes '' | make oldconfig step is more easily done by way of make olddefconfig (not make defconfig, as that ignores existing .config).



            Having said that,



            What happens is that the kernel's Makefile generates a number of files inside a debian/ directory which are not completely following the spec. Combined with a gradual stricter enforcement of this spec in the build tools over the years, means that a hack which used to work in the past (generating .deb packages which aren't listed in debian/control, or which are listed but whose details differ) don't work anymore these days.



            Personally, I recommend against the make deb-pkg method of building a Debian package of a vanilla kernel. If you want to do that, a method which works better IME is to use the kernel-package package which is part of Debian proper:



            apt install kernel-package fakeroot
            cd /path/to/git/checkout
            make defconfig
            make-kpkg --rootcmd fakeroot kernel_image


            This should get you a package (with the .config file you created) that you can install on your Debian system.






            share|improve this answer


























            • "make-kpkg --rootcmd fakeroot make-kpkg kernel_image" shows error "Error: Unknown target make-kpkg use --targets to display help on valid targets". So I used "fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers". Now it's compiled succesfully. I installed all the generated deb packages using "dpkg -i *.deb" but the new kernel is not booting up !

              – ebin
              Oct 7 '15 at 18:04













            • That probably means you need to switch some .config options; Debian assumes a few things, some of which may not be part of the default configuration. This is a different problem, however, so I would suggest you ask a new question about that (and that you add some details about the failure to boot...)

              – Wouter Verhelst
              Oct 8 '15 at 12:47











            • Updated to remove my mistake...

              – Wouter Verhelst
              Oct 19 '15 at 6:06











            • @WouterVerheist Can you answer this question ? unix.stackexchange.com/questions/238469/…

              – ebin
              Nov 4 '15 at 16:11


















            5














            First, the yes '' | make oldconfig step is more easily done by way of make olddefconfig (not make defconfig, as that ignores existing .config).



            Having said that,



            What happens is that the kernel's Makefile generates a number of files inside a debian/ directory which are not completely following the spec. Combined with a gradual stricter enforcement of this spec in the build tools over the years, means that a hack which used to work in the past (generating .deb packages which aren't listed in debian/control, or which are listed but whose details differ) don't work anymore these days.



            Personally, I recommend against the make deb-pkg method of building a Debian package of a vanilla kernel. If you want to do that, a method which works better IME is to use the kernel-package package which is part of Debian proper:



            apt install kernel-package fakeroot
            cd /path/to/git/checkout
            make defconfig
            make-kpkg --rootcmd fakeroot kernel_image


            This should get you a package (with the .config file you created) that you can install on your Debian system.






            share|improve this answer


























            • "make-kpkg --rootcmd fakeroot make-kpkg kernel_image" shows error "Error: Unknown target make-kpkg use --targets to display help on valid targets". So I used "fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers". Now it's compiled succesfully. I installed all the generated deb packages using "dpkg -i *.deb" but the new kernel is not booting up !

              – ebin
              Oct 7 '15 at 18:04













            • That probably means you need to switch some .config options; Debian assumes a few things, some of which may not be part of the default configuration. This is a different problem, however, so I would suggest you ask a new question about that (and that you add some details about the failure to boot...)

              – Wouter Verhelst
              Oct 8 '15 at 12:47











            • Updated to remove my mistake...

              – Wouter Verhelst
              Oct 19 '15 at 6:06











            • @WouterVerheist Can you answer this question ? unix.stackexchange.com/questions/238469/…

              – ebin
              Nov 4 '15 at 16:11
















            5












            5








            5







            First, the yes '' | make oldconfig step is more easily done by way of make olddefconfig (not make defconfig, as that ignores existing .config).



            Having said that,



            What happens is that the kernel's Makefile generates a number of files inside a debian/ directory which are not completely following the spec. Combined with a gradual stricter enforcement of this spec in the build tools over the years, means that a hack which used to work in the past (generating .deb packages which aren't listed in debian/control, or which are listed but whose details differ) don't work anymore these days.



            Personally, I recommend against the make deb-pkg method of building a Debian package of a vanilla kernel. If you want to do that, a method which works better IME is to use the kernel-package package which is part of Debian proper:



            apt install kernel-package fakeroot
            cd /path/to/git/checkout
            make defconfig
            make-kpkg --rootcmd fakeroot kernel_image


            This should get you a package (with the .config file you created) that you can install on your Debian system.






            share|improve this answer















            First, the yes '' | make oldconfig step is more easily done by way of make olddefconfig (not make defconfig, as that ignores existing .config).



            Having said that,



            What happens is that the kernel's Makefile generates a number of files inside a debian/ directory which are not completely following the spec. Combined with a gradual stricter enforcement of this spec in the build tools over the years, means that a hack which used to work in the past (generating .deb packages which aren't listed in debian/control, or which are listed but whose details differ) don't work anymore these days.



            Personally, I recommend against the make deb-pkg method of building a Debian package of a vanilla kernel. If you want to do that, a method which works better IME is to use the kernel-package package which is part of Debian proper:



            apt install kernel-package fakeroot
            cd /path/to/git/checkout
            make defconfig
            make-kpkg --rootcmd fakeroot kernel_image


            This should get you a package (with the .config file you created) that you can install on your Debian system.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 3 mins ago









            ajfabbri

            31




            31










            answered Oct 7 '15 at 12:48









            Wouter VerhelstWouter Verhelst

            7,569935




            7,569935













            • "make-kpkg --rootcmd fakeroot make-kpkg kernel_image" shows error "Error: Unknown target make-kpkg use --targets to display help on valid targets". So I used "fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers". Now it's compiled succesfully. I installed all the generated deb packages using "dpkg -i *.deb" but the new kernel is not booting up !

              – ebin
              Oct 7 '15 at 18:04













            • That probably means you need to switch some .config options; Debian assumes a few things, some of which may not be part of the default configuration. This is a different problem, however, so I would suggest you ask a new question about that (and that you add some details about the failure to boot...)

              – Wouter Verhelst
              Oct 8 '15 at 12:47











            • Updated to remove my mistake...

              – Wouter Verhelst
              Oct 19 '15 at 6:06











            • @WouterVerheist Can you answer this question ? unix.stackexchange.com/questions/238469/…

              – ebin
              Nov 4 '15 at 16:11





















            • "make-kpkg --rootcmd fakeroot make-kpkg kernel_image" shows error "Error: Unknown target make-kpkg use --targets to display help on valid targets". So I used "fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers". Now it's compiled succesfully. I installed all the generated deb packages using "dpkg -i *.deb" but the new kernel is not booting up !

              – ebin
              Oct 7 '15 at 18:04













            • That probably means you need to switch some .config options; Debian assumes a few things, some of which may not be part of the default configuration. This is a different problem, however, so I would suggest you ask a new question about that (and that you add some details about the failure to boot...)

              – Wouter Verhelst
              Oct 8 '15 at 12:47











            • Updated to remove my mistake...

              – Wouter Verhelst
              Oct 19 '15 at 6:06











            • @WouterVerheist Can you answer this question ? unix.stackexchange.com/questions/238469/…

              – ebin
              Nov 4 '15 at 16:11



















            "make-kpkg --rootcmd fakeroot make-kpkg kernel_image" shows error "Error: Unknown target make-kpkg use --targets to display help on valid targets". So I used "fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers". Now it's compiled succesfully. I installed all the generated deb packages using "dpkg -i *.deb" but the new kernel is not booting up !

            – ebin
            Oct 7 '15 at 18:04







            "make-kpkg --rootcmd fakeroot make-kpkg kernel_image" shows error "Error: Unknown target make-kpkg use --targets to display help on valid targets". So I used "fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers". Now it's compiled succesfully. I installed all the generated deb packages using "dpkg -i *.deb" but the new kernel is not booting up !

            – ebin
            Oct 7 '15 at 18:04















            That probably means you need to switch some .config options; Debian assumes a few things, some of which may not be part of the default configuration. This is a different problem, however, so I would suggest you ask a new question about that (and that you add some details about the failure to boot...)

            – Wouter Verhelst
            Oct 8 '15 at 12:47





            That probably means you need to switch some .config options; Debian assumes a few things, some of which may not be part of the default configuration. This is a different problem, however, so I would suggest you ask a new question about that (and that you add some details about the failure to boot...)

            – Wouter Verhelst
            Oct 8 '15 at 12:47













            Updated to remove my mistake...

            – Wouter Verhelst
            Oct 19 '15 at 6:06





            Updated to remove my mistake...

            – Wouter Verhelst
            Oct 19 '15 at 6:06













            @WouterVerheist Can you answer this question ? unix.stackexchange.com/questions/238469/…

            – ebin
            Nov 4 '15 at 16:11







            @WouterVerheist Can you answer this question ? unix.stackexchange.com/questions/238469/…

            – ebin
            Nov 4 '15 at 16:11















            0














            I was seeing the same problem as you, and solved it by cherry-picking this patch into my tree:



            It looks like it could also be solved by doing



            rm -f debian/files





            share|improve this answer






























              0














              I was seeing the same problem as you, and solved it by cherry-picking this patch into my tree:



              It looks like it could also be solved by doing



              rm -f debian/files





              share|improve this answer




























                0












                0








                0







                I was seeing the same problem as you, and solved it by cherry-picking this patch into my tree:



                It looks like it could also be solved by doing



                rm -f debian/files





                share|improve this answer















                I was seeing the same problem as you, and solved it by cherry-picking this patch into my tree:



                It looks like it could also be solved by doing



                rm -f debian/files






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 24 '15 at 13:23

























                answered Nov 24 '15 at 13:16









                ndyerndyer

                1013




                1013






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f234507%2fkernel-compilation-error-recipe-for-target-deb-pkg-failed%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    CARDNET

                    Boot-repair Failure: Unable to locate package grub-common:i386

                    濃尾地震