T172: libssh 0.8.7 failed to build in debug mode with openssl 1.1.1c
Description
Originally reported by prashanttekriwal: https://bugs.libssh.org/T172
Hi,
Like most others, we are also moving to using openssl 1.1.1c from openssl 1.0.2r.
Earlier we built libssh 0.8.7 with openssl 1.0.2r in both Release and Debug mode and both builds went fine.
Now, when I am trying to build libssh 0.8.7 with openssl 1.1.1c in both Release and Debug mode.
The build in Release mode is working fine, but the build in Debug mode is failing with below errors:
ssh_shared.dir\Debug/threads/libcrypto.c.obj ssh_shared.dir\Debug/libcrypto.c.obj Creating library G:/ade/build/sb_0-35664428-1567067961.49/libssh-0.8.7-export-15231674/libssh-0.8.7/debug/src/Debug/ssh.lib and object G:/ade/build/sb_0-35664428-1567067961.49/libssh-0.8.7-export-15231674/libssh-0.8.7/debug/src/Debug/ssh.exp pki_crypto.obj : error LNK2019: unresolved external symbol ECDSA_SIG_get0 referenced in function pki_signature_to_blob [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol ECDSA_SIG_set0 referenced in function pki_signature_from_blob [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol RSA_set0_key referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol RSA_set0_factors referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol RSA_set0_crt_params referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol RSA_get0_key referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol RSA_get0_factors referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol RSA_get0_crt_params referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol DSA_SIG_get0 referenced in function pki_dsa_signature_to_blob [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol DSA_SIG_set0 referenced in function pki_signature_from_blob [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol DSA_get0_pqg referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol DSA_set0_pqg referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol DSA_get0_key referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] pki_crypto.obj : error LNK2019: unresolved external symbol DSA_set0_key referenced in function pki_key_dup [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] libcrypto.c.obj : error LNK2019: unresolved external symbol OPENSSL_init_crypto referenced in function ssh_crypto_init [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] libcrypto.c.obj : error LNK2019: unresolved external symbol EVP_MD_CTX_new referenced in function md5_init [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] libcrypto.c.obj : error LNK2019: unresolved external symbol EVP_MD_CTX_reset referenced in function md5_init [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] libcrypto.c.obj : error LNK2019: unresolved external symbol EVP_MD_CTX_free referenced in function md5_init [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] libcrypto.c.obj : error LNK2019: unresolved external symbol EVP_CIPHER_CTX_reset referenced in function evp_cipher_init [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] libcrypto.c.obj : error LNK2019: unresolved external symbol HMAC_CTX_new referenced in function hmac_init [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] libcrypto.c.obj : error LNK2019: unresolved external symbol HMAC_CTX_reset referenced in function hmac_init [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] libcrypto.c.obj : error LNK2019: unresolved external symbol HMAC_CTX_free referenced in function hmac_init [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\Debug\ssh.dll : fatal error LNK1120: 22 unresolved externals [G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj] Done Building Project "G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\src\ssh_shared.vcxproj" (default targets) -- FAILED. Done Building Project "G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\examples\exec.vcxproj" (default targets) -- FAILED. Done Building Project "G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\ALL_BUILD.vcxproj" (default targets) -- FAILED. Done Building Project "G:\ade\build\sb_0-35664428-1567067961.49\libssh-0.8.7-export-15231674\libssh-0.8.7\debug\INSTALL.vcxproj" (default targets) -- FAILED.
Build FAILED.
Can you please let me know what's the issue and how it can be fixed?
Comments:
Jakuje commented on 2019-09-13 10:04:02 UTC:
Did you try the latest libssh 0.9 [1]. Not sure what went wrong with the old version, but the windows builds are part of CI and they should work in recent version
[1] https://www.libssh.org/2019/06/28/libssh-0-9-0/
Jakuje commented on 2020-04-16 10:12:37 UTC:
Looks like the CI is running VS2017, which has still openssl 1.0.2. Would be nice to run against something supported.