-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem: The addition of sha1 sources breaks static linking #3676
Comments
@somdoron is there an external library that could be used to get those functions instead of embedding it? |
Plenty I guess, but that will make a dependency. I wonder if defining LIBZMQ_PRIVATE to Anyway, the easiest solution is to change the function names to something like zmq_. |
Isn't the visibility only used for dynamic linking? I'd very much rather not mangle external code, as it makes it harder to maintain. |
NSS and OpenSSL are an option: |
But it won't solve the problem in case the dependency for czmq. |
openssl is not possible unfortunately as the license is not compatible with the GPL. |
No, it is already defined that way, what we need to do is to check during the compilation of czmq if the flag is defined, and only if not defined include sha1.c |
It is actually the same file, between czmq and libzmq. |
we can also check the libzmq version and drop the file if static compilation and version is higher than last released version |
I'm not sure how this would be done? It would require inspecting the ar, which will get messy especially when cross compiling |
We can use NSS, but it won't solve the problem when the dependency is not found |
I am not sure if the problem also exists under Windows, but at least for Linux it should be possible to declare the sha* functions as weak symbols with |
@bluca can we use LibreSSL? it seems like the license is ok and the API is the same as OpenSSL. |
The license is the same as (old) openssl as it's a fork, and thus still incompatible with the GPL |
I will use NSS, working on it |
@bluca is apache 2.0 license works? |
it's compatible with GPL3 yes, but it is not compatible with GPL2 |
I have the NSS ready, however building it on windows is not going to be easy... |
@somdoron Thanks! |
I have added a new feature in
will build
will exclude |
Hello - I am reading through and don't follow how to fix... I am compiling czmq and libzmq as static library and run into this error. EDIT - I added DISABLE_WS:BOOL=ON to libzmq and now compiles... |
Please use this template for reporting suspected bugs or requests for help.
Issue description
I encountered a
zyre
REGRESSION error when I was trying to updatevcpkg
's zeromq to lastest: microsoft/vcpkg#8119In #3579,
external/sha1/sha1.h
andexternal/sha1/sha1.c
are added. However,czmq
also has its own copy of these two files: https://github.com/zeromq/czmq/tree/master/src/foreign/sha1If both
libzmq
andczmq
are built as static libraries, then the compiler will be unhappy:Environment
Minimal test code / Steps to reproduce the issue
What's the actual result? (include assertion message & call stack if applicable)
What's the expected result?
The text was updated successfully, but these errors were encountered: