LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-28-2010, 11:51 PM   #1
kakikomi
LQ Newbie
 
Registered: Mar 2010
Location: 東南アジア
Posts: 3

Rep: Reputation: 0
Executable unable to run


This is what I have done. I cross compiled a simple C++ "hello world" application in Cygwin that targets an embedded machine running uclinux on powerpc405. I can see that it is an ELF file. So I transefered the executable to the target machine. When I attempted to run the executable I get

-sh: ./a.out: not found

I can swear that the file is indeed where it is. May I have so some help/hint to the problem causing this?
 
Old 03-29-2010, 12:13 AM   #2
robertstar20
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
Use

$ ls ./a.out

..to confirm if the file is there or not. If it's not, use

$ ls

..to see which files are there. I suspect Cygwin has named the file a.exe instead of a.out?
 
Old 03-29-2010, 12:48 AM   #3
kakikomi
LQ Newbie
 
Registered: Mar 2010
Location: 東南アジア
Posts: 3

Original Poster
Rep: Reputation: 0
Yes the file exist and I am not running it in Cygwin but in the embedded machine. The executable was crossed compiled
 
Old 03-29-2010, 04:07 AM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 675

Rep: Reputation: 136Reputation: 136
Quote:
Originally Posted by kakikomi View Post
Yes the file exist and I am not running it in Cygwin but in the embedded machine. The executable was crossed compiled
What's output of
Code:
ldd ./a.out
on embedded system ?
 
Old 03-30-2010, 03:38 AM   #5
kakikomi
LQ Newbie
 
Registered: Mar 2010
Location: 東南アジア
Posts: 3

Original Poster
Rep: Reputation: 0
Oh...I get the idea, you suggest that I find out the shared libraries my program is using. Unfortunately the embedded machine does not have ldd. so I used objdump on the development host to list out the shared libraries used and it seems that the libraries required are not on the target machine. Guess that`s the problem.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 get an executable to run... disruptive Linux - Newbie 5 03-04-2008 12:18 PM
unable to set executable context rado.ovcarcik Fedora 3 02-23-2006 05:55 AM
an executable that does not run jgoggel Programming 2 07-22-2004 08:54 PM
Unable to logon on as non-root user after update as unable to set executable context pls198 Fedora 2 04-09-2004 12:41 PM
How do I run my executable?? scott7500 Programming 2 12-30-2001 05:22 PM


All times are GMT -5. The time now is 10:46 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration