Build breaks with undefined symbol EVP_MD_do_all
sfuhrm opened this issue · 2 comments
sfuhrm commented
/opt/hostedtoolcache/Java_Adopt_jdk/11.0.19-7/x64/bin/java: symbol lookup error: /tmp/native17101265928182119234/libopenssl4j-Linux-amd64.so: undefined symbol: EVP_MD_do_all
sfuhrm commented
There is a slight difference in the build (linkage?) between Debian10 and Debian11:
Debian 10 docker build:
root@1a24a0006824:/# ldd /openssl4j/target/libopenssl4j-Linux-amd64.so
linux-vdso.so.1 (0x00007fffa55f4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdca0695000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fdca0602000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdca085f000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fdca0315000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdca0310000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdca02ef000)
Debian 11 docker build:
root@b4905ac41c8b:/# ldd /openssl4j/target/libopenssl4j-Linux-amd64.so
linux-vdso.so.1 (0x00007ffceb5fa000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6424a06000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6424be4000)
This means on Debian 11 the libpthread, libcrypto, libssl references are missing in the shared object file generated. Because of that at runtime the symbols are missing.
sfuhrm commented
Fixed by moving the -shared linker option to the right place in the Makefile