problem building 32-bit app on 64-bit CentOS
-
I am using QtCreator 3.4.2 enterprise on CentOS 6.7. I have created a kit for Qt 4.7.5 using gcc 4.8.2 32-bit.
I get the following errors:
skipping incompatible /usr/lib64/libpthread.so when searching for -lpthread skipping incompatible /usr/lib64/libm.so when searching for -lm skipping incompatible /usr/lib64/libc.so when searching for -lc
This struck me as odd, because it's looking in a place for 64-bit libraries (/usr/lib64) in a 32-bit build. This is confirmed by looking at the actual link step issued from make:
g++
-m32
-Wl,-rpath,/builds/sprint/third_party/qt_unix/lib -o upload_csv_locations main.o CsvLocationFileLoader.o -L/builds/sprint/third_party/qt_unix/lib -L/media/NativeBuilds/sprint-creator/build-leads_all-Desktop_Qt_4_7_5_GCC_32bit-Debug/leads/Utilities/upload_csv_locations/../../../jmdb/Libraries/common/ -L/media/NativeBuilds/sprint-creator/leads_all/leads/Utilities/upload_csv_locations/../../../build/Debug/lib/ -lgeos-3.3.9 -L/media/NativeBuilds/sprint-creator/build-leads_all-Desktop_Qt_4_7_5_GCC_32bit-Debug/leads/Utilities/upload_csv_locations/../../../jmdb/Libraries/jmdbUtil/ -ljmdbUtil -L/media/NativeBuilds/sprint-creator/build-leads_all-Desktop_Qt_4_7_5_GCC_32bit-Debug/leads/Utilities/upload_csv_locations/../../../ips/Libraries/log/ -llog -L/media/NativeBuilds/sprint-creator/build-leads_all-Desktop_Qt_4_7_5_GCC_32bit-Debug/leads/Utilities/upload_csv_locations/../../../ips/Libraries/util/ -lutil -L/media/NativeBuilds/sprint-creator/build-leads_all-Desktop_Qt_4_7_5_GCC_32bit-Debug/leads/Utilities/upload_csv_locations/../../../ips/Libraries/geosUtil/ -L/media/NativeBuilds/sprint-creator/leads_all/leads/Utilities/upload_csv_locations/../../../../../../../builds/sprint-creator/leads_all/build/Debug/lib/ -lbotan-1.8.2 -lcommon -L/media/NativeBuilds/sprint-creator/build-leads_all-Desktop_Qt_4_7_5_GCC_32bit-Debug/leads/Utilities/upload_csv_locations/../../../ips/Libraries/snmp/ -lsnmp -L/media/NativeBuilds/sprint-creator/build-leads_all-Desktop_Qt_4_7_5_GCC_32bit-Debug/leads/Utilities/upload_csv_locations/../../../ips/Libraries/timeutil/ -ltimeutil -lgeosUtil -lnetsnmp.30 -lssl.0.9.8 -lcrypto.0.9.8 -lQtSql -L/builds/sprint/third_party/qt_unix/../zlib/lib -L/builds/sprint/third_party/qt_unix/../libpng/lib -L/builds/sprint/third_party/qt_unix/../postgresql/lib -L/builds/sprint/third_party/qt_unix/../oracle -L/builds/sprint/third_party/qt_unix/../libtiff/lib -L/builds/sprint/third_party/qt_unix/../openssl/out/lib -L/media/NativeBuilds/sprint/third_party/qt_unix/lib-L/usr/lib64
-lpq -lclntsh -lnnz10 -lQtNetwork -lQtCore -lpthreadAnyone have any ideas why it is trying to use
-L/usr/lib64
in a 32-bit link?(Since originally posting, I have discovered that my program successfully builds; I just get warnings that QtCreator shows as errors. But, my original question still stands: why did qmake generate
-L/usr/lib64
in a Makefile for a 32-bit link?) -
I already have those packages installed. As I mentioned in a comment I added at the end of the original posting, it turns out these are not errors, just warnings. But my original question still stands: why is
-L/usr/lib64
being added by qmake when it knows this is a 32-bit build?I don't suppose there's a way to get creator to not treat those messages as errors? I don't think there's enough context for it to know that they're not errors.
-
Hi and welcome to devnet,
How did you build Qt 4.7.5 ?
-
Qt 4.7.5 was built for 32-bit release.
-
What options were used ?
-
Here's the
configure
call that was used before building Qt:./configure -prefix `pwd` -qt-gif -qt-libjpeg -system-zlib -system-libpng -qt-libmng -cups -stl \ -I`pwd`/../zlib/include -I`pwd`/../libpng/include -L`pwd`/../zlib/lib -L`pwd`/../libpng/lib \ -qt-sql-oci -qt-sql-psql -I`pwd`/../postgresql/include -I`pwd`/../oracle/x64/sdk/include \ -L`pwd`/../postgresql/lib -L`pwd`/../oracle/x64 -system-libtiff -openssl \ -I`pwd`/../libtiff/include -I`pwd`/../openssl/out/include -L`pwd`/../libtiff/lib \ -L`pwd`/../openssl/out/lib -no-qt3support -fast -nomake examples \ -nomake demos -nomake docs -nomake translations -commercial
-
Something's strange here, if it's a 32 bit build, why are you giving path to oracle 64bit sdk ?
-
I copied from the wrong place in our main Makefile; the configure step above was for 64-bit builds. The 32-bit build
configure
for CentOS 6 is as follows:./configure -prefix `pwd` -v -platform linux-g++-32 -qt-gif -qt-libjpeg -system-zlib -qt-libmng -cups -stl \ -I`pwd`/../zlib/include -I`pwd`/../libpng/include -L`pwd`/../zlib/lib -L`pwd`/../libpng/lib -qt-sql-oci -qt-sql-psql \ -I`pwd`/../postgresql/include -I`pwd`/../oracle/sdk/include -L`pwd`/../postgresql/lib -L`pwd`/../oracle \ -system-libtiff -openssl -I`pwd`/../libtiff/include -I`pwd`/../openssl/out/include -L`pwd`/../libtiff/lib \ -L`pwd`/../openssl/out/lib -no-qt3support -fast -nomake examples \ -nomake demos -nomake docs -nomake translations -commercial
-
@Karen-Morrissey
I think because when you did ./configure to look for needed libraries, it first found those in /usr/lib64.Why not to force the configure to use those for 32bit by adding
-L /path/to/lib/32bit -lpthread -lm -lc
to your configure command