Cross-compilation on PC/UBUNTU for target PANDABOARD/UBUNTU.
-
Before compiling anything, did you also deploy the Qt 5 plugins ?
-
Yes I deployed Qt 5 plugins (qtbase/plugins/platforms) on my target in the directory ./platforms.
But I think the xcb pluggin is lacked.
By running my application with gdb on my target I obtained the following message:This application failed to start because it could not find or load the Qt platform plugin “xcb”.
Available platform pluggins are: linuxfb(from ./platforms), minimal (from ./platforms), offsreen (from ./platforms).The error message is produced by QGuiApplicationPrivate::createPlatformIntegration() function
So, I think there is a problem because the xcb platform is not present in
qtbase/plugins/platforms.Do you agree ?
Thanks.
-
If it wasn't already built, it means that the test for it failed.
Do a new configure and force the use of xcb, you'll probably see it failed stating that the needed libraries/headers where not found. If it's the case, you are missing the necessary dev packages for it
-
Hi,
Indeed there are problems during the new configure with -xcb.
I read src/plugins/platforms/xcb/README and install all the dependency packages for libxcb.
I found all the libraries thanks to the following command :
sudo apt-cache pkgnames | grep "libxcb*"So, I do not understand why the last 3 lines of the message :
"The test for linking against libxcb failed!
You might need to install dependency packages for libxcb.
See src/plugins/platforms/xcb/README"The result of the configure command is the following :
Sorry for the size of the message but I am not able to specify which piece of information is important../configure -xcb -v -prefix /home/stimg/QT/qt-everywhere-opensource-src-5.2.1/qtbase -skip connectivity -qreal float -nomake tests -nomake examples -opensource -xplatform linux-arm-gnueabi-g++
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
BEGIN MESSAGE
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////DEFAULT_LIBDIRS="/usr/lib/gcc/arm-linux-gnueabihf/4.6
/usr/lib/gcc/arm-linux-gnueabihf/lib
Creating qmake...
make: Nothing to be done for `first'.
Running configuration tests...
Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set.
Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set.
Determining architecture... ()
arm-linux-gnueabihf-g++-4.6 -c -pipe -g -Wall -W -fPIE -I../../mkspecs/linux-arm-gnueabi-g++ -I. -o arch.o arch.cpp
arm-linux-gnueabihf-g++-4.6 -o arch arch.o
/usr/bin/arm-linux-gnueabihf-ld: unrecognised emulation mode: armelf_linux_eabi
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om
collect2: ld returned 1 exit status
make: *** [arch] Error 1
Unable to determine architecture!Could not determine the target architecture!
Turn on verbose messaging (-v) to see the final report.
Determining architecture... ()
g++ -c -pipe -g -Wall -W -fPIE -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp
g++ -o arch arch.o
{ test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9][^0-9]([0-9]).([0-9]).,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'arch' && test -f arch.gdb-index && objcopy --add-section '.gdb_index=arch.gdb-index' --set-section-flags '.gdb_index=readonly' 'arch' 'arch' && rm -f arch.gdb-index || true
Found architecture in binary
CFG_HOST_ARCH="x86_64"
CFG_HOST_CPUFEATURES=" mmx sse sse2"
System architecture: 'unknown'
Host architecture: 'x86_64'
C++11 auto-detection... ()
arm-linux-gnueabihf-g++-4.6 -c -pipe -O2 -std=c++0x -Wall -W -fPIE -I../../../mkspecs/linux-arm-gnueabi-g++ -I. -o c++11.o c++11.cpp
arm-linux-gnueabihf-g++-4.6 -Wl,-O1 -o c++11 c++11.o
/usr/bin/arm-linux-gnueabihf-ld: unrecognised emulation mode: armelf_linux_eabi
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om
collect2: ld returned 1 exit status
make: *** [c++11] Error 1
C++11 disabled.
floatmath auto-detection... ()
arm-linux-gnueabihf-g++-4.6 -c -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-arm-gnueabi-g++ -I. -o floatmath.o floatmath.cpp
floatmath.cpp:44:5: warning: unused parameter ‘argc’ [-Wunused-parameter]
floatmath.cpp:44:5: warning: unused parameter ‘argv’ [-Wunused-parameter]
arm-linux-gnueabihf-g++-4.6 -Wl,-O1 -o floatmath floatmath.o
/usr/bin/arm-linux-gnueabihf-ld: unrecognised emulation mode: armelf_linux_eabi...
evdev disabled.
XLib auto-detection... ()
arm-linux-gnueabihf-g++-4.6 -c -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-arm-gnueabi-g++ -I. -o xlib.o xlib.cpp
arm-linux-gnueabihf-g++-4.6 -Wl,-O1 -o xlib xlib.o -lXext -lX11 -lm
/usr/bin/arm-linux-gnueabihf-ld: unrecognised emulation mode: armelf_linux_eabi
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om
collect2: ld returned 1 exit status
make: *** [xlib] Error 1
XLib disabled.
xcb auto-detection... ()
arm-linux-gnueabihf-g++-4.6 -c -pipe -O2 -Wall -W -fPIE -I../../../mkspecs/linux-arm-gnueabi-g++ -I. -o xcb.o xcb.cpp
xcb.cpp: In function ‘int main(int, char**)’:
xcb.cpp:47:23: warning: unused variable ‘t’ [-Wunused-variable]
arm-linux-gnueabihf-g++-4.6 -Wl,-O1 -o xcb xcb.o -lxcb
/usr/bin/arm-linux-gnueabihf-ld: unrecognised emulation mode: armelf_linux_eabi
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om
collect2: ld returned 1 exit status
make: *** [xcb] Error 1
xcb disabled.
The test for linking against libxcb failed!
You might need to install dependency packages for libxcb.
See src/plugins/platforms/xcb/README.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
END MESSAGE
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -
You need the arm version of these libraries
-
Hi
I put all the xcb libraries loaded on my PANDABOARD/UBUNTU described in the README in the directory :
/usr/lib/gcc/arm-linux-gnueabihf/4.6 on my PC/UBUNTU.
But the result is always the same after the configuration :xcb disabled.
The test for linking against libxcb failed! You might need to install dependency packages for libxcb. See src/plugins/platforms/xcb/README.Best regards.
-
You should rather point the configure script to the folder where the libraries can be found they have dependencies that might not be seen
-
Hi
I modified the file /usr/lib/gcc/arm-linux-gnueabihf/4.6/pkgconfig/xcb.pc
thus I can specify the access to the static library libxcb.a (coming from my target). Nevertheless I obtain the same message :
arm-linux-gnueabihf-g++-4.6 -Wl,-O1 -o xcb xcb.o -L//usr/lib/gcc/arm-linux-gnueabihf/4.6 -lxcb/usr/bin/arm-linux-gnueabihf-ld: unrecognised emulation mode: armelf_linux_eabi
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om
collect2: ld returned 1 exit status
make: *** [xcb] Error 1
xcb disabled.
How must I resolve the problem /usr/bin/arm-linux-gnueabihf-ld: unrecognised emulation mode: armelf_linux_eabi ?Best regards.
-
Looking for that error, it seems you might be encountering a bug of gcc
-
The only I see is to update gcc, is there not a more recent version available ?
-
I do not find a more recent version but I find a workaround.
I am not sure to well understant it.
The workaround suggests to modify the configure.tgt file for the linker :This is the linker target specific file. This is invoked by the autoconf generated configure script. Putting it in a separate shell file lets us skip running autoconf when modifying target specific.
The content of the config.tgt is the following :
--- ld/configure.tgt.orig 2011-04-05 20:22:23.000000000 +0000targ_extra_emuls="armelfb armelf armelf_linux" targ_extra_libpath="armelf_linux" ;;
-arm*--linux-eabi) targ_emul=armelf_linux_eabi
+arm--linux-eabi) targ_emul=armelf_linux_eabi
targ_extra_emuls=armelfb_linux_eabi
targ_extra_libpath=$targ_extra_emulstarg_extra_emuls="armelf armelfb armelfb_linux" targ_extra_libpath="armelfb_linux" ;;
-arm*--uclinuxeabi) targ_emul=armelf_linux_eabi
+arm*--uclinuxeabi*) targ_emul=armelf_linux_eabi
targ_extra_emuls=armelfb_linux_eabi
targ_extra_libpath=$targ_extra_emuls
;;For me I need to compile the loader arm-linux-gnueabi-g++-4.6 by using the previous file.
Do you agree ?
Thanks and best regards.
-
Worth to try