0

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
karlitos
  • 1,604
  • 3
  • 27
  • 59

2 Answers2

0

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.

yegorich
  • 4,653
  • 3
  • 31
  • 37
  • Oh thank you, you just teached me a new command. :-) But I do not see much difference (I took midnght commander binary as example) 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 – karlitos Aug 15 '14 at 12:44
  • At least kernel headers version is different and I don't know, if `file` shows if it is hardware-float or software-float. I have a Debian image, that is `armhf`. What does `ldd` say to `./Pandaboard crosscompile`? If you don't have `ldd` try: `LD_TRACE_LOADED_OBJECTS=1 ` – yegorich Aug 15 '14 at 12:50
  • ldd just prints, that the cross-compiled binary is not dnymicaly linked. I think it will be wiser to follow you recomendations. I thank you very much for your help. – karlitos Aug 15 '14 at 14:30
0

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.