Why does an error occur when trying to run this executable file?

I am trying to deploy a python 3 application to an embedded Linux machine (Yocto) with armv7 architecture. Due to limited packages, I create a separate file with cx-freeze on my raspberry pi (which has the same armv7 architecture). Now, if I try to run the generated binary on the target machine, I get an error message that indicates that the source was compiled for another platform:

root@target:/media/sda/dist# ./helloworld
-sh: ./helloworld: No such file or directory

This executable file runs on the build machine.

I compared the outputs of the file command with another application that runs on the target machine:

This is a file that does not work :

root@target:/media/sda/dist# file helloworld
helloworld: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=99b2ae19f1e65dc26b6fd7d8b1dbc83f974830bd, stripped

And this is another binary file that runs on the target machine:

root@target:/usr/bin# file demo-application
demo-application: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=bd6660c43d9e98c59dfa8b16eb26277aa4f19949, stripped

- , uname , 3.0.35:

root@target:/media/sda/dist# uname -a
Linux Target-Machine 3.0.35-Yocto-21.0-r5061-0-svn2437 #1 PREEMPT Fri Jun 19 21:40:10 CEST 2015 armv7l GNU/Linux

uname pi:

pi@raspberrypi ~/py/helloworld $ uname -a
Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux

? python, helloworld .

ldd (exe, nuitka):

pi@raspberrypi ~/py/helloworld/helloworld.dist $ ldd helloworld.exe
    /usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x76faf000)
    libdl.so.2 => /home/pi/py/helloworld/helloworld.dist/./libdl.so.2 (0x76fa4000)
    libpython3.2mu.so.1.0 => /home/pi/py/helloworld/helloworld.dist/./libpython3.2mu.so.1.0 (0x76ccf000)
    libstdc++.so.6 => /home/pi/py/helloworld/helloworld.dist/./libstdc++.so.6 (0x76bfd000)
    libm.so.6 => /home/pi/py/helloworld/helloworld.dist/./libm.so.6 (0x76b8c000)
    libgcc_s.so.1 => /home/pi/py/helloworld/helloworld.dist/./libgcc_s.so.1 (0x76b64000)
    libc.so.6 => /home/pi/py/helloworld/helloworld.dist/./libc.so.6 (0x76a33000)
    /lib/ld-linux-armhf.so.3 (0x76fbc000)
    libz.so.1 => /home/pi/py/helloworld/helloworld.dist/./libz.so.1 (0x76a15000)
    libexpat.so.1 => /home/pi/py/helloworld/helloworld.dist/./libexpat.so.1 (0x769ec000)
    libpthread.so.0 => /home/pi/py/helloworld/helloworld.dist/./libpthread.so.0 (0x769cd000)
    libutil.so.1 => /home/pi/py/helloworld/helloworld.dist/./libutil.so.1 (0x769c2000)

2

nuitka python , :

nuitka --standalone --recurse-all helloworld.py

helloworld.exe libary (.so). , , :

root@target:~/helloworld/helloworld.dist# ./helloworld.exe -sh: ./helloworld.exe: No such file or directory

, ldd readelf , .

3

, . ld-linux-armhf.so.3 raspi , ( ). , , pi hardfloat (armhf), softfloat.. , .

4 os, , .

+4
1

:

chmod +x helloworld

.

0

All Articles