Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
5.10
Description
I'm trying to build Qt 5.10 from source on Windows. I need to build it statically with openssl-linked. I used to run the following configure line on Qt 5.8 when I last built it from source:
configure -confirm-license -recheck -prefix c:\qt\5.8\msvc2015_5_8_static_32 -commercial -debug-and-release -static -static-runtime -skip qt3d -skip qtsensors -skip webengine -openssl-linked -I c:\openssl-lib\include -L c:\openssl-lib\lib OPENSSL_LIBS_DEBUG="libeay32MTd.lib ssleay32MTd.lib" OPENSSL_LIBS_RELEASE="libeay32MT.lib ssleay32MT.lib"
Initially I though this was a openssl version mismatch so I tried with openssl-1.0.2 and with openssl-1.1. The same problem. Fails to link when it gets to qmltestrunner
PAPBEJ@Z) Qt5Networkd.lib(qsslsocket_openssl_symbols.obj) : error LNK2019: unresolved external symbol _i2d_DHparams referenced in function "int __cdecl com_imaginando_qt_5_10_32::q_i2d_DHparams(struct dh_st *,unsigned char * *)" (?q_i2d_DHparams@com_imaginando_qt_5_10_32@@YAHPAUdh_st@@PAPAE@Z) Qt5Networkd.lib(qsslsocket_openssl_symbols.obj) : error LNK2019: unresolved external symbol _DH_get0_pqg referenced in function "void __cdecl com_imaginando_qt_5_10_32::q_DH_get0_pqg(struct dh_st const *,struct bignum_st const * *,struct bignum_st const * *,struct bignum_st const * *)" (?q_DH_get0_pqg@com_imaginando_qt_5_10_32@@YAXPBUdh_st@@PAPBUbignum_st@@11@Z) ..\..\bin\qmltestrunner.exe : fatal error LNK1120: 205 unresolved externals jom: C:\Qt\5.10.0\src\qtdeclarative\tools\qmltestrunner\Makefile.Debug [..\..\bin\qmltestrunner.exe] Error 1120
On Qt 5.8 configure used to say to set OPENSSL_LIBS_DEBUG and OPENSS_LIBS_RELEASE but now it says to use OPENSSL_LIBS instead so now I'm using this:
> set OPENSSL_LIBS='-L c:\openssl-lib-1.0.2\lib libeay32MTd.lib ssleay32MTd.lib' > configure -confirm-license -recheck -prefix c:\qt\5.10.0\msvc2015_5_10_0_static_32 -commercial -debug -static -static-runtime -nomake examples -nomake tools -nomake tests -opengl dynamic -openssl-linked -I c:\openssl-lib-1.0.2\include
I decided to give a look to the Makefile.debug that was being generated for the failing build and found that extra quotes are added to LIBPATH command on the Makefile, like this:
/LIBPATH:" c:\openssl-lib-1.0.2\lib libeay32MTd.lib ssleay32MTd.lib"
If I manually removed them, it compiles that single project but fails on the next one. I have also tried to do:
> set OPENSSL_LIBS=-L c:\openssl-lib-1.0.2\lib libeay32MTd.lib ssleay32MTd.lib
But like this, the LIBPATH command is not even placed on the Makefile
Attachments
Issue Links
- duplicates
-
QTBUG-62353 Static build qt 5.9.1 with openssl 1.0.2L
- Closed