Open aminya opened 1 year ago
it's up to the caller to use the appropriate compiler flags for these niche use cases
@bluca This is not a niche use case, it is a bug in CMake. The current CMake file is not doing what it promised to do. WITH_LIBSODIUM_STATIC
says it links libsodium statically, but it doesn't
Maybe libzmq
can use the official Findsodium.cmake
file, provided by libsodium? It does support linking statically.
https://github.com/jedisct1/libsodium/blob/stable/contrib/Findsodium.cmake
@zeromq/core could someone reopen this issue? It is blocking for ZeromqJS. VsCode (used by millions) has been using the old version of zermqjs because of this.
I
Maybe
libzmq
can use the officialFindsodium.cmake
file, provided by libsodium? It does support linking statically.https://github.com/jedisct1/libsodium/blob/stable/contrib/Findsodium.cmake
If this is a working fix can someone create a PR?
@bluca Would you mind reopening this please? See these comments above: https://github.com/zeromq/libzmq/issues/4484#issuecomment-1372885784 https://github.com/zeromq/libzmq/issues/4484#issuecomment-1373452630
I've reopened it but as long as nobody comes up with a PR it is to no avail?
Made #4562 to fix this issue.
Issue description
In Zeromq.js, the libsodium is built statically, but the built library still tries to link to the dynamic libraries. I expect the built binary to include llibsodium and not rely on its dynamic libraries.
See https://github.com/zeromq/zeromq.js/issues/529#issuecomment-1370696934
Environment
Minimal test code / Steps to reproduce the issue
pnpm install
What's the actual result? (include assertion message & call stack if applicable)
What's the expected result?
The built binary should not need the dynamic libraries