easybuilders / easybuild-easyconfigs

A collection of easyconfig files that describe which software to build using which build options with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
356 stars 685 forks source link

OpenSSL 3 fails to build from source on RISC-V #20615

Open bedroge opened 1 month ago

bedroge commented 1 month ago

On my Starfive Visionfive 2, I get the following error:

gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -L. -Wl,-z,defs -Wl,-znodelete -shared -Wl,-Bsymbolic   \
        -o engines/padlock.so -Wl,--version-script=engines/padlock.ld \
        engines/padlock-dso-e_padlock.o \
        -lcrypto -ldl -pthread 
gcc -fPIC -pthread -Wa,--noexecstack -Wall -O3 -L. -Wl,-z,defs -Wl,-znodelete -shared -Wl,-Bsymbolic   \
        -o providers/legacy.so -Wl,--version-script=providers/legacy.ld \
        crypto/legacy-dso-cpuid.o crypto/legacy-dso-ctype.o \
        crypto/legacy-dso-riscv64cpuid.o \
        crypto/legacy-dso-riscvcap.o \
        providers/legacy-dso-legacyprov.o \
        providers/liblegacy.a providers/libcommon.a -lcrypto -ldl -pthread 
rm -f fuzz/asn1parse-test
${LDCMD:-gcc} -pthread -Wa,--noexecstack -Wall -O3 -L.   \
        -o fuzz/asn1parse-test \
        fuzz/asn1parse-test-bin-asn1parse.o \
        fuzz/asn1parse-test-bin-test-corpus.o \
        -lcrypto -ldl -pthread 
rm -f fuzz/bignum-test
${LDCMD:-gcc} -pthread -Wa,--noexecstack -Wall -O3 -L.   \
        -o fuzz/bignum-test \
        fuzz/bignum-test-bin-bignum.o \
        fuzz/bignum-test-bin-test-corpus.o \
        -lcrypto -ldl -pthread 
/usr/bin/ld: ./libcrypto.so: undefined reference to `ra'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:24344: fuzz/asn1parse-test] Error 1
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: ./libcrypto.so: undefined reference to `ra'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:24368: fuzz/bignum-test] Error 1
make[1]: Leaving directory '/nvme/eb/build/OpenSSL/3/system-system/openssl-3.2.1'
make: *** [Makefile:3564: build_sw] Error 2
bedroge commented 1 month ago

I was also wondering why it actually even built this from source, since my host system already provides OpenSSL 3. It turns out that this is some broader issue on Debian-based distros (and not specific to RISC-V), see https://github.com/easybuilders/easybuild-easyblocks/issues/3337.