From owner-freebsd-sparc64@FreeBSD.ORG Tue Feb 15 18:49:21 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 D80D016A4CE for ; Tue, 15 Feb 2005 18:49:21 +0000 (GMT) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 902E743D2F for ; Tue, 15 Feb 2005 18:49:21 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.13.1/8.13.1) with ESMTP id j1FInLk1086661; Tue, 15 Feb 2005 10:49:21 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.13.1/8.13.1/Submit) id j1FInL4F086660; Tue, 15 Feb 2005 10:49:21 -0800 (PST) (envelope-from obrien) Date: Tue, 15 Feb 2005 10:49:20 -0800 From: "David O'Brien" To: Kris Kennaway Message-ID: <20050215184920.GC85174@dragon.nuxi.com> 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> <20050215180924.GA52248@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050215180924.GA52248@xor.obsecurity.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 6.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: sparc64@FreeBSD.org Subject: Re: file(1) broken on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@FreeBSD.org 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:49:22 -0000 On Tue, Feb 15, 2005 at 10:09:24AM -0800, Kris Kennaway wrote: > 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=sparc64 and see if > > > > >it still works? > > > > > > > > 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. > > > > > > 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. > > > > A-HA! > > Are all the file(1) problems you've mentioned only occurring for > > cross-arch builds? > > Yes, as mentioned above. Sorry I didn't catch that fact. This makes everything all the more understandable. > > If this is the case, we can disable building magic.mgc if > > TARGET_ARCH != MACHINE_ARCH. > > Or figure out what changed with the last import to break it. See below. Figuring this out will come behind testing Opteron dual-core support and updating compat.4x libs for 5.4-RELEASE. I am willing to email the file(1) author and report that something changed such that a cross-endian+cross-bitness produced magic.mgc broke, and hope that might turn on a light-bulb for him. Of course patches are fully appreciated and will get looked at. > > > AFAIK, the underlying reason hasn't been tracked down. > > 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. In the "last word on the issue" from the TRB i386# make TARGET_ARCH=sparc64 buildworld i386# make TARGET_ARCH=sparc64 DESTDIR=/host/sparc64 installworld is in the Provisionally Supported category. Defined as: These are areas that are optionally supported. Developers aren't necessarily required to test these areas, but are required to make their best efforts to not unduly disrupt this support. This support is contingent on one or more developers taking an active role in keeping it current. Failure to do so will relegate things to unsupported. -- -- David (obrien@FreeBSD.org)