file(1) broken on sparc64

Kris Kennaway kris at
Tue Feb 15 15:28:05 GMT 2005

On Tue, Feb 15, 2005 at 03:37:28PM +0100, Koop Mast wrote:

> >> # file /lib/
> >> /lib/ ELF 64-bit MSB shared object, SPARC V9, version 1
> >> (FreeBSD), stripped
> >
> >I wonder if the problem is with worlds cross-built from i386.
> >
> >Can you try a buildworld on i386 with TARGET_ARCH=sparc64 and see if
> >it still works?
> >
> >Kris
> Sorry for the wait, I filed the mail in a wrong folder.
> I did a cross buildworld on a i386 machine, and copied the resulting
> file binary over to my sparc box. It works just like the native file
> binary. I even replaced with the one from the cross build. But
> that also didn't change anything.

The problem turns out to be a mis-compiled /usr/share/misc/magic.mgc.
If you remove it (it is only used for runtime optimization), file(1)
works fine.  If you recreate it natively using file -C, it also works.

AFAIK, the underlying reason hasn't been tracked down.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-sparc64 mailing list