From owner-freebsd-sparc64@FreeBSD.ORG Tue Feb 15 18:09:26 2005 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 148E816A4CF; Tue, 15 Feb 2005 18:09:26 +0000 (GMT) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [69.199.47.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id A294F43D4C; Tue, 15 Feb 2005 18:09:25 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 5F3BD51432; Tue, 15 Feb 2005 10:09:24 -0800 (PST) Date: Tue, 15 Feb 2005 10:09:24 -0800 From: Kris Kennaway To: David O'Brien Message-ID: <20050215180924.GA52248@xor.obsecurity.org> References: <20050122213501.GA22882@xor.obsecurity.org> <1106501671.677.1.camel@heater.rainbow-runner.nl> <20050123200201.GA81234@xor.obsecurity.org> <1108478248.30515.13.camel@heater.rainbow-runner.nl> <20050215152803.GA11423@xor.obsecurity.org> <20050215165853.GA38158@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: <20050215165853.GA38158@dragon.nuxi.com> User-Agent: Mutt/1.4.2.1i cc: sparc64@FreeBSD.org cc: Kris Kennaway Subject: Re: file(1) broken on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 18:09:26 -0000 --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 15, 2005 at 08:58:53AM -0800, David O'Brien wrote: > On Tue, Feb 15, 2005 at 07:28:04AM -0800, Kris Kennaway wrote: > > On Tue, Feb 15, 2005 at 03:37:28PM +0100, Koop Mast wrote: > > > >I wonder if the problem is with worlds cross-built from i386. > > > >Can you try a buildworld on i386 with TARGET_ARCH=3Dsparc64 and see = if > > > >it still works? > > >=20 > > > 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 libc.so.6 with the one from the cross build. = But > > > that also didn't change anything. > >=20 > > 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. >=20 > A-HA! > Are all the file(1) problems you've mentioned only occurring for > cross-arch builds? Yes, as mentioned above. > If this is the case, we can disable building magic.mgc if > TARGET_ARCH !=3D MACHINE_ARCH. Or figure out what changed with the last import to break it. > > AFAIK, the underlying reason hasn't been tracked down. >=20 > To date we've never guaranteed that a cross-arch built world is usable. > We only officially support cross-arch compiles for compile testing. There > are other things in the tree that aren't size & endian-clean that prevent > usable cross-arch release builds. Release builds, yes. Cross-built worlds have previously worked, and I use them exclusively for non-i386 package builds. Kris --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCEjrTWry0BWjoQKURAhPoAJ40VpDQbwwJxnv6kZFC2nlGFj/DcgCg/N1G aCoP3Ok2AYTyn2CYfbTU+Bc= =+Up7 -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z--