Subject: bin/17172: file(1) breaks crossbuilding because of file format
To: None <gnats-bugs@gnats.netbsd.org>
From: None <fvdl@wasabisystems.com>
List: netbsd-bugs
Date: 06/05/2002 02:35:56
>Number:         17172
>Category:       bin
>Synopsis:       file(1) breaks crossbuilding because of file format
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 04 18:07:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Frank van der Linden
>Release:        NetBSD 1.5ZC
>Organization:
Some day.
>Environment:
System: NetBSD k2 1.5ZC NetBSD 1.5ZC (K2) #0: Wed May 1 02:01:29 CEST 2002 fvdl@k2:/work/trees/empee/sys/arch/i386/compile/K2 i386
Architecture: i386
Machine: i386
>Description:
	file(1) uses a compile magic file format, containing a number
	of fixed-sized structures. These are defined in file.h in
	the file(1) sources. Unfortunately, this structure is
	differently aligned on 32 vs. 64bit architectures.
	Which means that a cross-build between a 64 and 32 bit
	architecture results in a broken file(1).
>How-To-Repeat:
	Cross-build a release 32 -> 64. Install, use file(1).
>Fix:
	Either pad or pack the structure. Pad would be best,
	since gcc-isms must be avoided in it (mkmagic is
	compiled using HOST_CC)
>Release-Note:
>Audit-Trail:
>Unformatted: