Qt statisch kompilieren -> undefined reference auf sqlite

Verschiedenes zu Qt
Antworten
PhilippM
Beiträge: 41
Registriert: 11. Dezember 2005 14:02
Wohnort: Darmstadt
Kontaktdaten:

Qt statisch kompilieren -> undefined reference auf sqlite

Beitrag von PhilippM »

Servus,

ich habe mir heute auf openSuSe 11.1 qt4.5.0 (dynamisch) übersetzt und installiert, und dann make confclean und den gleichen configure nochmal mit -static. Jetzt komm ich nach zwei Stunden wieder und muss feststellen, dass der kompilierungsvorgang mit einem Linkerfehler abgebrochen ist:

Code: Alles auswählen

Undefined reference "qt_plugin_instance_qsqlite()", 
referenced from: __Z26qt_plugin_instance_qsqlitev$non_lazy_ptr in main.o
collect2: ld returned 1 exit status
Ein erneutes cofnclean und anschließendes configure mit -static und -no-sql-sqlite führte leider (nach einer Stunde) zu dem gleichen Ergebnis.

Kollege auf dem Mac hat den gleichen Fehler:
Undefined symbols for architecture ppc:
"qt_plugin_instance_qsqlite()", referenced from:
__Z26qt_plugin_instance_qsqlitev$non_lazy_ptr in main.o
ld: symbol(s) not found for architecture ppc
collect2: ld returned 1 exit status
Lustigerweise aber mit Qt4.4.3 (!) während ich 4.5.0 verwende.

Kann irgendjemand sagen, wie ich qt statisch übersetzt bekomme?
www.vas-project.org
The Virtual Avionics Suite
for MSFS and X-Plane
Christian81
Beiträge: 7319
Registriert: 26. August 2004 14:11
Wohnort: Bremen
Kontaktdaten:

Beitrag von Christian81 »

Wo genau kommt der Fehler? In den Examples oder Demos?
MfG Christian

'Funktioniert nicht' ist keine Fehlerbeschreibung
PhilippM
Beiträge: 41
Registriert: 11. Dezember 2005 14:02
Wohnort: Darmstadt
Kontaktdaten:

Beitrag von PhilippM »

Nix examples, nix demos. Mein vollständiges configure lautet:

Code: Alles auswählen

./configure -v -static -largefile -qt-sql-driver-mysql -xmlpatterns -phonon -phonon-backend -svg -webkit -scripttools -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -openssl -system-nas-sound -glib -nomake examples -nomake demos
Wenn ich die auch noch mitkompilieren würde, käme ich locker über 2 Stunden auf einem 2,4Ghz Dualcore.

EDIT: Es kommt aus dem Assistant. Die volle Meldung lautet:

Code: Alles auswählen

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_CLUCENE_SUPPORT -DUSE_STATIC_SQLITE_PLUGIN -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../../../mkspecs/linux-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include/QtXml -I../../../../include/QtSql -I../../../../include/QtWebKit -I../../../../include -I../../../../include/QtHelp -I../../../shared/fontpanel -I.moc/release-static -I.uic/release-static -o .obj/release-static/qrc_assistant_images.o .rcc/release-static/qrc_assistant_images.cpp                                       
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o ../../../../bin/assistant .obj/release-static/fontpanel.o .obj/release-static/helpviewer.o .obj/release-static/main.o .obj/release-static/mainwindow.o .obj/release-static/indexwindow.o .obj/release-static/topicchooser.o .obj/release-static/contentwindow.o .obj/release-static/searchwidget.o .obj/release-static/preferencesdialog.o .obj/release-static/filternamedialog.o .obj/release-static/centralwidget.o .obj/release-static/installdialog.o .obj/release-static/bookmarkmanager.o .obj/release-static/remotecontrol.o .obj/release-static/cmdlineparser.o .obj/release-static/aboutdialog.o .obj/release-static/qtdocinstaller.o .obj/release-static/moc_fontpanel.o .obj/release-static/moc_helpviewer.o .obj/release-static/moc_mainwindow.o .obj/release-static/moc_indexwindow.o .obj/release-static/moc_topicchooser.o .obj/release-static/moc_contentwindow.o .obj/release-static/moc_searchwidget.o .obj/release-static/moc_preferencesdialog.o .obj/release-static/moc_filternamedialog.o .obj/release-static/moc_centralwidget.o .obj/release-static/moc_installdialog.o .obj/release-static/moc_bookmarkmanager.o .obj/release-static/moc_remotecontrol.o .obj/release-static/moc_aboutdialog.o .obj/release-static/moc_qtdocinstaller.o .obj/release-static/qrc_assistant.o .obj/release-static/qrc_assistant_images.o    -L/tmp/qt-x11-opensource-src-4.5.0/lib -L/tmp/qt-x11-opensource-src-4.5.0/plugins/sqldrivers -lQtHelp -L/tmp/qt-x11-opensource-src-4.5.0/lib -lQtCLucene -pthread -pthread -pthread-pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -L/usr/X11R6/lib -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -L/usr/local/Trolltech/Qt-4.5.0/plugins/sqldrivers -lqsqlite -lQtWebKit -lphonon -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -lQtDBus -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -lQtSql -pthread -pthread -lQtXml -pthread -pthread -lQtGui -laudio -lXt -pthread -lfreetype -lgobject-2.0 -lSM -lICE-pthread -pthread -lXrender -lfontconfig -lXext -lX11 -lQtNetwork -pthread -pthread -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -lpthread -ldl
.obj/release-static/main.o: In function `global constructors keyed to _Z27updateLastPagesOnUnregisterR15QHelpEngineCoreRK7QString':
main.cpp:(.text+0x9): undefined reference to `qt_plugin_instance_qsqlite()'
collect2: ld returned 1 exit status
make[4]: *** [../../../../bin/assistant] Fehler 1
make[4]: Leaving directory `/tmp/qt-x11-opensource-src-4.5.0/tools/assistant/tools/assistant'
www.vas-project.org
The Virtual Avionics Suite
for MSFS and X-Plane
PhilippM
Beiträge: 41
Registriert: 11. Dezember 2005 14:02
Wohnort: Darmstadt
Kontaktdaten:

Beitrag von PhilippM »

Manchmal kommen einem die besten Einsichten, wenn man sich mal anschaut, was man postet:

-L/usr/local/Trolltech/Qt-4.5.0/plugins/sqldrivers -lqsqlite

Das kann ja nicht gehen, das ist nämlich mein dynamisches Qt und da bibts nur eine libqsqlite.so keine libsqlite.a. Habe das Makefile von Hand angepasst, dass es im richtigen verzeichnis (da wo die .a liegt) sucht, und siehe da, es fluppt. Das muss aber ein qmake-Fehler sein, oder?
www.vas-project.org
The Virtual Avionics Suite
for MSFS and X-Plane
Christian81
Beiträge: 7319
Registriert: 26. August 2004 14:11
Wohnort: Bremen
Kontaktdaten:

Beitrag von Christian81 »

Sieht so aus - könnte sein dass qmake nicht absolut sondern einfach aus dem PATH benutzt wird. Aber das würde mich wundern.

Komisch.
MfG Christian

'Funktioniert nicht' ist keine Fehlerbeschreibung
PhilippM
Beiträge: 41
Registriert: 11. Dezember 2005 14:02
Wohnort: Darmstadt
Kontaktdaten:

Beitrag von PhilippM »

Hmpf. Ich hab zwar statische libs aber der qmake-build ist scheinbar voll in die Hose gegangen.
Gerade mal probiert:

/usr/local/Trolltech/Qt-4.5.0_static/bin/qmake -version
QMake version 2.01a
Using Qt version 4.5.0 in /usr/local/Trolltech/Qt-4.5.0/lib

Schöne scheiße. Dabei liegen /usr/local/Trolltech/Qt-4.5.0_static/lib die gewünschten .a libs.
Ich könnt kotzen. Wieder ein zwei stunden-Kompilevorgang für'n Arsch - meine CPU läuft bald flüssig unten aus'm Notebook raus.
www.vas-project.org
The Virtual Avionics Suite
for MSFS and X-Plane
Antworten