LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 04-29-2012, 04:47 AM   #1
r1d3r
Member
 
Registered: May 2008
Location: Glendale, CA
Distribution: ubuntu 12.04
Posts: 146

Rep: Reputation: 22
"command not found" but the file file exists!


Hi everyone,

im trying to compile a kernel for my phone, but i get an error from make :

Code:
make: /home/r1d3r/code/arm-2010q1/bin/arm-none-eabi-gcc: Command not found
but the file already exists:

Code:
r1d3r@r1d3r-0:~/code/arm-2010q1/bin$ ls
arm-none-eabi-addr2line  arm-none-eabi-gcc-4.4.1  arm-none-eabi-objdump
arm-none-eabi-ar	 arm-none-eabi-gcov	  arm-none-eabi-ranlib
arm-none-eabi-as	 arm-none-eabi-gdb	  arm-none-eabi-readelf
arm-none-eabi-c++	 arm-none-eabi-gdbtui	  arm-none-eabi-run
arm-none-eabi-c++filt	 arm-none-eabi-gprof	  arm-none-eabi-size
arm-none-eabi-cpp	 arm-none-eabi-ld	  arm-none-eabi-sprite
arm-none-eabi-g++	 arm-none-eabi-nm	  arm-none-eabi-strings
arm-none-eabi-gcc	 arm-none-eabi-objcopy	  arm-none-eabi-strip
r1d3r@r1d3r-0:~/code/arm-2010q1/bin$ ./arm-none-eabi-gcc
bash: ./arm-none-eabi-gcc: No such file or directory
do u guys have an idea what might be the problem?

PS: im running ubuntu 12.04

Thanks in advance.
 
Old 04-29-2012, 05:04 AM   #2
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,142

Rep: Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363
in such cases usually the first line of that file contains an interpreter, like here:
#!/path/to/interpreter
it is used to be /bin/bash, but in your case that file does not exists.
 
Old 04-29-2012, 05:23 AM   #3
r1d3r
Member
 
Registered: May 2008
Location: Glendale, CA
Distribution: ubuntu 12.04
Posts: 146

Original Poster
Rep: Reputation: 22
"arm-none-eabi-gcc" is a binary and the makefile doesnt need the #! but i even tried adding it to the beginning of the makefile, and the problem persists.

is it possible that the config of bash got corrupted somehow?

thanks for your help.
 
Old 04-29-2012, 08:21 AM   #4
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,142

Rep: Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363Reputation: 1363
You are right, for makefiles the #! is not used although it would be possible.
You can check how the SHELL variable set. Which make have you tried? Also you can try if that file (/home/r1d3r/code/arm-2010q1/bin/arm-none-eabi-gcc) can be executed from the command line without make. Have you checked the permissions?
 
1 members found this post helpful.
Old 04-29-2012, 08:38 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,563
Blog Entries: 29

Rep: Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179Reputation: 1179
Is it executable? Is it the right binary format for the system you are trying to run it on? file arm-none-eabi-gcc would show what sort of binary it is. Is it named as it appears to be named? How does its full path look when listed with the --escape option of ls?
 
1 members found this post helpful.
Old 04-29-2012, 08:53 PM   #6
r1d3r
Member
 
Registered: May 2008
Location: Glendale, CA
Distribution: ubuntu 12.04
Posts: 146

Original Poster
Rep: Reputation: 22
ok i found the problem, its a 32bit binary, and im running a 64bit OS.

Code:
arm-none-eabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
after a quick search in the ubunru wiki, i found out that i need to install "ia32-libs" to run 32bit executables, and voila! its working now :-)

thank you guys for your help, i was about to start pulling my hair from desperation.

best regards.
 
  


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
File Exists but... "-bash: No such file or directory" zachet Linux - Newbie 16 12-20-2012 01:01 PM
[SOLVED] Php question about checking if a input="file" file exists errigour Programming 4 12-11-2011 06:58 PM
[SOLVED] "No such file or directory" when file exists Snark1994 Linux - Software 4 05-22-2011 11:20 AM
[SOLVED] "start: Unknown job" but file exists mahmoodn Ubuntu 4 05-12-2011 11:00 AM
[SOLVED] Errors executing shell script: "command not found" and "no such file or directory" eko000 Linux - Newbie 1 01-14-2011 08:54 AM


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