Unable to compile Linux Kernel 4.7-rc2












1















I was trying to compile Linux Kernel from source. I've compiled the kernel previously and never got any error. But this time I am facing an error. The error is



   CHK     include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/sign-file
/tmp/cczyW3hq.o: In function `main':
sign-file.c:(.text.startup+0x52): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x5e): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x247): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[1]: [scripts/sign-file] Error 1


When I checked scripts/sign-file.c, I saw comment saying Sign a module file using the given key.. So I reran make menuconfig, and set Module signature verification off. And tried to compile again. Now, previous error was removed but new error showed up which was same as above but on different file. Here is the error,



  CHK     include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/extract-cert
/tmp/ccA63AAC.o: In function `main':
extract-cert.c:(.text.startup+0x25): undefined reference to `OPENSSL_init_crypto'
extract-cert.c:(.text.startup+0x31): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/extract-cert' failed
make[1]: *** [scripts/extract-cert] Error 1
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2


So I want to know whether this problem is with libssl or some configuration error? I am using Ubuntu 16.04LTS with gcc-5.3.1.



EDIT: I have tried reinstalling libssl-dev and also tried compiling openssl from source code and then installing too. I have copied config file from /boot/config-4.4.0-22-generic to source directory.



UPDATE:
with make scripts V=1 following is the output:



make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.asm-generic
src=asm obj=arch/x86/include/generated/asm
make -f ./scripts/Makefile.asm-generic
src=uapi/asm obj=arch/x86/include/generated/uapi/asm
make -f ./scripts/Makefile.build obj=scripts
make -f ./scripts/Makefile.build obj=scripts/gdb
make -f ./scripts/Makefile.build obj=scripts/gdb/linux
make -f ./scripts/Makefile.build obj=scripts/genksyms
make -f ./scripts/Makefile.build obj=scripts/mod
make -f ./scripts/Makefile.build obj=scripts/selinux
make -f ./scripts/Makefile.build obj=scripts/selinux/genheaders
make -f ./scripts/Makefile.build obj=scripts/selinux/mdp
gcc -Wp,-MD,scripts/.sign-file.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I./tools/include -o scripts/sign-file scripts/sign-file.c -lcrypto
/tmp/cc7o2Y1C.o: In function `main':
sign-file.c:(.text.startup+0x52): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x5e): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x247): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[1]: *** [scripts/sign-file] Error 1
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2









share|improve this question
















bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Disable the secure boot option

    – GAD3R
    Jun 6 '16 at 11:00











  • @GAD3R It is disabled in the BIOS.

    – 0x0001
    Jun 6 '16 at 11:06













  • What does make scripts V=1 say (from the top-level directory)?

    – Stephen Kitt
    Jun 6 '16 at 12:57











  • @StephenKitt I have updated my question?

    – 0x0001
    Jun 6 '16 at 13:08











  • Thanks, does it work better if you remove libcrypto* from /usr/local/lib (or wherever you installed your manually-built version)?

    – Stephen Kitt
    Jun 6 '16 at 13:17
















1















I was trying to compile Linux Kernel from source. I've compiled the kernel previously and never got any error. But this time I am facing an error. The error is



   CHK     include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/sign-file
