Cross compilation with X11
-
@SGaist
Thanks! I have tried it in the same method. I am getting following error. Could please check it,usr/local/linaro/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: note: 'clock_gettime@@GLIBC_2.4' is defined in DSO /media/SSHFS_X11//lib/arm-linux-gnueabihf/librt.so.1 so try adding it to the linker command line
/media/SSHFS_X11//lib/arm-linux-gnueabihf/librt.so.1: could not read symbols: Invalid operation -
Is that were your device root filesystem has been copied ?
-
@SGaist
QTCreator has an option sysroot wherein it expects the sysroot of the target board. Should the path be the mounted path on actual board ?If we have limited set of boards, can we create the ISO image of the target device, copy it on SD Card and then mount it and use this path as Sysroot path. Can we use this to create multiple development systems(environment) which are not dependent on target board.
-
You can copy the content of the root filesystem of your device only our desktop computer and use that as sysroot. Just keep in mind that you'll have to keep it up to date yourself.
-
@SGaist
We have copied the contents of the root filesystem and tried to compile it. We are getting an error as mentioned below. Please note that we are mounting this on a i386 32 bit machine. The target board is arm-linux../NewQTApp/release/build/arm926/libftd2xx.a(ftd2xx.o): In function `InitCheckDevice':
ftd2xx.c:(.text+0x2d0): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/linaro/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: ../NewQTApp/release/build/arm926/libftd2xx.a(linux_usbfs.o): undefined reference to symbol 'clock_gettime@@GLIBC_2.4'
/usr/local/linaro/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: note: 'clock_gettime@@GLIBC_2.4' is defined in DSO /media/SSHFS_X11//lib/arm-linux-gnueabihf/librt.so.1 so try adding it to the linker command line
/media/SSHFS_X11//lib/arm-linux-gnueabihf/librt.so.1: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [NewQTApp] Error 1
20:15:03: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project NewQTApp (kit: Linaro) -
Looks like there's a mismatch between the version of gcc used to build your application and the one used for the sysroot.
-
Hi @SGaist ,
what about installing armhf packages on the local machine instead of sysroot? I want to cross compile Qt for arm/X11 on a x86 debian machine and I was thinking to install all the dependencies on the x86 machine installing libs for armhf architecture (I previously added the armhf architecture with dpkg --add-architecture armhf). Is this possible? (I already did a try but I had some linking error on X11 and fontconfig libraries).
Thanks you -
Hi and welcome to devnet,
That might work however you won't have the specific stuff from your device available if you do so (e.g. OpenGL libraries).