Ask questions about the cross compiler of Qt4.7.1
-
First ,my qws/linux-arm-g++/qmake.conf is modifyed to the cross-compiler path__
QMAKE_CC = /usr/local/cross_compiler/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc
QMAKE_CXX = /usr/local/cross_compiler/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK = /usr/local/cross_compiler/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++
QMAKE_LINK_SHLIB=/usr/local/cross_compiler/arm-fsl-linux-gnueabi/bin/arm-none-linux-gnueabi-g++**if CC is set to arm-none-linux-gnueabi-gcc,then when #make,it will give the following error message:__
../bootstrap/libbootstrap.a: could not readsymbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [../../../bin/moc] Error 1
make[1]: Leaving directory `/home/itt/qt-4.7.1-arm/src/tools/moc'
make: *** [sub-moc-install_subtargets-ordered]Error 2And if i am unset CC,then # make it will give the following error message:__
/usr/bin/ld: skipping incompatible /usr/local/expat/lib/libdbus-1.so when searching for -ldbus-1
/usr/bin/ld: skipping incompatible /usr/local/expat/lib/libdbus-1.a when searching for -ldbus-1
/usr/bin/ld: skipping incompatible /usr/local/expat/lib/libdbus-1.so when searching for -ldbus-1
/usr/bin/ld: skipping incompatible /usr/local/expat/lib/libdbus-1.a when searching for -ldbus-1
/usr/bin/ld: cannot find -ldbus-1My configure is as following:*____
./configure -force-pkg-config -qt-kbd-tty -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-multiscreen -qt-mouse-pc -no-gfx-qvfb -no-gfx-vnc -qt-kbd-tty -qt-gfx-linuxfb -no-gfx-qvfb -no-gfx-vnc -qt-mouse-tslib -no-glib -prefix /usr/local/Trolltech/qte4.6.3-arm -embedded arm -release -shared -fast -no-largefile -qt-sql-sqlite -qt3support -xmlpatterns -exceptions -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -webkit -qt-zlib -qt-gif -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -make libs -nomake tools -nomake examples -nomake docs -nomake demo -nis -no-cups -iconv -dbus -openssl -xplatform qws/linux-arm-g++ -little-endian -qt-freetype -depths 4,16,18,32 -I/usr/local/tslib/include -L/usr/local/tslib/lib -I/usr/local/expat/lib/dbus-1.0/include -I/usr/local/expat/include/dbus-1.0 -L/usr/local/expat/lib -ldbus-1 -lpthread -lrt -I/usr/local/openssl/include -L/usr/local/openssl/lib -v
I wonder what can i do about the environment set "CC", and how can i solve the error message, thank you very much!
-
Hi,
it looks like your libdbus-1 is not in an ARM library so the error could be in your libdbus cross compile step.
You could issue the following command:
@file /usr/local/expat/lib/libdbus-1.so@
If it says x86 or x86-64 instead of ARM your libdbus is not built for ARM platform and cannot be used for your device.
Is /usr/local/lib the directory you want your cross compiled binaries be installed into?
-
Dear Ieealfree,
bq. ./bootstrap/libbootstrap.a: could not readsymbols: File in wrong format
collect2: ld returned 1 exit status
make1: *** [../../../bin/moc] Error 1This generally can be resolved by deleting all the .o files. To do this do a clean.
I also got similar issues while cross-compiling QT 5.2.1 for powerpc.
Cheers!!