/tmp/cczyW3hq.o: In function `main':
sign-file.c:(.text.startup+0x52): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x5e): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x247): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[1]: [scripts/sign-file] Error 1


When I checked scripts/sign-file.c, I saw comment saying Sign a module file using the given key.. So I reran make menuconfig, and set Module signature verification off. And tried to compile again. Now, previous error was removed but new error showed up which was same as above but on different file. Here is the error,



  CHK     include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/extract-cert
/tmp/ccA63AAC.o: In function `main':
extract-cert.c:(.text.startup+0x25): undefined reference to `OPENSSL_init_crypto'
extract-cert.c:(.text.startup+0x31): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/extract-cert' failed
make[1]: *** [scripts/extract-cert] Error 1
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2


So I want to know whether this problem is with libssl or some configuration error? I am using Ubuntu 16.04LTS with gcc-5.3.1.



EDIT: I have tried reinstalling libssl-dev and also tried compiling openssl from source code and then installing too. I have copied config file from /boot/config-4.4.0-22-generic to source directory.



UPDATE:
with make scripts V=1 following is the output:



make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.asm-generic
src=asm obj=arch/x86/include/generated/asm
make -f ./scripts/Makefile.asm-generic
src=uapi/asm obj=arch/x86/include/generated/uapi/asm
make -f ./scripts/Makefile.build obj=scripts
make -f ./scripts/Makefile.build obj=scripts/gdb
make -f ./scripts/Makefile.build obj=scripts/gdb/linux
make -f ./scripts/Makefile.build obj=scripts/genksyms
make -f ./scripts/Makefile.build obj=scripts/mod
make -f ./scripts/Makefile.build obj=scripts/selinux
make -f ./scripts/Makefile.build obj=scripts/selinux/genheaders
make -f ./scripts/Makefile.build obj=scripts/selinux/mdp
gcc -Wp,-MD,scripts/.sign-file.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I./tools/include -o scripts/sign-file scripts/sign-file.c -lcrypto
/tmp/cc7o2Y1C.o: In function `main':
sign-file.c:(.text.startup+0x52): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x5e): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x247): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[1]: *** [scripts/sign-file] Error 1
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2









share|improve this question
















bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Disable the secure boot option

    – GAD3R
    Jun 6 '16 at 11:00











  • @GAD3R It is disabled in the BIOS.

    – 0x0001
    Jun 6 '16 at 11:06













  • What does make scripts V=1 say (from the top-level directory)?

    – Stephen Kitt
    Jun 6 '16 at 12:57











  • @StephenKitt I have updated my question?

    – 0x0001
    Jun 6 '16 at 13:08











  • Thanks, does it work better if you remove libcrypto* from /usr/local/lib (or wherever you installed your manually-built version)?

    – Stephen Kitt
    Jun 6 '16 at 13:17














1












1








1


1






I was trying to compile Linux Kernel from source. I've compiled the kernel previously and never got any error. But this time I am facing an error. The error is



   CHK     include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/sign-file
/tmp/cczyW3hq.o: In function `main':
sign-file.c:(.text.startup+0x52): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x5e): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x247): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[1]: [scripts/sign-file] Error 1


When I checked scripts/sign-file.c, I saw comment saying Sign a module file using the given key.. So I reran make menuconfig, and set Module signature verification off. And tried to compile again. Now, previous error was removed but new error showed up which was same as above but on different file. Here is the error,



  CHK     include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/extract-cert
/tmp/ccA63AAC.o: In function `main':
extract-cert.c:(.text.startup+0x25): undefined reference to `OPENSSL_init_crypto'
extract-cert.c:(.text.startup+0x31): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/extract-cert' failed
make[1]: *** [scripts/extract-cert] Error 1
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2


So I want to know whether this problem is with libssl or some configuration error? I am using Ubuntu 16.04LTS with gcc-5.3.1.



EDIT: I have tried reinstalling libssl-dev and also tried compiling openssl from source code and then installing too. I have copied config file from /boot/config-4.4.0-22-generic to source directory.



UPDATE:
with make scripts V=1 following is the output:



make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.asm-generic
src=asm obj=arch/x86/include/generated/asm
make -f ./scripts/Makefile.asm-generic
src=uapi/asm obj=arch/x86/include/generated/uapi/asm
make -f ./scripts/Makefile.build obj=scripts
make -f ./scripts/Makefile.build obj=scripts/gdb
make -f ./scripts/Makefile.build obj=scripts/gdb/linux
make -f ./scripts/Makefile.build obj=scripts/genksyms
make -f ./scripts/Makefile.build obj=scripts/mod
make -f ./scripts/Makefile.build obj=scripts/selinux
make -f ./scripts/Makefile.build obj=scripts/selinux/genheaders
make -f ./scripts/Makefile.build obj=scripts/selinux/mdp
gcc -Wp,-MD,scripts/.sign-file.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I./tools/include -o scripts/sign-file scripts/sign-file.c -lcrypto
/tmp/cc7o2Y1C.o: In function `main':
sign-file.c:(.text.startup+0x52): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x5e): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x247): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[1]: *** [scripts/sign-file] Error 1
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2









