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/LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.2.5/openssl-1.0.2l/.x86_64-libreelec-linux-gnu/tools'

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

    make[2]: Leaving directory '/media/build/sam/LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.2.5/openssl-1.0.2l/.x86_64-libreelec-linux-gnu/tools'

    installing libcrypto.a

    installing libssl.a

    installing libcrypto.so.1.0.0

    installing libssl.so.1.0.0

    Segmentation fault

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

    make[1]: Leaving directory '/media/build/sam/LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.2.5/openssl-1.0.2l/.x86_64-libreelec-linux-gnu'

    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.


    Thanks

  • Remove package and try again

    Code
    1. PROJECT=Generic ARCH=x86_64 ./scripts/clean openssl
    2. PROJECT=Generic ARCH=x86_64 make

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community) (limited no support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)

  • Remove package and try again

    Code
    1. PROJECT=Generic ARCH=x86_64 ./scripts/clean openssl
    2. 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/package.mk try adding

    Code
    1. export MAKEFLAGS="-j1"

    then remove package and build again.


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

    Blu-ray Disc Java menus support - forum thread, Github

    my lamp addon (unofficial/community) (limited no support)
    my touchscreen support and instructions by Grruhn (now touchscreen addon exists in repository)

  • 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/LibreELEC.tv/build.LibreELEC-Generic.x86_64-8.2.5/openssl-1.0.2o/.x86_64-libreelec-linux-gnu/Makefile'...

    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?