Subject: Re: bin/35943: NetBSD 4.0 BETA_2: file(1) is ... confused
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: Giles Lean <giles.lean@pobox.com>
List: netbsd-bugs
Date: 03/11/2007 07:20:03
The following reply was made to PR bin/35943; it has been noted by GNATS.

From: Giles Lean <giles.lean@pobox.com>
To: Nick Hudson <skrll@netbsd.org>, matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: bin/35943: NetBSD 4.0 BETA_2: file(1) is ... confused 
Date: Sun, 11 Mar 2007 18:19:52 +1100

 Hi Nick and Matt,
 
 Nick wrote:
 
   nick> Make sure you have dist/file/src/apprentice.c:1.12.2.1
 
 That's the version in the source tree I built.
 
 Matt wrote:
 
   mrg> this reminds me of a problem we were having a few months ago
   mrg> with file building corrupted magic files.  what system built
   mrg> your release?
 
 Close enough.  They're not really corrupted, just built with the
 wrong endianness:
 
 From the OS/X PPC hosted cross build for i386:
 
   $ file magic.mgc
   magic.mgc: magic binary file for file(1) cmd (version 3) (big endian)
 
 From the i386 hosted build:
 
   $ file magic.mgc
   magic.mgc: magic binary file for file(1) cmd  (version 3) (little endian)
 
 I confirmed that it's just the magic.mgc file that is the problem:
 the file(1) binary from either build works providing it is given
 the little endian magic.mgc file. (n.b. The same problem exists
 with /usr/share/misc/magic.mime.mgc.)
 
 I haven't looked at the build to see what needs to be changed.
 (I possibly will, but I can't promise to -- time is short at the
 moment.)
 
 If someone creates a fix and wants me to run another OS/X hosted
 build to test, that I can do -- just let me know.
 
 Cheers,
 
 Giles
 
 P.S. I don't suppose it's interesting that build.sh is broken on
 NetBSD 1.6.2, but for the list archives and Google: building
 4.0_BETA2/i386 on NetBSD-1.6.2/i386 fails.