From owner-cvs-src@FreeBSD.ORG Mon May 29 10:59:56 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CEDC16A44A; Mon, 29 May 2006 10:59:56 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id B96BB43D58; Mon, 29 May 2006 10:59:55 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (k3feyqrefj2neppp@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.4/8.13.3) with ESMTP id k4TAxt1f059752; Mon, 29 May 2006 03:59:55 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.4/8.13.3/Submit) id k4TAxtBE059751; Mon, 29 May 2006 03:59:55 -0700 (PDT) (envelope-from jmg) Date: Mon, 29 May 2006 03:59:55 -0700 From: John-Mark Gurney To: Ruslan Ermilov Message-ID: <20060529105954.GX49081@funkthat.com> References: <200605280715.k4S7Fa1E083206@repoman.freebsd.org> <20060529102126.GD44223@ip.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060529102126.GD44223@ip.net.ua> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/file magic.5 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2006 10:59:56 -0000 Ruslan Ermilov wrote this message on Mon, May 29, 2006 at 13:21 +0300: > On Sun, May 28, 2006 at 07:15:36AM +0000, John-Mark Gurney wrote: > > jmg 2006-05-28 07:15:36 UTC > > > > FreeBSD src repository > > > > Modified files: > > usr.bin/file magic.5 > > Log: > [...] > > compiling mgc on a big endian system (specificly tested sparc64) breaks, > > using one from a little endian system works > > > > Revision Changes Path > > 1.24 +18 -0 src/usr.bin/file/magic.5 > > > I have another experience from cross-build research. Namely, > only a native endianness format of *.mgc file works. Just > confirmed this on a freshly installed 6.1-RELEASE: > > : Script started on Mon May 29 13:01:57 2006 > : sun# uname -sm > : FreeBSD sparc64 > : sun# file magic.mgc* > : magic.mgc: magic binary file for file(1) cmd (version 2) (big endian) > : magic.mgc_: magic binary file for file(1) cmd (version 2) (little endian) > : sun# file /bin/sh > : /bin/sh: ELF 64-bit MSB executable, SPARC V9, version 1 (FreeBSD), dynamically linked (uses shared libs), stripped > : sun# mv magic.mgc magic.mgc~ > : sun# mv magic.mgc_ magic.mgc > : sun# file /bin/sh > : /bin/sh: data, dynamically linked (uses shared libs), stripped > : sun# file magic.mgc* > : magic.mgc: magic binary file for file(1) cmd (version 33554432) (big endian) > : magic.mgc~: JPEG 2000 image > : sun# exit > : exit > : > : Script done on Mon May 29 13:02:49 2006 > > I.e., using a LE magic.mgc gives bullshit on a BE system. Can you > please re-check? This was w/ a -current system... Hmm. this is wierd: # cd /usr/share/misc # uname -a FreeBSD carbon.funkthat.com 7.0-CURRENT FreeBSD 7.0-CURRENT #27: Mon Apr 17 19:02:25 PDT 2006 jmg@carbon.funkthat.com:/usr/home/jmg/p4/world/src/sys/i386/compile/carbon i386 # file -C -m magic # file magic magic: magic text file for file(1) cmd # file /tmp/*.CRW Segmentation fault (core dumped) That last part was the wierd part... and if I copied the magic.mgc from my 5.4-R box, it worked fine w/ the same line to match the CRW... (See below before you point out that above isn't a sparc64 box) And the magic line is: # tail -n 1 magic 0 string II\x1a\x00 Canon RAW If I remove that line, the compile works, and file returns data: # file /tmp/*.CRW /tmp/CRW_0171.CRW: data Wow, I must of really been tired when I made that commit, now that I think about it, I was testing i386 to i386.. so I'll drop the big endian bit, but it is a bit worry some that -current's file is broken.. # ident magic magic: $Id: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $ Add the above magic line to that file, and I get a seg fault... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."