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
[BUG] mingw cross compile is unable to use static openSSL #2855
Comments
|
What is the compile error you get, for starters? Does the SRT static library fail to compile unless you link it against crypt32.lib ? Or the applications fail to compile by this reason? |
Sorry to be terse, here's more output, appears it's at link time with apps enabled:
Thank you! |
Ok, so it indeed seems like the problem is with linking I'm not sure how it's on Windows, but at least on Linux the static libraries don't handle dependencies. So only at the definition of linking the executable that uses this library, all dependent libraries should be passed to the command line. I'm a bit surprised that it happens here because the utility executables are compiled by default against the static SRT library. Would you be able to repeat the "make" command, but this time with |
Sure.
(no mention of -lcrypt32). It appears the it is accomodated for for "MICROSOFT"
but in my case it's MINGW and I've built openssl as a "static only" lib, though haven't set OPENSSL_USE_STATIC_LIBS (though doesn't fix it with it set either) FWIW...
Thanks! |
Does it help if you temporarily add this entry declared here for Microsoft also under MinGW condition? |
Maybe a better way would be to use the openssl pkg-config libs instead of hard coding them, but the current pattern works:
See also #565 |
First I compile static-only local OpenSSL.
Then
Expected behavior
Should respect
pkg-config --libs --static libcrypto
but doesn't seem to.If you want to hard code it like other sections, maybe the following:
Which seems to fix it in a manual way, thank you!
The text was updated successfully, but these errors were encountered: