Which version of FreeBSD a binary was compiled for?

Micah micahjon at ywave.com
Thu Oct 27 11:36:24 PDT 2005


Will Maier wrote:
> On Thu, Oct 27, 2005 at 06:51:21AM -0700, Micah wrote:
> 
>>I have a 5.4 system, /do/ go into single user when upgrading, and
>>file does /not/ report FreeBSD version.  I get the same output you
>>do.  It would be nice to know why this works on some systems and
>>not on others.
> 
> 
> Consider diff'ing the /usr/share/misc/magic file from a system that
> works and a system that doesn't work. I'd expect the difference to
> be evident there.
> 
> It works find on all my machines, though.
> 

Didn't think to check this until /after/ I started to make lunch. :)  I 
copied ethereal from the working machine to the non-working machine. 
Using file on the copied ethereal gives me:

trisha% file ethereal
ethereal: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), 
for FreeBSD 5.4, dynamically linked (uses shared libs), stripped

Conversly coping ethereal from the broken machine to the working machine 
I get:

alexis% file ethereal
ethereal: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), 
dynamically linked (uses shared libs), stripped

In other words, it's not file that broken, but /every/ executable on the 
broken machine is broken.  Now why would that be?  A compiler flag or 
something?

Later,
Micah


More information about the freebsd-questions mailing list