When libsrt.so compiled wit static OpenSSL is loaded alongside system OpenSSL (e.g. OpenSSL 3.x on Ubuntu 22.04), the dynamic linker encounters symbol collisions between OpenSSL symbols statically baked into libsrt.so and the system-provided libssl.so/libcrypto.so. This causes unpredictable crashes depending on which library's symbol the linker resolves first at runtime.
- Build libsrt.so with static OpenSSL.
- Use nm -D --defines-only libsrt.so to get exported symbols.
- Observe symbols like AES_* and others.
Expected that only symbols marked as SRT_API is visible.
CMake build script should contain "-fvisibilty=hidden" for compiler flags and "-Wl,--exclude-libs,libcrypto.a:libssl.a" for the case of static OpenSSL.
- OS: Ubuntu 20.04/22.04
- SRT 1.5.4
When libsrt.so compiled wit static OpenSSL is loaded alongside system OpenSSL (e.g. OpenSSL 3.x on Ubuntu 22.04), the dynamic linker encounters symbol collisions between OpenSSL symbols statically baked into libsrt.so and the system-provided libssl.so/libcrypto.so. This causes unpredictable crashes depending on which library's symbol the linker resolves first at runtime.
Expected that only symbols marked as SRT_API is visible.
CMake build script should contain "-fvisibilty=hidden" for compiler flags and "-Wl,--exclude-libs,libcrypto.a:libssl.a" for the case of static OpenSSL.