0

I have cross-compiled Qt5 following http://thebugfreeblog.blogspot.it/2012/11/bring-up-qt-50-on-raspberry-pi.html instructions.

Unfortunately I have an error when I try to run the compiled program on the raspberry:

"Illegal Instruction"

I cannot fix it.

Do you have any idea to solve it?

  • Same problem here. I checked both executable and libraries are compiled for ARM. Any news about? – Mark Aug 15 '13 at 14:00
1

It feels like you have used the wrong toolchain for your cross compilation. Make sure that the ARM version of the compiler is used for build, not the version you have installed on your local PC, that is most probably x86 version.

use this command to find out the detailed info about your compiled binaries:

$ file a
a: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
$

above is the x86 version and below is the correct one:

$ file a
a: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked
(uses shared libs), for GNU/Linux 2.6.26, stripped
  • Example on Arch Linux: /lib/ld-2.17.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=d3cababd9336b8984e5a86854205a74bb8ec88bb, not stripped – Lekensteyn May 21 '13 at 21:43
  • here the response for the "file" command: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x0e7dd2b5a3dc8286c1b5af7756e77812b7c13e7e, not stripped – Gappa May 22 '13 at 7:03
  • the executable file looks correct, but what about the shared libs it uses, you may list these libs with ldd -v blah command. please check if these libs are also correctly compiled for ARM? – lenik May 22 '13 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.