Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1230

mingw-w64: 'undefined references to `QScriptValue' and 'undefined reference to `QLocalSocket' errors for Static builds on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 1.10.0
    • General
    • None
    •   * Windows 10 x64,
        * mingw-w64 x86_64 7.2.0,
         * Qt5-dev (6cbd3faac08da781fc219ef4268e2e83bb2a5f03),
         * QBS-dev (f553dc266756c830923ba659d7ff88266d213c4c).

    Description

      Hello everyone,

      For builds using mingw-w64 got errors:

      cd src\lib\corelib\ && ( if not exist Makefile c:\libQT-5.11-dev\GCC64RT\bin\qmake.exe -o Makefile c:\QTBS-1.10.0-dev\build\src\lib\corelib\corelib.pro "QBS_INSTALL_PREFIX=c:\QTBS-1.10.0-dev\build\..\GCC64RT" ) && mingw32-make -f Makefile
      mingw32-make[1]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      mingw32-make -f Makefile.Release
      mingw32-make[2]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      mingw32-make[2]: Nothing to be done for 'first'.
      mingw32-make[2]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      mingw32-make[1]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      cd src\lib\qtprofilesetup\ && ( if not exist Makefile c:\libQT-5.11-dev\GCC64RT\bin\qmake.exe -o Makefile c:\QTBS-1.10.0-dev\build\src\lib\qtprofilesetup\qtprofilesetup.pro "QBS_INSTALL_PREFIX=c:\QTBS-1.10.0-dev\build\..\GCC64RT" ) && mingw32-make -f Makefile
      mingw32-make[1]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/qtprofilesetup'
      mingw32-make -f Makefile.Release
      mingw32-make[2]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/qtprofilesetup'
      mingw32-make[2]: Nothing to be done for 'first'.
      mingw32-make[2]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/qtprofilesetup'
      mingw32-make[1]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/qtprofilesetup'
      cd src\app\ && ( if not exist Makefile c:\libQT-5.11-dev\GCC64RT\bin\qmake.exe -o Makefile c:\QTBS-1.10.0-dev\build\src\app\app.pro "QBS_INSTALL_PREFIX=c:\QTBS-1.10.0-dev\build\..\GCC64RT" ) && mingw32-make -f Makefile
      mingw32-make[1]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/app'
      cd qbs\ && ( if not exist Makefile c:\libQT-5.11-dev\GCC64RT\bin\qmake.exe -o Makefile c:\QTBS-1.10.0-dev\build\src\app\qbs\qbs.pro "QBS_INSTALL_PREFIX=c:\QTBS-1.10.0-dev\build\..\GCC64RT" ) && mingw32-make -f Makefile
      mingw32-make[2]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/app/qbs'
      mingw32-make -f Makefile.Release
      mingw32-make[3]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/app/qbs'
      g++ -Wl,-s -Wl,-subsystem,console -static -mthreads -o ..\..\..\bin\qbs.exe object_script.qbs.Release  -Lc:\QTBS-1.10.0-dev\build\lib -lqbscore -Lc:\libQT-5.11-dev\GCC64RT\lib c:\libQT-5.11-dev\GCC64RT\lib\libQt5Script.a -Lc:\libICU-59.1\GCC64RT\lib c:\libQT-5.11-dev\GCC64RT\lib\libQt5Core.a -lmpr -lnetapi32 -luserenv -lversion -lws2_32 -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lwinmm -lz -lsicuin -lsicuuc c:\libICU-59.1\GCC64RT\lib\sicudt.a c:\libQT-5.11-dev\GCC64RT\lib\libqtpcre2.a
      c:\QTBS-1.10.0-dev\build\lib\libqbscore.a(runenvironment.o):runenvironment.cpp:(.text+0x197a): undefined reference to `QDomDocument::QDomDocument()'
      c:\QTBS-1.10.0-dev\build\lib\libqbscore.a(runenvironment.o):runenvironment.cpp:(.text+0x1a83): undefined reference to `QDomDocument::setContent(QByteArray const&, QString*, int*, int*)'
      
      <snip>
      
      c:\QTBS-1.10.0-dev\build\lib\libqbscore.a(jscommandexecutor.o):jscommandexecutor.cpp:(.text$_ZN3qbs8Internal29JsCommandExecutorThreadObject7doStartEPKNS0_17JavaScriptCommandEPNS0_11TransformerE[_ZN3qbs8Internal29JsCommandExecutorThreadObject7doStartEPKNS0_17JavaScriptCommandEPNS0_11TransformerE]+0xaa5): undefined reference to `QScriptValue::~QScriptValue()'
      c:\QTBS-1.10.0-dev\build\lib\libqbscore.a(jscommandexecutor.o):jscommandexecutor.cpp:(.text$_ZN3qbs8Internal29JsCommandExecutorThreadObject7doStartEPKNS0_17JavaScriptCommandEPNS0_11TransformerE[_ZN3qbs8Internal29JsCommandExecutorThreadObject7doStartEPKNS0_17JavaScriptCommandEPNS0_11TransformerE]+0xacc): more undefined references to `QScriptValue::~QScriptValue()' follow
      collect2.exe: error: ld returned 1 exit status
      mingw32-make[3]: *** [Makefile.Release:118: ..\..\..\bin\qbs.exe] Error 1
      mingw32-make[3]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/app/qbs'
      mingw32-make[2]: *** [Makefile:36: release] Error 2
      mingw32-make[2]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/app/qbs'
      mingw32-make[1]: *** [Makefile:48: sub-qbs-make_first] Error 2
      mingw32-make[1]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/app'
      mingw32-make: *** [Makefile:97: sub-src-app-make_first] Error 2

       

      which relate to Change #164413 (wherein similar Change #164472 has no such effect).

       

      If Change #164413 is reverted, next blocker appeared:

      c:\QTBS-1.10.0-dev\build>mingw32-make
      cd src\lib\corelib\ && ( if not exist Makefile c:\libQT-5.11-dev\GCC64RT\bin\qmake.exe -o Makefile c:\QTBS-1.10.0-dev\build\src\lib\corelib\corelib.pro "QBS_INSTALL_PREFIX=c:\QTBS-1.10.0-dev\build\..\GCC64RT" ) && mingw32-make -f Makefile
      mingw32-make[1]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      mingw32-make -f Makefile.Release
      mingw32-make[2]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      mingw32-make[2]: Nothing to be done for 'first'.
      mingw32-make[2]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      mingw32-make[1]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/corelib'
      cd src\lib\qtprofilesetup\ && ( if not exist Makefile c:\libQT-5.11-dev\GCC64RT\bin\qmake.exe -o Makefile c:\QTBS-1.10.0-dev\build\src\lib\qtprofilesetup\qtprofilesetup.pro "QBS_INSTALL_PREFIX=c:\QTBS-1.10.0-dev\build\..\GCC64RT" ) && mingw32-make -f Makefile
      mingw32-make[1]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/qtprofilesetup'
      mingw32-make -f Makefile.Release
      mingw32-make[2]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/lib/qtprofilesetup'
      mingw32-make[2]: Nothing to be done for 'first'.
      mingw32-make[2]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/qtprofilesetup'
      mingw32-make[1]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/lib/qtprofilesetup'
      cd src\app\ && ( if not exist Makefile c:\libQT-5.11-dev\GCC64RT\bin\qmake.exe -o Makefile c:\QTBS-1.10.0-dev\build\src\app\app.pro "QBS_INSTALL_PREFIX=c:\QTBS-1.10.0-dev\build\..\GCC64RT" ) && mingw32-make -f Makefile
      mingw32-make[1]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/app'
      cd qbs\ && ( if not exist Makefile c:\libQT-5.11-dev\GCC64RT\bin\qmake.exe -o Makefile c:\QTBS-1.10.0-dev\build\src\app\qbs\qbs.pro "QBS_INSTALL_PREFIX=c:\QTBS-1.10.0-dev\build\..\GCC64RT" ) && mingw32-make -f Makefile
      mingw32-make[2]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/app/qbs'
      mingw32-make -f Makefile.Release
      mingw32-make[3]: Entering directory 'c:/QTBS-1.10.0-dev/build/src/app/qbs'
      g++ -Wl,-s -Wl,-subsystem,console -static -mthreads -o ..\..\..\bin\qbs.exe object_script.qbs.Release  -Lc:\QTBS-1.10.0-dev\build\lib -lqbscore -Lc:\libQT-5.11-dev\GCC64RT\lib c:\libQT-5.11-dev\GCC64RT\lib\libQt5Script.a -Lc:\libICU-59.1\GCC64RT\lib c:\libQT-5.11-dev\GCC64RT\lib\libQt5Xml.a c:\libQT-5.11-dev\GCC64RT\lib\libQt5Core.a -lmpr -lnetapi32 -luserenv -lversion -lws2_32 -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lwinmm -lz -lsicuin -lsicuuc c:\libICU-59.1\GCC64RT\lib\sicudt.a c:\libQT-5.11-dev\GCC64RT\lib\libqtpcre2.a
      c:\QTBS-1.10.0-dev\build\lib\libqbscore.a(processutils.o):processutils.cpp:(.text+0x40): undefined reference to `GetModuleFileNameExW'
      c:\QTBS-1.10.0-dev\build\lib\libqbscore.a(launcherinterface.o):launcherinterface.cpp:(.text+0x20): undefined reference to `QLocalServer::close()'
      c:\QTBS-1.10.0-dev\build\lib\libqbscore.a(launcherinterface.o):launcherinterface.cpp:(.text+0x6e3): undefined reference to `QLocalServer::QLocalServer(QObject*)'
      
      <snip>
      
      c:\QTBS-1.10.0-dev\build\lib\libqbscore.a(launchersocket.o):launchersocket.cpp:(.rdata$.refptr._ZN12QLocalSocket16staticMetaObjectE[.refptr._ZN12QLocalSocket16staticMetaObjectE]+0x0): undefined reference to `QLocalSocket::staticMetaObject'
      c:\QTBS-1.10.0-dev\build\lib\libqbscore.a(launchersocket.o):launchersocket.cpp:(.rdata$.refptr._ZN12QLocalSocket5errorENS_16LocalSocketErrorE[.refptr._ZN12QLocalSocket5errorENS_16LocalSocketErrorE]+0x0): undefined reference to `QLocalSocket::error(QLocalSocket::LocalSocketError)'
      collect2.exe: error: ld returned 1 exit status
      mingw32-make[3]: *** [Makefile.Release:118: ..\..\..\bin\qbs.exe] Error 1
      mingw32-make[3]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/app/qbs'
      mingw32-make[2]: *** [Makefile:36: release] Error 2
      mingw32-make[2]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/app/qbs'
      mingw32-make[1]: *** [Makefile:48: sub-qbs-make_first] Error 2
      mingw32-make[1]: Leaving directory 'c:/QTBS-1.10.0-dev/build/src/app'
      mingw32-make: *** [Makefile:97: sub-src-app-make_first] Error 2

      which relate to Change #182036.

      Reproduced for:
        - QBS-dev builds using mingw-w64 with Static layout,

      not reproduced for:
        - QBS-dev builds using mingw-w64 with Shared layout,
        - QBS-dev builds using MSVC with Static layout.

      Best,

      Alexander

      Attachments

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

        Activity

          People

            sav sav
            sav sav
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes