Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
6.3.2
-
None
-
OS: Windows 10 version 21H2 build 19044.2006
CPU: AMD FX(tm)-8350 Eight-Core Processor
RAM: 32GB
GPU: NVIDIA GeForce RTX 2070 SUPER
Description
Hello!
I want to build Qt 6.3.2 with the following cmake batch command:
cmake.exe --trace-expand --trace-redirect=cmake.trace -DCMAKE_BUILD_TYPE=%qtBuildMode% -DBUILD_SHARED_LIBS=OFF -DQT_BUILD_EXAMPLES=OFF -DCMAKE_PREFIX_PATH="C:\\LLVM\\x64\\static debug" -DINPUT_static_runtime=ON -DFEATURE_ltcg=OFF -DBUILD_qtwebengine=OFF -DOPENSSL_ROOT_DIR="%qtBuildOpenSSLRootPath%" -DFEATURE_openssl_linked=ON -DOPENSSL_USE_STATIC_LIBS=TRUE -DOPENSSL_MSVC_STATIC_RT=TRUE -DINPUT_sql_mysql=ON -DMySQL_INCLUDE_DIR="%qtBuildMySqlIncludeDirsPath%" -DMySQL_LIBRARY="%qtBuildMySqlLibsPath%" -DCMAKE_INSTALL_PREFIX="%qtBuildPath%" -G Ninja %qtBuildSourcePath%
It fails at [4565/9239] Linking CXX executable qtbase\bin\assistant.exe
[4565/9239] Linking CXX executable qtbase\bin\assistant.exe FAILED: qtbase/bin/assistant.exe cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=qttools\src\assistant\assistant\CMakeFiles\assistant.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests – C:\PROGRA~2\MICROS~3\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\assistant.rsp /out:qtbase\bin\assistant.exe /implib:qttools\src\assistant\assistant\assistant.lib /pdb:qtbase\bin\assistant.pdb /version:0.0 /machine:x64 /debug /subsystem:windows -DYNAMICBASE -NXCOMPAT -LARGEADDRESSAWARE && cd ." LINK: command "C:\PROGRA~2\MICROS~3\2019\ENTERP~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\assistant.rsp /out:qtbase\bin\assistant.exe /implib:qttools\src\assistant\assistant\assistant.lib /pdb:qtbase\bin\assistant.pdb /version:0.0 /machine:x64 /debug /subsystem:windows -DYNAMICBASE -NXCOMPAT -LARGEADDRESSAWARE /MANIFEST /MANIFESTFILE:qtbase\bin\assistant.exe.manifest" failed (exit code 1120) with the following output: Qt6BundledZLIBd.lib(crc32.c.obj) : error LNK2005: crc32_combine_op already defined in mysqlclientMTd.lib(crc32.obj) Qt6BundledZLIBd.lib(crc32.c.obj) : error LNK2005: crc32_combine_gen already defined in mysqlclientMTd.lib(crc32.obj) Qt6BundledZLIBd.lib(crc32.c.obj) : error LNK2005: crc32_combine_gen64 already defined in mysqlclientMTd.lib(crc32.obj) Creating library qttools\src\assistant\assistant\assistant.lib and object qttools\src\assistant\assistant\assistant.exp mysqlclientMTd.lib(charset.obj) : error LNK2019: unresolved external symbol _std_init_once_link_alternate_names_and_abort referenced in function "void __cdecl std::call_once<void (cdecl&)(void)>(struct std::once_flag &,void (_cdecl&)(void))" (??$call_once@A6AXXZ$$V@std@@YAXAEAUonce_flag@0@A6AXXZ@Z) mysqlclientMTd.lib(my_malloc.obj) : error LNK2001: unresolved external symbol __std_init_once_link_alternate_names_and_abort qtbase\bin\assistant.exe : fatal error LNK1120: 1 unresolved externals [4574/9239] Automatic MOC for target OpcUa ninja: build stopped: subcommand failed. C:\QtBuild\qt-everywhere-src-6.3.2>
I think the issue is: Qt6BundledZLIBd.lib(crc32.c.obj) : error LNK2005: crc32_combine_op already defined in mysqlclientMTd.lib(crc32.obj)
I have added the cmake full trace and output:
Cmake output:
https://pastebin.com/raw/3enm8QNL
Full cmake trace:
https://mega.nz/file/pMpiWAQD#vEpp2MV2GymwuKcvtbPv8B1AQkrXsG0PZ_1_ildabzE
Any ideas how to fix this compilation issue? Thank you.
Attachments
Issue Links
- duplicates
-
QTBUG-104728 Bundled zlib collides with the latest zlib version in a static build
-
- Closed
-