Openssl compilation issue for 8.2.5 / 9

  • I've been having a strange problem compiling openssl, either 1.0.1 or 1.0.2 from master.

    Building for generic using a Deb 9 build host gives me:

    making install in tools...

    make[2]: Entering directory '/media/build/sam/'

    make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.

    make[2]: Leaving directory '/media/build/sam/'

    installing libcrypto.a

    installing libssl.a



    Segmentation fault

    make[1]: *** [Makefile:552: install_sw] Error 139

    make[1]: Leaving directory '/media/build/sam/'

    Makefile:12: recipe for target 'image' failed

    make: *** [image] Error 2

    I don't really understand what is failing exactly, and Google isn't helping me at the moment.


  • Remove package and try again

    PROJECT=Generic ARCH=x86_64 ./scripts/clean openssl
    PROJECT=Generic ARCH=x86_64 make


  • Remove package and try again

    PROJECT=Generic ARCH=x86_64 ./scripts/clean openssl
    PROJECT=Generic ARCH=x86_64 make

    I've copied and pasted those commands, still the same issue, same output as before.

    Is there anything else I can try?

  • In packages/security/openssl/ try adding

    export MAKEFLAGS="-j1"

    then remove package and build again.

    If this would not help you will need to debug issue yourself.


  • This is a bizarre issue.

    I've isolated the issue to this particular line in the openssl Makefile:

    make -f $here/Makefile HERE="$here" link-shared );

    The output of which when run normally is:

    GNU Make 4.2.1

    Built for x86_64-pc-linux-gnu

    Copyright (C) 1988-2016 Free Software Foundation, Inc.

    License GPLv3+: GNU GPL version 3 or later <The GNU General Public License v3.0 - GNU Project - Free Software Foundation>

    This is free software: you are free to change and redistribute it.

    There is NO WARRANTY, to the extent permitted by law.

    Reading makefiles...

    Reading makefile '/media/build/sam/'...

    Updating makefiles....

    Segmentation fault

    When I run the entire shell script from the Makefile manually, it succeeds, suggesting it's something environmental.

    And when I modify the Makefile, running that particular line with the debugger, again it works fine. Yet again, and again, it always fails when building without modification.

    The TL;DR version, I've compiled openssl ( and built Libreelec ) successfully, but there is something funny going on. Potentially a bug in Debian Stretch tools?

  • Just for the record: You have to install libssl1.0-dev instead of libssl-dev on Debian Stretch.

    Have you tried turning it off and on again?

  • I have the exact same issue as OP, compiling 8.2.5 on Ubuntu Server 16.04.6 LTS. Doing vpeter's suggestion did not change anything even after wiping the entire build folder.

    What is the final solution? I do not understand what sammyrc did when he said he ran the entire shell script from the Makefile manually. Can anyone help me with this?