Cannot execute Hello World simple app on T20 : No such file or directory

hi there,

Can u please help me with my T20 device, I am having very tough time executing simple hello world app.
I keep getting
-sh: ./myapp: No such file or directory
error.
At one moment I was desperate to try many commands like setting LD_LIBRARY_PATH and executing --library-path “/usr/lib:/lib” and stuff like that, and all of sudden all apps (Hello Worlds) started executing fine. So I managed to fix the issue by doing something very naive.

Then I had to re-flash the device with fresh new copy of Linux LXDE (2.8), and again I am having the same issue, but this time I cannot overcome it, it’s very very frustrating not to be able to execute Hello World app.
The app is compiled correctly with the toolchain predicted for T20, and I have no doubt at the app because I made it execute once.

This is what I get when I execute “ldd myapp”, so all libraries are being located.

ldd myapp
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x401db000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4002c000)
        libc.so.6 => /lib/libc.so.6 (0x402df000)
        libm.so.6 => /lib/libm.so.6 (0x4041b000)
        /lib/ld-linux.so.3 => /lib/ld-linux-armhf.so.3 (0x4005f000)

Please help,

Thanks, Aleks

Hi

What is the output of:

ls -l myapp
file myapp

Likely the executable bit is not set. Does it help to set it:

chmod u+x myapp

Max

The permissions were already set using chmod 777, so it’s not about permissions.

Maybe something related with shell options?
I know I also tried typing commands like #!/bin/bash before it started working in previous installation of Linux LXDE.

Also when it started executing the files, in the files where libraries were missing it strictly listed which ones were missing. It all started to behave differently.

Please help us with this it’s very last step for us, deploy/test the software and go into production.

Hi

What is the output of:

ls -l myapp
file myapp

Max

And the file command?

I execute the file with ./myapp
I’ve tried with bash myapp too.
Nothing works currently.

-rwxrwxrwx (what corresponds to 777)

hi @Aleks_P

it’s very very frustrating not to be able to execute Hello World app. The app is compiled correctly with the toolchain predicted for T20, and I have no doubt at the app because I made it execute once.

Which Toolchain did you use?
Could you share your ‘myApp’?

Thanks and best regards,
Jaski

Note that file is a command which you likely have installed on the Colibri T20, and it is very likely also installed on your desktop PC.
E.g. for /bin/bash it shows:

root@colibri-t20:~# file /bin/bash
/bin/bash: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.1.10, BuildID[sha1]=9aafc3a86a32af15a3534e6c82be70ef11f0425d, stripped

While at it could you get the output of ‘readelf -A myapp’ run on your development PC as readelf is not installed on the target.