LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This 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


Reply
  Search this Thread
Old 05-03-2023, 06:34 AM   #1
trovasecantigas
LQ Newbie
 
Registered: May 2023
Posts: 3

Rep: Reputation: 0
Red face 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.

OS release:
NAME="FSLC X11"
VERSION="3.1 (dunfell)"
PRETTY_NAME="FSLC X11 3.1 (dunfell)"
DISTRO_CODENAME="dunfell"

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

8)
-rwxrwxr-x 1 root root 6461212 May2 18:31 myapp

I have no explanation for this.

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.
 
Old 05-09-2023, 04:42 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Hello, trovasecantigas & welcome to LQ.

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
  1. The file is not found in one of the directories in the $PATH variable. The current directory is not searched
  2. /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.
 
Old 05-14-2023, 03:22 PM   #3
trovasecantigas
LQ Newbie
 
Registered: May 2023
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks a lot for your answer.
Now it's solved.
ld command was issued since lib folder was deleted
Actually is Yocto Embedded Linux distro.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Cannot load library icui18n: (icui18n: cannot open shared object file: No such file or directory)" BW-userx Slackware 1 04-19-2019 08:13 AM
windows eclipse platform - crt1.o: No such file: No such file or directory jnettleton Programming 2 05-18-2012 09:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 03:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration