Problems setting Eclipse IDE for cross-compiling for Arm based PandaBoard-ES

339 Views Asked by At

I am trying to set up the Eclipse IDE for cross-compiling C++ code, which should run on the Arm based PandaBoard-ES device.

My machine runs an 64Bit Fedora 20. I followed this how-to and after installing the 32Bit version of glibc (glibc.i686) I was able to build the "hello world" project.

My problem is, that when I copy the binary to the Pandaboard device (Running Debian Jessie 3.16.0-armv7-x3 ) I am not able to execute it. (No such file or directory)

Could please someone give me a hint what to do ?

EDIT:

Here is the output of file for midnight-commander binary (from repos) and the cross-compiled binary

PandaBoard3:~$ file /usr/bin/mc
  /usr/bin/mc: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=31c7410ced0a9b54f97a28e6cbabf97afd4ecee3, stripped

PandaBoard3:~$ file ./Pandaboard\ crosscompile 
 ./Pandaboard crosscompile: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
2

There are 2 best solutions below

3
On

I think you have libc or ABI mismatch. Just run file on compiled binary and on some working binary on you Jessie. You should see the difference.

Fedora is not the best distro for cross-compiling software for Debian. You have basically two possibilities:

  1. take Debian Jessie x86 as development host. This way you would have the same GCC, libc etc. on both systems. Here you can read, how to install a toolchain from Emdebian repo. Also take a look at xapt. It will let you install cross-compiled dependencies like Qt, Boost etc.

  2. take some "from scratch" distro like Buildroot or Yocto. Such a distro will take care about both toolchain and rootfs, so that is is always compatible.

0
On

This is years too late and might be rather rudimentary, but did you check the file permissions for the binary you were trying to run? Run ls -alv and check to see if the file has the execute permission enabled for your user.