Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20610

WIN64: 'multiple definition of `qmime_secondsBetweenChecks'' and '"int qmime_secondsBetweenChecks" ... already defined in mimeprovider.obj' errors for static builds on Windows

    XMLWordPrintable

Details

    Description

      Hello, everyone,

      Got errors for QtCreator builds using mingw-w64:

      cd utils\ && ( if not exist Makefile C:\libQT-5.12-dev\GCC64RT\bin\qmake.exe -o Makefile C:\QTCREATOR-4.8.0-dev\build\src\libs\utils\utils.pro "CONFIG-=precompile_header" "QTC_PREFIX=C:\QTCREATOR-4.8.0-dev\build\..\GCC64RT" ) && mingw32-make -f Makefile
      mingw32-make[3]: Entering directory 'c:/QTCREATOR-4.8.0-dev/build/src/libs/utils'
      mingw32-make -f Makefile.Release
      mingw32-make[4]: Entering directory 'c:/QTCREATOR-4.8.0-dev/build/src/libs/utils'
      g++ -Wl,-s -shared -mthreads -static -Wl,--gc-sections -Wl,-subsystem,windows -Wl,--out-implib,C:\QTCREATOR-4.8.0-dev\build\lib\qtcreator\libUtils4.a -o ..\..\..\lib\qtcreator\Utils4.dll object_script.Utils.Release  -LC:\QTCREATOR-4.8.0-dev\build\lib\qtcreator -LC:\QTCREATOR-4.8.0-dev\build\lib\qtcreator\plugins -LC:\libQT-5.12-dev\GCC64RT\plugins\styles C:\libQT-5.12-dev\GCC64RT\plugins\styles\libqwindowsvistastyle.a -LC:\libQT-5.12-dev\GCC64RT\lib -LC:\libICU-62.0-dev\GCC64RT\lib -LC:\libQT-5.12-dev\GCC64RT\plugins\platforms C:\libQT-5.12-dev\GCC64RT\plugins\platforms\libqwindows.a -lwinspool -lshlwapi C:\libQT-5.12-dev\GCC64RT\lib\libQt5EventDispatcherSupport.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5FontDatabaseSupport.a C:\libQT-5.12-dev\GCC64RT\lib\libqtfreetype.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5ThemeSupport.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5AccessibilitySupport.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5VulkanSupport.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5WindowsUIAutomationSupport.a -LC:\libQT-5.12-dev\GCC64RT\plugins\imageformats C:\libQT-5.12-dev\GCC64RT\plugins\imageformats\libqgif.a C:\libQT-5.12-dev\GCC64RT\plugins\imageformats\libqicns.a C:\libQT-5.12-dev\GCC64RT\plugins\imageformats\libqico.a C:\libQT-5.12-dev\GCC64RT\plugins\imageformats\libqjpeg.a C:\libQT-5.12-dev\GCC64RT\plugins\imageformats\libqtga.a C:\libQT-5.12-dev\GCC64RT\plugins\imageformats\libqtiff.a C:\libQT-5.12-dev\GCC64RT\plugins\imageformats\libqwbmp.a C:\libQT-5.12-dev\GCC64RT\plugins\imageformats\libqwebp.a -LC:\libQT-5.12-dev\GCC64RT\plugins\qmltooling C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_debugger.a -LC:\libOPENSSL-1.1.1-dev\GCC64RT\lib C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_inspector.a C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_local.a C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_messages.a C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_native.a C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_nativedebugger.a C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_profiler.a C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_quickprofiler.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5Quick.a C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_server.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5PacketProtocol.a C:\libQT-5.12-dev\GCC64RT\plugins\qmltooling\libqmldbg_tcp.a -LC:\libQT-5.12-dev\GCC64RT\plugins\bearer C:\libQT-5.12-dev\GCC64RT\plugins\bearer\libqgenericbearer.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5Widgets.a -luxtheme -ldwmapi C:\libQT-5.12-dev\GCC64RT\lib\libQt5Gui.a -lgdi32 -lcomdlg32 -loleaut32 -limm32 C:\libQT-5.12-dev\GCC64RT\lib\libqtlibpng.a C:\libQT-5.12-dev\GCC64RT\lib\libqtharfbuzz.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5Concurrent.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5Qml.a C:\libQT-5.12-dev\GCC64RT\lib\libQt5Network.a -ldnsapi -liphlpapi C:\libOPENSSL-1.1.1-dev\GCC64RT\lib\libssl.a C:\libOPENSSL-1.1.1-dev\GCC64RT\lib\libcrypto.a -lcrypt32 C:\libQT-5.12-dev\GCC64RT\lib\libQt5Core.a -lmpr -lnetapi32 -luserenv -lversion -lws2_32 -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lwinmm -lz -lsicuin -lsicuuc -lsicudt C:\libQT-5.12-dev\GCC64RT\lib\libqtpcre2.a release\Utils_resource_res.o
      C:\libQT-5.12-dev\GCC64RT\lib\libQt5Core.a(qmimedatabase.o):qmimedatabase.cpp:(.data$qmime_secondsBetweenChecks+0x0): multiple definition of `qmime_secondsBetweenChecks'
      ./release\mimeprovider.o:mimeprovider.cpp:(.data$qmime_secondsBetweenChecks+0x0): first defined here
      collect2.exe: error: ld returned 1 exit status
      mingw32-make[4]: *** [Makefile.Release:635: ..\..\..\lib\qtcreator\Utils4.dll] Error 1
      mingw32-make[4]: Leaving directory 'c:/QTCREATOR-4.8.0-dev/build/src/libs/utils'
      mingw32-make[3]: *** [Makefile:36: release] Error 2
      mingw32-make[3]: Leaving directory 'c:/QTCREATOR-4.8.0-dev/build/src/libs/utils'
      mingw32-make[2]: *** [Makefile:107: sub-utils-make_first] Error 2
      mingw32-make[2]: Leaving directory 'c:/QTCREATOR-4.8.0-dev/build/src/libs'
      mingw32-make[1]: *** [Makefile:46: sub-libs-make_first-ordered] Error 2
      mingw32-make[1]: Leaving directory 'c:/QTCREATOR-4.8.0-dev/build/src'
      mingw32-make: *** [Makefile:42: sub-src-make_first-ordered] Error 2
      

      and MSVC:

              cd src\ && ( if not exist Makefile C:\libQT-5.12-dev\MSVC64RT\bin\qmake.exe -o Makefile C:\QTCREATOR-4.8.0-dev\build\src\src.pro "CONFIG-=precompile_header" "QTC_PREFIX=C:\QTCREATOR-4.8.0-dev\build\..\MSVC64RT" ) && C:\Windows\jom.exe -f Makefile
              cd libs\ && ( if not exist Makefile C:\libQT-5.12-dev\MSVC64RT\bin\qmake.exe -o Makefile C:\QTCREATOR-4.8.0-dev\build\src\libs\libs.pro "CONFIG-=precompile_header" "QTC_PREFIX=C:\QTCREATOR-4.8.0-dev\build\..\MSVC64RT" ) && C:\Windows\jom.exe -f Makefile
              cd aggregation\ && ( if not exist Makefile C:\libQT-5.12-dev\MSVC64RT\bin\qmake.exe -o Makefile C:\QTCREATOR-4.8.0-dev\build\src\libs\aggregation\aggregation.pro "CONFIG-=precompile_header" "QTC_PREFIX=C:\QTCREATOR-4.8.0-dev\build\..\MSVC64RT" ) && C:\Windows\jom.exe -f Makefile
              C:\Windows\jom.exe -f Makefile.Release
              cd utils\ && ( if not exist Makefile C:\libQT-5.12-dev\MSVC64RT\bin\qmake.exe -o Makefile C:\QTCREATOR-4.8.0-dev\build\src\libs\utils\utils.pro "CONFIG-=precompile_header" "QTC_PREFIX=C:\QTCREATOR-4.8.0-dev\build\..\MSVC64RT" ) && C:\Windows\jom.exe -f Makefile
              C:\Windows\jom.exe -f Makefile.Release
              link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:4.7 /MANIFEST:embed /OUT:..\..\..\lib\qtcreator\Utils4.dll @C:\Users\test\AppData\Local\Temp\Utils4.dll.8536.156.jom
      Qt5Core.lib(qmimedatabase.obj) : error LNK2005: "int qmime_secondsBetweenChecks" (?qmime_secondsBetweenChecks@@3HA) already defined in mimeprovider.obj
         Creating library ..\..\..\lib\qtcreator\Utils4.lib and object ..\..\..\lib\qtcreator\Utils4.exp
      ..\..\..\lib\qtcreator\Utils4.dll : fatal error LNK1169: one or more multiply defined symbols found
      jom: C:\QTCREATOR-4.8.0-dev\build\src\libs\utils\Makefile.Release [..\..\..\lib\qtcreator\Utils4.dll] Error 1169
      jom: C:\QTCREATOR-4.8.0-dev\build\src\libs\utils\Makefile [release] Error 2
      jom: C:\QTCREATOR-4.8.0-dev\build\src\libs\Makefile [sub-utils-make_first] Error 2
      jom: C:\QTCREATOR-4.8.0-dev\build\src\Makefile [sub-libs-make_first-ordered] Error 2
      jom: C:\QTCREATOR-4.8.0-dev\build\Makefile [sub-src-make_first-ordered] Error 2
      

       

      Reproduced for:

      • static builds,

      not reproduced for:

      • shared builds.

       

      Best,

      Alexander

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              con Eike Ziller
              sav sav
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes