opnsense / ports

OPNsense ports on top of FreeBSD
https://opnsense.org/
Other
157 stars 112 forks source link

openssl-1.1.1q build on aarch64 fails with Error code 1 #155

Closed JohannesNeu closed 1 year ago

JohannesNeu commented 2 years ago

I tried compiling "make arm DEVICE="RPI"" on a raspberry pi 4 and the build process seems to try compiling openssl several times, but runs into problems:

===>   Returning to build of openssl-1.1.1q,1
[20220521112428] ===> Configuring for openssl-1.1.1q,1
Operating system: arm64-whatever-freebsd
Configuring OpenSSL version 1.1.1q (0x1010111fL) for BSD-aarch64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
/usr/bin/sed -i.bak  -e 's|SHLIB_VERSION_NUMBER=1.1|SHLIB_VERSION_NUMBER=11|'  /usr/obj/usr/ports/security/openssl/work/openssl-1.1.1q/Makefile
/usr/bin/sed -i.bak  -e 's|SHLIB_VERSION_NUMBER "1.1"|SHLIB_VERSION_NUMBER "11"|'  /usr/obj/usr/ports/security/openssl/work/openssl-1.1.1q/include/openssl/opensslv.h
[20220521112446] ===> Building for openssl-1.1.1q,1
--- configdata.pm ---
Detected changed: ./config Configurations/common0.tmpl Configurations/common.tmpl ./build.info crypto/build.info engines/build.info apps/build.info util/build.info tools/build.info fuzz/build.info crypto/objects/build.info crypto/md4/build.info crypto/md5/build.info crypto/sha/build.info crypto/hmac/build.info crypto/ripemd/build.info crypto/whrlpool/build.info crypto/poly1305/build.info crypto/blake2/build.info crypto/siphash/build.info crypto/des/build.info crypto/aes/build.info crypto/rc2/build.info crypto/rc4/build.info crypto/bf/build.info crypto/cast/build.info crypto/camellia/build.info crypto/seed/build.info crypto/chacha/build.info crypto/modes/build.info crypto/bn/build.info crypto/ec/build.info crypto/rsa/build.info crypto/dsa/build.info crypto/dh/build.info crypto/dso/build.info crypto/engine/build.info crypto/buffer/build.info crypto/bio/build.info crypto/stack/build.info crypto/lhash/build.info crypto/rand/build.info crypto/err/build.info crypto/evp/build.info crypto/asn1/build.info crypto/pem/build.info crypto/x509/build.info crypto/x509v3/build.info crypto/conf/build.info crypto/txt_db/build.info crypto/pkcs7/build.info crypto/pkcs12/build.info crypto/comp/build.info crypto/ocsp/build.info crypto/ui/build.info crypto/cms/build.info crypto/ts/build.info crypto/srp/build.info crypto/cmac/build.info crypto/ct/build.info crypto/async/build.info crypto/kdf/build.info crypto/store/build.info test/ossl_shim/build.info Configurations/00-base-templates.conf Configurations/10-main.conf
/usr/local/bin/perl configdata.pm -r

Failure!  build file wasn't produced.
Please read INSTALL and associated NOTES files.  You may also have to look over
your available compiler tool chain or change your configuration.

erroneous version information in opensslv.h: 1, 1.1, , 
*** [configdata.pm] Error code 255

make[6]: stopped in /usr/obj/usr/ports/security/openssl/work/openssl-1.1.1q
1 error

make[6]: stopped in /usr/obj/usr/ports/security/openssl/work/openssl-1.1.1q
[20220521112447] ===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/security/openssl
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/lang/python39
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/py-setuptools
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/meson
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/x11-fonts/fontconfig
*** Error code 1

Stop.
make: stopped in /usr/ports/x11-fonts/urwfonts

and prior to that:

