Subject: Re: magic.mgc not cross-buildable?
To: Frederick Bruckman <fredb@immanent.net>
From: grant beattie <grant@netbsd.org>
List: current-users
Date: 09/25/2002 14:53:09
On Tue, Sep 24, 2002 at 05:50:40PM -0500, Frederick Bruckman wrote:

> > I just cross-compiled a mac68k 1.6 release on an alpha and found that
> > file(1) doesn't work... it dies "invalid type 0 in mconvert()". Looks
> > like this is because the /usr/share/misc/magic*.mgc files made by
> > mkmagic have the endianness of the system they're built on... in my
> > case, they were little-endian while the m68k is expecting big-endian.
> > I did a quick search through the list archives and didn't see any
> > mention of this particular problem (did come across some stuff about
> > struct padding back in June), so I wanted to let y'all know :)
> 
> There must be more to it than endianness (sizeof int, perhaps?),
> becuase the cross-build from i386 works fine. When you run file over
> the *.mgc files, it even says little-endian, but it still works.

For which target?

It works for i386 -> sparc, but i386 -> sparc64 is broken.

g.