bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No such file or directory


From: Mike Frysinger
Subject: Re: No such file or directory
Date: Wed, 2 Jan 2013 12:31:04 -0500
User-agent: KMail/1.13.7 (Linux/3.7.1; KDE/4.6.5; x86_64; ; )

On Wednesday 02 January 2013 07:07:49 Roman Rakus wrote:
> On 01/02/2013 02:25 AM, Mike Frysinger wrote:
> > On Tuesday 01 January 2013 15:10:00 Chet Ramey wrote:
> >> On 1/1/13 2:49 PM, Aharon Robbins wrote:
> >>> Michael Williamson wrote:
> >>>> I have a complaint. Apparently, when unknowingly attempting to run a
> >>>> 32-bit executable file on a 64-bit computer, bash gives the error
> >>>> message "No such file or directory". That error message is baffling
> >>>> and frustratingly unhelpful. Is it possible for bash to provide a
> >>>> better error message in this case?
> >>> 
> >>> It's not Bash. That is the error returned from the OS in errno when
> >>> it tries to do an exec(2) of the file.  Bash merely translates the
> >>> error into words.
> >> 
> >> FWIW, the file in question that's not found is either the 32-bit version
> >> of the loader or one of the required 32-bit libraries, not the binary
> >> itself.
> > 
> > it's the ldso missing.  if a lib was missing, the ldso would spit out a
> > useful message telling you exactly which lib could not be found.  at
> > least, that's the standard Linux (glibc/uclibc/etc...) behavior.
> > 
> > $ ./a.out: error while loading shared libraries: libfoo.so: cannot open
> > shared object file: No such file or directory
> 
> The patch stated in
> http://lists.gnu.org/archive/html/bug-bash/2002-03/msg00052.html is
> applied in Fedora.
> Chet, is it possible to apply it to source?

seems like over kill when a slightly tweaked message would be sufficient.  if 
you can stat(command), then include a fragment like "(bad interpreter?)".

if we start supporting the ELF format, then people will want to add their own 
file formats (OS X's dylib also comes to mind).
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]