How to build OpenSSL from source, without depending on /lib/libcrypto.so
0
votes
0
answers
365
views
After several sessions with intense Google searching and trying several angles with ChatGPT, I seem to be at a dead-end, my problem arises when I try to build OpenSSL from source, it seems that the build process wants to link with libcrypto.so located in /lib, but the system supplied version of OpenSSL is ancient, so this fails miserably, since OpenSSL now includes functionality not present in my version of libcrypto.so, specifically QUIC, its failing on safe_muldiv_uint64_t. It seems like a catch-22, and I have absolutely no idea how to break out of this.
Some of the suggestions I have found involved building OpenSSL in a chroot jail, but I think it seems a little excessive?
So I guess my question is: How do I build OpenSSL without linking with /lib/libcrypto.so, but linking with the version of libcrypto from the source package?
Output:
${LDCMD:-cc} -pthread -Wa,--noexecstack -O2 -O3 -pipe -I/usr/include -I/usr/pkg/include -L/usr/local/lib -L/usr/pkg/gcc7/lib/gcc/x86_64--netbsd/7.5.0 -Wl,-R/usr/pkg/gcc7/lib/gcc/x86_64--netbsd/7.5.0 -Wl,-zrelro -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib \
-o fuzz/quic-srtm-test \
fuzz/quic-srtm-test-bin-fuzz_rand.o \
fuzz/quic-srtm-test-bin-quic-srtm.o \
fuzz/quic-srtm-test-bin-test-corpus.o \
libssl.a libcrypto.a -pthread
...
apps/libapps.a -lssl -lcrypto -pthread
./libssl.so: undefined reference to safe_muldiv_uint64_t
./libssl.so: undefined reference to safe_mul_uint64_t
-L/usr/lib is specified in the above command executed by the Makefile, and that folder contains libcrypto.o and libssl.o from the system supplied version of OpenSSL,
Asked by user1359448
(155 rep)
Sep 26, 2024, 05:39 PM
Last activity: Sep 29, 2024, 05:48 PM
Last activity: Sep 29, 2024, 05:48 PM