Thomas Koenig wrote:
build/genmodes -h > tmp-modes.h
/bin/sh: build/genmodes: No such file or directory

Does the file build/genmodes exist?  If the file isn't there, then you
need to figure out what happened to it.

If the file is there, then this might mean that the interpreter for the
binary is missing.  For an ELF executable, the interpreter is the
dynamic linker ld.so.  This info is stored in the interp section.
localhost$ objdump --full-contents --section .interp /bin/ls

/bin/ls:     file format elf32-i386

Contents of section .interp:
 8048134 2f6c6962 2f6c642d 6c696e75 782e736f  /lib/ld-linux.so
 8048144 2e3200                               .2.

If the interp section points at a file that is non-existent, then you
may get a confusing message when you run the program.

A similar problem can occur with shell scripts.  E.g. if you have
#!/bin/foo
exit 0

in a script, make it executable, and try to run it directly, you may get
a confusing message saying the file does not exist.  The message means
the interpreter is missing, not the actual shell script.

The error message comes from the shell. Bash prints a useful message, but some shells print a confusing one.
localhost$ echo $SHELL
/bin/bash
localhost$ cat tmp.script
#!/bin/foo
exit 0
localhost$ ./tmp.script
bash: ./tmp.script: /bin/foo: bad interpreter: No such file or directory
localhost$ csh
[EMAIL PROTECTED] ~/tmp]$ ./tmp.script
./tmp.script: Command not found.
[EMAIL PROTECTED] ~/tmp]$

--
Jim Wilson, GNU Tools Support, http://www.specifix.com

Reply via email to