-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
OpenSSL x86-windows-static not working with find_package(OpenSSL REQUIRED) #12001
Comments
See documentation. |
Ok although I set the correct triplets in CMakeSettings.json
I still get this error
The error is here the file name installed by vcpkg is C:\vcpkg\installed\x86-windows-static\debug\lib\libcrypto.lib and not libcryptod.lib To me it seems that whom ever built this package forgot to set set(CMAKE_DEBUG_POSTFIX d) |
What is this error linked to? My code or the OpenSSL port? |
Any idea what is the problem here ? |
@67-al-ahad Can you confirm your vcpkg is latest? Thanks. |
You can also see that I added the extra parameter for Visual Studio: Also the debug setting the correct library cannot be found by Visual Studio and vcpkg although it is installed. In the release it seems that it is found but the file name taken into consideration is ending with d which is non-existent. As you can see the library version for debug which is installed is not correct there is the d letter missing in the files name. For the release version everything seems to be fine. |
I added the explanation for this bug and the workaround here: |
The old OpenSSL packages for < 1.1.0 (ssleay32 and libeay32) might have had a "d" suffix or at least I could find hints at that. It appears that they removed that for 1.1+ when the name was changed to libcrypto and libssl. I would suggest removing the _DEBUG pragma in your header file. That should clear your problem up. Release
Debug
|
I am using vcpkg, CMake and Visual Studio 2019 are you talking about this : https://stackoverflow.com/questions/4604283/automatic-defines-according-to-debug-release-config-in-visual-studio or are you talking about this:
|
Yeah the last one
I noticed that there was a reference to libcryptod.lib in the header file but it wasn't cooperating at the time to quote it. |
@cenit Could you please take a look? Thanks. |
Even after removing the d from header I still get this error. |
@JackBoosY @67-al-ahad there is a problem with the openssl port on vcpkg, which is independent from 1.1 update. The only culprit of that PR is not having fixed this problem and not even highlighted that. another note on #8566 pr: it left many orphaned patches in the OpenSSL port folder... |
I'm facing a more critical issue regarding the OpenSSL port: See the cmake log:
ZLIB for example, correctly sets
Not sure if #21641 is trying to fix this specific issue. |
@christophe-calmejane #21641 is an extension of a test port that I created to verify vcpkg's interaction with CMake's find modules. I decided to move this to a separate PR (WIP) where I will also update port openssl to hopefully fix the issues. Related: #21415 Disclaimer: I test MSVC only in vcpkg CI. |
Is this issue fixed now? |
Thanks for posting this issue. Please reopen this issue if this is still a problem for you. |
Describe the bug
A basic openssl project is not able to be generated and compiled due to the lack of vcpkg to find the library paths.
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The generation should be without any problem
Failure logs
Additional context
It is working well when we are installing openssl:x86-windows version of the library. But as soon as we don't want to use the DLL version instead openssl:x86-windows-static-md then nothing works anymore.
helloworld.zip
The text was updated successfully, but these errors were encountered: