Error when compiling the Linux Kernel version 4.14.51

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












Not sure what happened here. I'm trying to upgrade my Linux kernel from 4.9.x to 4.14.x and the below happened:



In file included from arch/x86/decode.c:26:0:
arch/x86/../../elf.h:22:18: fatal error: gelf.h: No such file or directory
#include <gelf.h>
^
compilation terminated.
mv: cannot stat ‘/usr/src/linux-4.14.51/tools/objtool/arch/x86/.decode.o.tmp’: No such file or directory
make[4]: *** [/usr/src/linux-4.14.51/tools/objtool/arch/x86/decode.o] Error 1
make[3]: *** [arch/x86] Error 2
make[2]: *** [/usr/src/linux-4.14.51/tools/objtool/objtool-in.o] Error 2
make[1]: *** [objtool] Error 2
make: *** [tools/objtool] Error 2


Any ideas what happened here (other than the obvious)? Should "gelf.h" already be on my computer? Or in the kernel tarball?



I downloaded vanilla 4.14.51 from kernel.org - I've compiled my own (unmodified) vanilla kernel successfully, repeatedly, for 14 years now, but this is new.



My PC is a Dell laptop with Core2 i5 (64-bit) with Slackware 14.1 -- I upgraded the stock 3.17.x with 4.4.x several years ago, and more recently to 4.9.x (currently 4.9.109).



I do have libelf installed:



me@mylaptop:~$ locate gelf.h
/usr/include/libelf/gelf.h

me@mylaptop:~$ ls /var/log/packages/*elf*
/var/log/packages/libelf-0.8.13-x86_64-2


ADDENDUM



When trying 4.14.55 last night, I noted that the directory in which the kernel build script expects to see "gelf.h" is in the kernel source tree, not the regular /usr/include.



That being said, the corresponding directory in my (running) 4.9.x source tree does not have any .o nor .ko files. Obviously there's a config item enabled in 4.14.x that I don't have enabled in 4.9.x.



I've tried configuring 4.14.x as close to my working 4.9.x as possible; I am aware of some new options, but generally I try to keep the configurations the same between intermediate kernel versions.



That being said, I don't know what config option it is that would want to see the header files in linux-4.14.*/tools/objtool/arch/x86/... Any ideas?







share|improve this question





















  • Perhaps check that the location of gelf.h is in the #include path, and that the user running make has access rights to it (and the folder)? stackoverflow.com/questions/7834152/…
    – Time4Tea
    Jun 21 at 19:14











  • My copy of gelf.h is in /usr/include and it is from the (Centos 7) package elfutils-libelf-devel.
    – Chuck E
    Jun 26 at 21:44














up vote
1
down vote

favorite
1












Not sure what happened here. I'm trying to upgrade my Linux kernel from 4.9.x to 4.14.x and the below happened:



In file included from arch/x86/decode.c:26:0:
arch/x86/../../elf.h:22:18: fatal error: gelf.h: No such file or directory
#include <gelf.h>
^
compilation terminated.
mv: cannot stat ‘/usr/src/linux-4.14.51/tools/objtool/arch/x86/.decode.o.tmp’: No such file or directory
make[4]: *** [/usr/src/linux-4.14.51/tools/objtool/arch/x86/decode.o] Error 1
make[3]: *** [arch/x86] Error 2
make[2]: *** [/usr/src/linux-4.14.51/tools/objtool/objtool-in.o] Error 2
make[1]: *** [objtool] Error 2
make: *** [tools/objtool] Error 2


Any ideas what happened here (other than the obvious)? Should "gelf.h" already be on my computer? Or in the kernel tarball?



I downloaded vanilla 4.14.51 from kernel.org - I've compiled my own (unmodified) vanilla kernel successfully, repeatedly, for 14 years now, but this is new.



My PC is a Dell laptop with Core2 i5 (64-bit) with Slackware 14.1 -- I upgraded the stock 3.17.x with 4.4.x several years ago, and more recently to 4.9.x (currently 4.9.109).



I do have libelf installed:



me@mylaptop:~$ locate gelf.h
/usr/include/libelf/gelf.h

me@mylaptop:~$ ls /var/log/packages/*elf*
/var/log/packages/libelf-0.8.13-x86_64-2


ADDENDUM



When trying 4.14.55 last night, I noted that the directory in which the kernel build script expects to see "gelf.h" is in the kernel source tree, not the regular /usr/include.



That being said, the corresponding directory in my (running) 4.9.x source tree does not have any .o nor .ko files. Obviously there's a config item enabled in 4.14.x that I don't have enabled in 4.9.x.



I've tried configuring 4.14.x as close to my working 4.9.x as possible; I am aware of some new options, but generally I try to keep the configurations the same between intermediate kernel versions.



That being said, I don't know what config option it is that would want to see the header files in linux-4.14.*/tools/objtool/arch/x86/... Any ideas?







share|improve this question





















  • Perhaps check that the location of gelf.h is in the #include path, and that the user running make has access rights to it (and the folder)? stackoverflow.com/questions/7834152/…
    – Time4Tea
    Jun 21 at 19:14











  • My copy of gelf.h is in /usr/include and it is from the (Centos 7) package elfutils-libelf-devel.
    – Chuck E
    Jun 26 at 21:44












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





Not sure what happened here. I'm trying to upgrade my Linux kernel from 4.9.x to 4.14.x and the below happened:



In file included from arch/x86/decode.c:26:0:
arch/x86/../../elf.h:22:18: fatal error: gelf.h: No such file or directory
#include <gelf.h>
^
compilation terminated.
mv: cannot stat ‘/usr/src/linux-4.14.51/tools/objtool/arch/x86/.decode.o.tmp’: No such file or directory
make[4]: *** [/usr/src/linux-4.14.51/tools/objtool/arch/x86/decode.o] Error 1
make[3]: *** [arch/x86] Error 2
make[2]: *** [/usr/src/linux-4.14.51/tools/objtool/objtool-in.o] Error 2
make[1]: *** [objtool] Error 2
make: *** [tools/objtool] Error 2


Any ideas what happened here (other than the obvious)? Should "gelf.h" already be on my computer? Or in the kernel tarball?



I downloaded vanilla 4.14.51 from kernel.org - I've compiled my own (unmodified) vanilla kernel successfully, repeatedly, for 14 years now, but this is new.



My PC is a Dell laptop with Core2 i5 (64-bit) with Slackware 14.1 -- I upgraded the stock 3.17.x with 4.4.x several years ago, and more recently to 4.9.x (currently 4.9.109).



I do have libelf installed:



me@mylaptop:~$ locate gelf.h
/usr/include/libelf/gelf.h

me@mylaptop:~$ ls /var/log/packages/*elf*
/var/log/packages/libelf-0.8.13-x86_64-2


ADDENDUM



When trying 4.14.55 last night, I noted that the directory in which the kernel build script expects to see "gelf.h" is in the kernel source tree, not the regular /usr/include.



That being said, the corresponding directory in my (running) 4.9.x source tree does not have any .o nor .ko files. Obviously there's a config item enabled in 4.14.x that I don't have enabled in 4.9.x.



I've tried configuring 4.14.x as close to my working 4.9.x as possible; I am aware of some new options, but generally I try to keep the configurations the same between intermediate kernel versions.



That being said, I don't know what config option it is that would want to see the header files in linux-4.14.*/tools/objtool/arch/x86/... Any ideas?







share|improve this question













Not sure what happened here. I'm trying to upgrade my Linux kernel from 4.9.x to 4.14.x and the below happened:



In file included from arch/x86/decode.c:26:0:
arch/x86/../../elf.h:22:18: fatal error: gelf.h: No such file or directory
#include <gelf.h>
^
compilation terminated.
mv: cannot stat ‘/usr/src/linux-4.14.51/tools/objtool/arch/x86/.decode.o.tmp’: No such file or directory
make[4]: *** [/usr/src/linux-4.14.51/tools/objtool/arch/x86/decode.o] Error 1
make[3]: *** [arch/x86] Error 2
make[2]: *** [/usr/src/linux-4.14.51/tools/objtool/objtool-in.o] Error 2
make[1]: *** [objtool] Error 2
make: *** [tools/objtool] Error 2


Any ideas what happened here (other than the obvious)? Should "gelf.h" already be on my computer? Or in the kernel tarball?



I downloaded vanilla 4.14.51 from kernel.org - I've compiled my own (unmodified) vanilla kernel successfully, repeatedly, for 14 years now, but this is new.



My PC is a Dell laptop with Core2 i5 (64-bit) with Slackware 14.1 -- I upgraded the stock 3.17.x with 4.4.x several years ago, and more recently to 4.9.x (currently 4.9.109).



I do have libelf installed:



me@mylaptop:~$ locate gelf.h
/usr/include/libelf/gelf.h

me@mylaptop:~$ ls /var/log/packages/*elf*
/var/log/packages/libelf-0.8.13-x86_64-2


ADDENDUM



When trying 4.14.55 last night, I noted that the directory in which the kernel build script expects to see "gelf.h" is in the kernel source tree, not the regular /usr/include.



That being said, the corresponding directory in my (running) 4.9.x source tree does not have any .o nor .ko files. Obviously there's a config item enabled in 4.14.x that I don't have enabled in 4.9.x.



I've tried configuring 4.14.x as close to my working 4.9.x as possible; I am aware of some new options, but generally I try to keep the configurations the same between intermediate kernel versions.



That being said, I don't know what config option it is that would want to see the header files in linux-4.14.*/tools/objtool/arch/x86/... Any ideas?









share|improve this question












share|improve this question




share|improve this question








edited Jul 13 at 10:59
























asked Jun 21 at 2:15









pr1268

1063




1063











  • Perhaps check that the location of gelf.h is in the #include path, and that the user running make has access rights to it (and the folder)? stackoverflow.com/questions/7834152/…
    – Time4Tea
    Jun 21 at 19:14











  • My copy of gelf.h is in /usr/include and it is from the (Centos 7) package elfutils-libelf-devel.
    – Chuck E
    Jun 26 at 21:44
















  • Perhaps check that the location of gelf.h is in the #include path, and that the user running make has access rights to it (and the folder)? stackoverflow.com/questions/7834152/…
    – Time4Tea
    Jun 21 at 19:14











  • My copy of gelf.h is in /usr/include and it is from the (Centos 7) package elfutils-libelf-devel.
    – Chuck E
    Jun 26 at 21:44















Perhaps check that the location of gelf.h is in the #include path, and that the user running make has access rights to it (and the folder)? stackoverflow.com/questions/7834152/…
– Time4Tea
Jun 21 at 19:14





Perhaps check that the location of gelf.h is in the #include path, and that the user running make has access rights to it (and the folder)? stackoverflow.com/questions/7834152/…
– Time4Tea
Jun 21 at 19:14













My copy of gelf.h is in /usr/include and it is from the (Centos 7) package elfutils-libelf-devel.
– Chuck E
Jun 26 at 21:44




My copy of gelf.h is in /usr/include and it is from the (Centos 7) package elfutils-libelf-devel.
– Chuck E
Jun 26 at 21:44










1 Answer
1






active

oldest

votes

















up vote
0
down vote













You need to install the following package:



libelf


It provides the gelf.h header file and others. Perhaps you just never installed it on your machine.






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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f451006%2ferror-when-compiling-the-linux-kernel-version-4-14-51%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    You need to install the following package:



    libelf


    It provides the gelf.h header file and others. Perhaps you just never installed it on your machine.






    share|improve this answer

























      up vote
      0
      down vote













      You need to install the following package:



      libelf


      It provides the gelf.h header file and others. Perhaps you just never installed it on your machine.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        You need to install the following package:



        libelf


        It provides the gelf.h header file and others. Perhaps you just never installed it on your machine.






        share|improve this answer













        You need to install the following package:



        libelf


        It provides the gelf.h header file and others. Perhaps you just never installed it on your machine.







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jun 21 at 3:57









        Nasir Riley

        1,494138




        1,494138






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451006%2ferror-when-compiling-the-linux-kernel-version-4-14-51%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay