pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.04k stars 2.11k forks source link

POCO 1.13.3 Crypto_vs170.vcxproj build fails when using external openssl #4581

Open Spaky opened 3 weeks ago

Spaky commented 3 weeks ago

Describe the bug Due the changes from "enh(build): vcpkg support for Visual Studio projects (OpenSSL, MariaDB client, PostgreSQL client)" introduced with 1.13.3 building of Crypto_vs170.vcxproj using with external build of failes because of missing libs of openssl.

To Reproduce call "%env.nmake.path%\vcvars32.bat" set INCLUDE=%%INCLUDE%%;%teamcity.build.checkoutDir%\openssl.vs%VC_VERSION%.shared.%OPENSSL_VERSION%\build\native\inc set LIB=%%LIB%%;%teamcity.build.checkoutDir%\openssl.vs%VC_VERSION%.shared.%OPENSSL_VERSION%\build\native\release\lib cd download buildwin,cmd 170 build shared release Win32 nosamples notests msbuild

Expected behavior Adding the automatic linking of openssl again.

Logs [11:33:12 ] X509Certificate.cpp [11:33:12 ] OpenSSL 3.0.14 4 Jun 2024 [11:33:14 ] Bibliothek "..\lib\PocoCrypto.lib" und Objekt "..\lib\PocoCrypto.exp" werden erstellt. [11:33:15 ] CipherFactory.obj : error LNK2019: Verweis auf nicht aufgel”stes externes Symbol "_OSSL_PROVIDER_load" in Funktion ""public: __thiscall Poco::Crypto::CipherFactory::CipherFactory(void)" (??0CipherFactory@Crypto@Poco@@QAE@XZ)". [C:\BuildAgent3\work\c363d71bcecc6589\download\Crypto\Crypto_vs170.vcxproj] [11:33:15 ] OpenSSLInitializer.obj : error LNK2001: Nicht aufgel”stes externes Symbol "_OSSL_PROVIDER_load". [C:\BuildAgent3\work\c363d71bcecc6589\download\Crypto\Crypto_vs170.vcxproj] [11:33:15 ] RSACipherImpl.obj : error LNK2001: Nicht aufgel”stes externes Symbol "_EVP_PKEY_type". [C:\BuildAgent3\work\c363d71bcecc6589\download\Crypto\Crypto_vs170.vcxproj] [11:33:15 ] RSADigestEngine.obj : error LNK2001: Nicht aufgel”stes externes Symbol "_EVP_PKEY_type". [C:\BuildAgent3\work\c363d71bcecc6589\download\Crypto\Crypto_vs170.vcxproj]

Please add relevant environment information:

andrewauclair commented 3 weeks ago

Have you tried building with cmake?

Spaky commented 2 weeks ago

Have you tried building with cmake? Not yet, our build pipeline uses buildwin. I will try it locally, but i can take some time, because a lot stuff to do. Btw. 1.13.2 works,

seektechnz commented 1 week ago

+1 for this issue. I also have external symbols not found when building and statically linking with OpenSSL 3.4.0 compiled locally. Built on Windows 11 with Visual Studio 2022.