[SOLVED] Cross Compilation - Cannot launch files in Linux Embedded System - "No such file or directory"
Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Cross Compilation - Cannot launch files in Linux Embedded System - "No such file or directory"
Hi all, hope you are doing great!
I am here after a week of trying to solve something, and now I am asking for support if you don't mind.
Something unexpected started happening after no major changes in the system.
I am developing an application to run on an ARM machine. I am using cross-compilation and then I run the executable file on that environment.
Everything was going okay until I try to run my script once more, but instead of running it again, the system responds with: "./myApp: No such file or directory"
At first, I thought that could be something regarding my compilation target or similar, but after I realized that this was happening not only with my app file but with all the files I try to run on the system.
What I tried:
1)
root@apollo:/home/usrname/demos# file myapp
myapp: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=fd11908f1b0542001bad5532976951d765f22f01, for GNU/Linux 3.2.0, with debug_info, not stripped
2)
root@apollo:/home/usrname# ldd myapp
OUT: "sh: /lib/ld-2.31.so: No such file or directory"
(but lib is there)
3)
I ran /usr/local/sigma/bin/testLib1 knowing the file is there but result was:
"sh: /usr/local/folder/bin/testLib1 : No such file or directory"
4) I ran $ ldd myapp
Output: "sh: /lib/ld-2.31.so: No such file or directory"
(but .so is there)
5) I ran $ lddconfig and tried to start again, but no such file remains.
6) I tried "$ ldd *.so" of several .so files I have in the dir, but the output is always: "-sh: /lib/ld-2.31.so: No such file or directory"
root@apollo:/usr/lib# ldd libaktualizr.so
sh: /lib/ld-2.31.so: No such file or directory
7) The name is right and autocomplete works:
root@user:/usr/lib# ldd ld-
ld-2.31.so ld-linux-armhf.so.3
root@apollo:/usr/lib# ldd ld-2.31.so
sh: /lib/ld-2.31.so: No such file or directory
Some network scripts stopped to start running automatically after rebooting, and I need to run them manually. I think something is not allowing executable files to run, but, what?
9) Searching on the web, I checked that name could be wrong (is not), and file needs to have "executable" permissions (It has)
Last edited by trovasecantigas; 05-14-2023 at 03:16 PM.
Cross compiling is not for the faint of heart. It sounds like You're not set up right in the chroot. You could do worse than go through CLFS book on linuxfromscratch.org. Alternatively, install a linux system on your sbc.
You need to give us diagnostic information if we are to spot your error"No such file or directory" error come when
The file is not found in one of the directories in the $PATH variable. The current directory is not searched
/lib/ld-linux.so has an issue
Try giving the full path name to your script
Here, you need to provide details to get fixes. If you have to keep this cloak & dagger, your answer will never come and you'll only annoy folks. Have you a link to this dunfell os?
EDIT: Is that FreeScale? Where the <expletive> did you get 'dunfell' from?
Last edited by business_kid; 05-09-2023 at 04:48 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.