I am trying to compile the nwipe project from the following GitHub repository: https://github.com/Knogle/nwipe/tree/master. The compilation process completes successfully on a Fedora system, but fails on an Ubuntu machine with the same version of OpenSSL (greater than 3.0.2), which should support the necessary functions. Both systems have the libdev-ssl package correctly installed.
Here is a snippet of the compilation output on Fedora, where it compiles without errors:
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -MT aes/aes_ctr_prng.o -MD -MP -MF $depbase.Tpo -c -o aes/aes_ctr_prng.o aes/aes_ctr_prng.c &&\mv -f $depbase.Tpo $depbase.Po...gcc -g -O2 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -lcrypto -o nwipe nwipe.o ... -lparted -lpthread -lpanel -lncurses -ltinfo -lconfig
However, on Ubuntu, I encounter linker errors related to OpenSSL functions AES_set_encrypt_key
and AES_encrypt
, which are marked as deprecated since OpenSSL 3.0 but are still included in the project:
/usr/bin/ld: aes/aes_ctr_prng.o: in function `aes_ctr_prng_init':/tmp/nwipe/src/aes/aes_ctr_prng.c:22: undefined reference to `AES_set_encrypt_key'/usr/bin/ld: aes/aes_ctr_prng.o: in function `aes_ctr_prng_genrand_uint32':/tmp/nwipe/src/aes/aes_ctr_prng.c:41: undefined reference to `AES_encrypt'/usr/bin/ld: /tmp/nwipe/src/aes/aes_ctr_prng.c:41: undefined reference to `CRYPTO_ctr128_encrypt'collect2: error: ld returned 1 exit status
Given that the compilation succeeds on Fedora but fails on Ubuntu, despite having the same OpenSSL version and seemingly correct dependencies installed, what could be causing this issue? How can I resolve these linker errors on Ubuntu?