[20220521112019] ===> Configuring for openssl-1.1.1q,1
Operating system: arm64-whatever-freebsd
Configuring OpenSSL version 1.1.1q (0x1010111fL) for BSD-aarch64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
/usr/bin/sed -i.bak  -e 's|SHLIB_VERSION_NUMBER=1.1|SHLIB_VERSION_NUMBER=11|'  /usr/obj/usr/ports/security/openssl/work/openssl-1.1.1q/Makefile
/usr/bin/sed -i.bak  -e 's|SHLIB_VERSION_NUMBER "1.1"|SHLIB_VERSION_NUMBER "11"|'  /usr/obj/usr/ports/security/openssl/work/openssl-1.1.1q/include/openssl/opensslv.h
[20220521112036] ===> Building for openssl-1.1.1q,1
--- configdata.pm ---
Detected changed: ./config Configurations/common0.tmpl Configurations/common.tmpl ./build.info crypto/build.info engines/build.info apps/build.info util/build.info tools/build.info fuzz/build.info crypto/objects/build.info crypto/md4/build.info crypto/md5/build.info crypto/sha/build.info crypto/hmac/build.info crypto/ripemd/build.info crypto/whrlpool/build.info crypto/poly1305/build.info crypto/blake2/build.info crypto/siphash/build.info crypto/des/build.info crypto/aes/build.info crypto/rc2/build.info crypto/rc4/build.info crypto/bf/build.info crypto/cast/build.info crypto/camellia/build.info crypto/seed/build.info crypto/chacha/build.info crypto/modes/build.info crypto/bn/build.info crypto/ec/build.info crypto/rsa/build.info crypto/dsa/build.info crypto/dh/build.info crypto/dso/build.info crypto/engine/build.info crypto/buffer/build.info crypto/bio/build.info crypto/stack/build.info crypto/lhash/build.info crypto/rand/build.info crypto/err/build.info crypto/evp/build.info crypto/asn1/build.info crypto/pem/build.info crypto/x509/build.info crypto/x509v3/build.info crypto/conf/build.info crypto/txt_db/build.info crypto/pkcs7/build.info crypto/pkcs12/build.info crypto/comp/build.info crypto/ocsp/build.info crypto/ui/build.info crypto/cms/build.info crypto/ts/build.info crypto/srp/build.info crypto/cmac/build.info crypto/ct/build.info crypto/async/build.info crypto/kdf/build.info crypto/store/build.info test/ossl_shim/build.info Configurations/00-base-templates.conf Configurations/10-main.conf
/usr/local/bin/perl configdata.pm -r

Failure!  build file wasn't produced.
Please read INSTALL and associated NOTES files.  You may also have to look over
your available compiler tool chain or change your configuration.

erroneous version information in opensslv.h: 1, 1.1, , 
*** [configdata.pm] Error code 255

make[3]: stopped in /usr/obj/usr/ports/security/openssl/work/openssl-1.1.1q
1 error

make[3]: stopped in /usr/obj/usr/ports/security/openssl/work/openssl-1.1.1q
[20220521112038] ===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/security/openssl
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/python39
*** Error code 1

Stop.
make: stopped in /usr/ports/www/webgrind

which will in the end result in this error:

>>> Creating package mirror set for 22.7_21-OpenSSL-aarch64... done
-rw-r--r--  1 root  wheel   246M May 21 11:26 packages-22.7_21-OpenSSL-aarch64.tar
>>> ERROR: The build encountered fatal issues!
>>> Aborted version 8.0.20 for archivers/php80-zlib
>>> Aborted version 1.1.9_1 for archivers/snappy
...
>>> Aborted version 1.0_8 for x11-fonts/urwfonts
*** Error code 1

Stop.
make: stopped in /usr/tools
JohannesNeu commented 2 years ago

I checked the sources at https://www.openssl.org/source/openssl-1.1.1q.tar.gz because they are mentioned in ports/security/openssl/Makefile and it looks like the file include/openssl/opensslv.h contains two lines:

...
# define OPENSSL_VERSION_TEXT    "OpenSSL 1.1.1q  5 Jul 2022"
...
# define SHLIB_VERSION_NUMBER "1.1"

so maybe this is a problem with the source?