[PyQt] Compiling PyQt4 with $ORIGIN

Chris Hills chaz at chaz6.com
Wed Jul 15 12:55:19 BST 2009


In $QTDIR/mkspecs/common/g++.conf I have the following line:-

QMAKE_RPATH = -Wl,-enable-new-dtags 
-Wl,-rpath,\\\$$$$ORIGIN:\\\$$$$ORIGIN/../lib:/usr/local/Trolltech/Qt-4.5.2/lib 
-Wl,-rpath,

This works fine when compiling regular C++ applications, and results in 
binaries/libraries that have "$ORIGIN:$ORIGIN/../lib:[..]" in the RPATH 
and RUNPATH entries. However, when compiling PyQt4, it seems to get 
mangled and thus does not get applied properly. After running `python 
configure.py && make` the following excerpt can be observed (and happens 
for every library that is linked):-

g++ -shared -Wl,-O1 "-Wl,-enable-new-dtags -Wl,-rpath,\\\ 
-Wl,-rpath,/usr/local/Trolltech/Qt-4.5.2/lib" 
-Wl,--version-script=QtSql.exp -o QtSql.so sipQtSqlcmodule.o 
sipQtSqlQVector.o sipQtSqlQSqlResult.o sipQtSqlQSqlTableModel.o 
sipQtSqlQSqlRelationalTableModel.o sipQtSqlQSqlRelation.o 
sipQtSqlQSqlRelationalDelegate.o sipQtSqlQSqlQueryModel.o 
sipQtSqlQSqlQuery.o sipQtSqlQSqlRecord.o sipQtSqlQSqlIndex.o 
sipQtSqlQSqlField.o sipQtSqlQSqlError.o sipQtSqlQSqlDriver.o 
sipQtSqlQSqlDatabase.o sipQtSqlQSqlDriverCreatorBase.o 
sipQtSqlQSqlParamType.o sipQtSqlQSql.o 
-L/usr/local/Trolltech/Qt-4.5.2/lib -L/usr/X11R6/lib -lQtSql 
-L/usr/local/Trolltech/Qt-4.5.2/lib -rdynamic -L/usr/lib/mysql 
-lmysqlclient_r -lcrypt -lnsl -lQtCore 
-L/usr/local/Trolltech/Qt-4.5.2/lib -lz -lm -pthread 
-L/home/chaz/Libraries/glib/2.18.4/lib -lgthread-2.0 -lrt -lglib-2.0 
-lpthread -ldl -lQtGui -L/usr/local/Trolltech/Qt-4.5.2/lib 
-L/usr/X11R6/lib -pthread -L/home/chaz/Libraries/glib/2.18.4/lib -lpng 
-lfreetype -lgobject-2.0 -lSM -lICE -lQtCore 
-L/usr/local/Trolltech/Qt-4.5.2/lib -lz -pthread -lgthread-2.0 -lrt 
-lglib-2.0 -lpthread -lXrender -lfontconfig -lXext -lX11 -lm -ldl 
-lQtCore -L/usr/local/Trolltech/Qt-4.5.2/lib -lz -lm -pthread 
-L/home/chaz/Libraries/glib/2.18.4/lib -lgthread-2.0 -lrt -lglib-2.0 
-lpthread -ldl -lXext -lX11 -lm -lpthread
/usr/bin/ld: warning: cannot find entry symbol nable-new-dtags -Wl; 
defaulting to 0000c800



More information about the PyQt mailing list