PhilippM
19th April 2011, 09:58
Hi folks,
I need two custom local installations of Qt to build 32bit and 64bit applications on Linux. The Linux distribution itself is 64bit.
I compiled the 32bit QT as follows:
./configure -prefix /usr/local/Trolltech/Qt-4.7.2-32/ -opensource -fast -qt-sql-sqlite -no-qt3support -no-script -no-scripttools -no-declarative -no-declarative-debug -qt-libpng -qt-libtiff -qt-libjpeg -nomake demos -nomake examples -fontconfig -platform linux-g++-32 -silent
and the 64bit as follows:
./configure -prefix /usr/local/Trolltech/Qt-4.7.2-64/ -opensource -fast -qt-sql-sqlite -qt-sql-mysql -no-qt3support -no-script -no-scripttools -no-declarative -no-declarative-debug -qt-libpng -qt-libtiff -qt-libjpeg -nomake demos -nomake examples -fontconfig -platform linux-g++-64 -silent
The 32bit Qt works as expected and builds everything with -m32 option and links against /usr/lib so 32bit applications build flawlessly.
However, when using the 64bit qmake, it builds with -m64 as expected, but the linker path is not added -L/usr/lib64 and hence, when it tries to link pthread, this fails because libpthread.a in /usr/lib is of 32bit architecture. Only when I manually add -L/usr/lib64 to the Makefile, the build suceeds.
I sense an error in the makespecs.
Q1: How do I fix this in this installation? Edit mkspecs/linux-g++-64/ manually?
Q2: Why did this happen in the first place? Did I configure something wrong?
Philipp
I need two custom local installations of Qt to build 32bit and 64bit applications on Linux. The Linux distribution itself is 64bit.
I compiled the 32bit QT as follows:
./configure -prefix /usr/local/Trolltech/Qt-4.7.2-32/ -opensource -fast -qt-sql-sqlite -no-qt3support -no-script -no-scripttools -no-declarative -no-declarative-debug -qt-libpng -qt-libtiff -qt-libjpeg -nomake demos -nomake examples -fontconfig -platform linux-g++-32 -silent
and the 64bit as follows:
./configure -prefix /usr/local/Trolltech/Qt-4.7.2-64/ -opensource -fast -qt-sql-sqlite -qt-sql-mysql -no-qt3support -no-script -no-scripttools -no-declarative -no-declarative-debug -qt-libpng -qt-libtiff -qt-libjpeg -nomake demos -nomake examples -fontconfig -platform linux-g++-64 -silent
The 32bit Qt works as expected and builds everything with -m32 option and links against /usr/lib so 32bit applications build flawlessly.
However, when using the 64bit qmake, it builds with -m64 as expected, but the linker path is not added -L/usr/lib64 and hence, when it tries to link pthread, this fails because libpthread.a in /usr/lib is of 32bit architecture. Only when I manually add -L/usr/lib64 to the Makefile, the build suceeds.
I sense an error in the makespecs.
Q1: How do I fix this in this installation? Edit mkspecs/linux-g++-64/ manually?
Q2: Why did this happen in the first place? Did I configure something wrong?
Philipp