share|improve this question
















I was trying to compile Linux Kernel from source. I've compiled the kernel previously and never got any error. But this time I am facing an error. The error is



   CHK     include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/sign-file
/tmp/cczyW3hq.o: In function `main':
sign-file.c:(.text.startup+0x52): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x5e): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x247): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[1]: [scripts/sign-file] Error 1


When I checked scripts/sign-file.c, I saw comment saying Sign a module file using the given key.. So I reran make menuconfig, and set Module signature verification off. And tried to compile again. Now, previous error was removed but new error showed up which was same as above but on different file. Here is the error,



  CHK     include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/extract-cert
/tmp/ccA63AAC.o: In function `main':
extract-cert.c:(.text.startup+0x25): undefined reference to `OPENSSL_init_crypto'
extract-cert.c:(.text.startup+0x31): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/extract-cert' failed
make[1]: *** [scripts/extract-cert] Error 1
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2


So I want to know whether this problem is with libssl or some configuration error? I am using Ubuntu 16.04LTS with gcc-5.3.1.



EDIT: I have tried reinstalling libssl-dev and also tried compiling openssl from source code and then installing too. I have copied config file from /boot/config-4.4.0-22-generic to source directory.



UPDATE:
with make scripts V=1 following is the output:



make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
make -f ./scripts/Makefile.asm-generic
src=asm obj=arch/x86/include/generated/asm
make -f ./scripts/Makefile.asm-generic
src=uapi/asm obj=arch/x86/include/generated/uapi/asm
make -f ./scripts/Makefile.build obj=scripts
make -f ./scripts/Makefile.build obj=scripts/gdb
make -f ./scripts/Makefile.build obj=scripts/gdb/linux
make -f ./scripts/Makefile.build obj=scripts/genksyms
make -f ./scripts/Makefile.build obj=scripts/mod
make -f ./scripts/Makefile.build obj=scripts/selinux
make -f ./scripts/Makefile.build obj=scripts/selinux/genheaders
make -f ./scripts/Makefile.build obj=scripts/selinux/mdp
gcc -Wp,-MD,scripts/.sign-file.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -I./tools/include -o scripts/sign-file scripts/sign-file.c -lcrypto
/tmp/cc7o2Y1C.o: In function `main':
sign-file.c:(.text.startup+0x52): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x5e): undefined reference to `OPENSSL_init_crypto'
sign-file.c:(.text.startup+0x247): undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
scripts/Makefile.host:91: recipe for target 'scripts/sign-file' failed
make[1]: *** [scripts/sign-file] Error 1
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2






linux kernel openssl






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 6 '16 at 13:06







0x0001

















asked Jun 6 '16 at 10:19









0x00010x0001

1064




1064





bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 14 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Disable the secure boot option

    – GAD3R
    Jun 6 '16 at 11:00











  • @GAD3R It is disabled in the BIOS.

    – 0x0001
    Jun 6 '16 at 11:06













  • What does make scripts V=1 say (from the top-level directory)?

    – Stephen Kitt
    Jun 6 '16 at 12:57











  • @StephenKitt I have updated my question?

    – 0x0001
    Jun 6 '16 at 13:08











  • Thanks, does it work better if you remove libcrypto* from /usr/local/lib (or wherever you installed your manually-built version)?

    – Stephen Kitt
    Jun 6 '16 at 13:17



















  • Disable the secure boot option

    – GAD3R
    Jun 6 '16 at 11:00











  • @GAD3R It is disabled in the BIOS.

    – 0x0001
    Jun 6 '16 at 11:06













  • What does make scripts V=1 say (from the top-level directory)?

    – Stephen Kitt
    Jun 6 '16 at 12:57











  • @StephenKitt I have updated my question?

    – 0x0001
    Jun 6 '16 at 13:08











  • Thanks, does it work better if you remove libcrypto* from /usr/local/lib (or wherever you installed your manually-built version)?

    – Stephen Kitt
    Jun 6 '16 at 13:17

















Disable the secure boot option

– GAD3R
Jun 6 '16 at 11:00





Disable the secure boot option

– GAD3R
Jun 6 '16 at 11:00













@GAD3R It is disabled in the BIOS.

– 0x0001
Jun 6 '16 at 11:06







@GAD3R It is disabled in the BIOS.

– 0x0001
Jun 6 '16 at 11:06















What does make scripts V=1 say (from the top-level directory)?

– Stephen Kitt
Jun 6 '16 at 12:57





What does make scripts V=1 say (from the top-level directory)?

– Stephen Kitt
Jun 6 '16 at 12:57













@StephenKitt I have updated my question?

– 0x0001
Jun 6 '16 at 13:08





@StephenKitt I have updated my question?

– 0x0001
Jun 6 '16 at 13:08













Thanks, does it work better if you remove libcrypto* from /usr/local/lib (or wherever you installed your manually-built version)?

– Stephen Kitt
Jun 6 '16 at 13:17





Thanks, does it work better if you remove libcrypto* from /usr/local/lib (or wherever you installed your manually-built version)?

– Stephen Kitt
Jun 6 '16 at 13:17










1 Answer
1






active

oldest

votes


















0














You will have to make sure that the symbolic link to libssl and libcrypto is updated.
Here is what you should do:
Search for all occurrences of libssl.so and libcrypto.so



for each of them, see of they are linking to the correct version of libssl.
libssl.so.1.1 in your case (libssl.so.1.1 must exist).



If they are targeting an older version, delete the link and create a new one



ln -s libssl.so.1.1 libssl.so



Same for libcrytpo.



Make sure you search for all occurances of libssl.so (you never know where your code picks it up from)






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%2f287930%2funable-to-compile-linux-kernel-4-7-rc2%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You will have to make sure that the symbolic link to libssl and libcrypto is updated.
    Here is what you should do:
    Search for all occurrences of libssl.so and libcrypto.so



    for each of them, see of they are linking to the correct version of libssl.
    libssl.so.1.1 in your case (libssl.so.1.1 must exist).



    If they are targeting an older version, delete the link and create a new one



    ln -s libssl.so.1.1 libssl.so



    Same for libcrytpo.



    Make sure you search for all occurances of libssl.so (you never know where your code picks it up from)






    share|improve this answer




























      0














      You will have to make sure that the symbolic link to libssl and libcrypto is updated.
      Here is what you should do:
      Search for all occurrences of libssl.so and libcrypto.so



      for each of them, see of they are linking to the correct version of libssl.
      libssl.so.1.1 in your case (libssl.so.1.1 must exist).



      If they are targeting an older version, delete the link and create a new one



      ln -s libssl.so.1.1 libssl.so



      Same for libcrytpo.



      Make sure you search for all occurances of libssl.so (you never know where your code picks it up from)






      share|improve this answer


























        0












        0








        0







        You will have to make sure that the symbolic link to libssl and libcrypto is updated.
        Here is what you should do:
        Search for all occurrences of libssl.so and libcrypto.so



        for each of them, see of they are linking to the correct version of libssl.
        libssl.so.1.1 in your case (libssl.so.1.1 must exist).



        If they are targeting an older version, delete the link and create a new one



        ln -s libssl.so.1.1 libssl.so



        Same for libcrytpo.



        Make sure you search for all occurances of libssl.so (you never know where your code picks it up from)






        share|improve this answer













        You will have to make sure that the symbolic link to libssl and libcrypto is updated.
        Here is what you should do:
        Search for all occurrences of libssl.so and libcrypto.so



        for each of them, see of they are linking to the correct version of libssl.
        libssl.so.1.1 in your case (libssl.so.1.1 must exist).



        If they are targeting an older version, delete the link and create a new one



        ln -s libssl.so.1.1 libssl.so



        Same for libcrytpo.



        Make sure you search for all occurances of libssl.so (you never know where your code picks it up from)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 2 '17 at 20:18









        Sabih ZafarullahSabih Zafarullah

        1




        1






























            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%2f287930%2funable-to-compile-linux-kernel-4-7-rc2%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

            濃尾地震