-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt 4.8.4 static link failure #23
Comments
Thanks for issue. I don't test Qt4 static build yet because no time for it now. I try to resolve this but some later. |
I'm interested in a static build including webkit, that's why I tried the old 4.8.4. Since I'm really no Qt expert at all, I wasn't sure how to resolve the issue the best way. But if you point me to the best place, I can for example try to create a patch to remove one of the two definitions, and create a pull request for it on GitHub. Edit:
|
Qt 4.8.4 seems to have been built properly with the manual patch. cd src/lib/ && c:/qtsdk/Qt-Build/toolchains/mingw64/bin/mingw32-make -f Makefile release |
I think QBS cannot be build with static Qt. It try to link with shared Qt libraries. |
I don't really know what QBS is, but assuming it is linked to QtCreator, then I don't need it. The Qt 4.8.4 static build doesn't have webkit as well. How would I go about trying to build it? Unfortunately I can't find a simple option to enable it in scenarios/qt-4.8.4.sh |
QBS is build tool. Now it on beta stage. It does't need for building QtCreator. |
work/logs-x64-s/qt-4.8.4-built.log |
It is not full log because you restart building after some hand made changes. I think some goes wrong when configure Webkit. You need to do new build of Qt to have full log. |
Pastebin.com doesn't like 10mb log files, so I tried Gist: Error when building my application: |
Build log is truncated on gist. Compress it and email to [email protected] |
Ok. On configure.log you can see message: WARNING: Using static linking will disable the WebKit module. Static Qt4 cannot be build with webkit. |
So is this message directly coming from Qt configure, which disallows statically building WebKit, or is it a protection coming from Qt-Builds? Well it was worth a try. Maybe Qt5.1 or some future version will finally allow statically building WebKit. |
This message from Qt configure. |
I haven't succeeded in getting webkit statically built with Qt 5.0.2: Even though I can't find a similar restrictive message in the configure log. Anyway, I'll try a 4.8.4 shared build to see if I can just remove the double-definition of `qt_sendSpontaneousEvent(QObject_, QEvent_)' there as well. If it works, I'll try to prepare a git pull request for you. Thanks for all the help. |
Ok try it but I haven't see this issue when I do shared Qt4 build. |
I executed "./buildall x64 --qt-version=4.8.4 --static-qt" and eventually ran into a problem with QT violating the multiple definition rule:
multiple definition of `qt_sendSpontaneousEvent(QObject_, QEvent_)'
defined at c:\qtsdk\Qt-build\work\build-x64-s\qt-4.8.4\src\gui/kernel/qapplication.cpp:5559
and c:\qtsdk\Qt-build\work\build-x64-s\qt-4.8.4\src\activeqt\control/qaxserverbase.cpp:4041
Would it be possible to somehow create a patch to circumvent that problem? Or not build tools/activeqt/testcon ?
Full log of the relevant part:
c:/qtsdk/Qt-build/toolchains/mingw64/bin/mingw32-make -f Makefile.Debug all
c:/qtsdk/Qt-build/toolchains/mingw64/bin/mingw32-make -f Makefile.Release all
mingw32-make[4]: Entering directory 'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/tools/activeqt/testcon'
g++ -mthreads -Wl,-subsystem,windows -o debug/testcon.exe object_script.testcon.Debug -L'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/lib' -L'c:/qtsdk/Qt-build/toolchains/mingw64/x86_64-w64-mingw32/lib' -L'c:/QtSDK/ported64-s/lib' -L'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/lib' -lQAxServerd tmp/obj/debug_static/testcon_res.o -lQAxContainerd -lQtGuid -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCored -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -Lc:/QtSDK/ported64-s/lib -Lc:/qtsdk/Qt-build/toolchains/mingw64/x86_64-w64-mingw32/lib
mingw32-make[4]: Entering directory 'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/tools/activeqt/testcon'
g++ -Wl,-s -mthreads -Wl,-subsystem,windows -o release/testcon.exe object_script.testcon.Release -L'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/lib' -L'c:/qtsdk/Qt-build/toolchains/mingw64/x86_64-w64-mingw32/lib' -L'c:/QtSDK/ported64-s/lib' -L'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/lib' -lQAxServer tmp/obj/release_static/testcon_res.o -lQAxContainer -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -Lc:/QtSDK/ported64-s/lib -Lc:/qtsdk/Qt-build/toolchains/mingw64/x86_64-w64-mingw32/lib
c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/lib/libQtGui.a(qapplication.o):qapplication.cpp:(.text+0x1630): multiple definition of
qt_sendSpontaneousEvent(QObject*, QEvent*)' c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/lib/libQAxServer.a(qaxserverbase.o):qaxserverbase.cpp:(.text+0x34f0): first defined here collect2.exe: error: ld returned 1 exit status Makefile.Release:97: recipe for target 'release/testcon.exe' failed mingw32-make[4]: *** [release/testcon.exe] Error 1 mingw32-make[4]: Leaving directory 'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/tools/activeqt/testcon' Makefile:56: recipe for target 'release-all' failed mingw32-make[3]: *** [release-all] Error 2 mingw32-make[3]: *** Waiting for unfinished jobs.... c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/lib/libQtGuid.a(qapplication.o): In function
qt_sendSpontaneousEvent(QObject_, QEvent_)':c:\qtsdk\Qt-build\work\build-x64-s\qt-4.8.4\src\gui/kernel/qapplication.cpp:5559: multiple definition of `qt_sendSpontaneousEvent(QObject_, QEvent_)'
c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/lib/libQAxServerd.a(qaxserverbase.o):c:\qtsdk\Qt-build\work\build-x64-s\qt-4.8.4\src\activeqt\control/qaxserverbase.cpp:4041: first defined here
collect2.exe: error: ld returned 1 exit status
Makefile.Debug:97: recipe for target 'debug/testcon.exe' failed
mingw32-make[4]: *** [debug/testcon.exe] Error 1
mingw32-make[4]: Leaving directory 'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/tools/activeqt/testcon'
Makefile:40: recipe for target 'debug-all' failed
mingw32-make[3]: *** [debug-all] Error 2
mingw32-make[3]: Leaving directory 'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/tools/activeqt/testcon'
Makefile:113: recipe for target 'sub-testcon-make_default-ordered' failed
mingw32-make[2]: *** [sub-testcon-make_default-ordered] Error 2
mingw32-make[2]: Leaving directory 'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/tools/activeqt'
Makefile:267: recipe for target 'sub-activeqt-make_default-ordered' failed
mingw32-make[1]: *** [sub-activeqt-make_default-ordered] Error 2
mingw32-make[1]: Leaving directory 'c:/qtsdk/Qt-build/work/build-x64-s/qt-4.8.4/tools'
makefile:928: recipe for target 'sub-tools-make_default-ordered' failed
mingw32-make: *** [sub-tools-make_default-ordered] Error 2
The text was updated successfully, but these errors were encountered: