From owner-freebsd-amd64@FreeBSD.ORG Thu Nov 25 22:57:22 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A777C16A4CE for ; Thu, 25 Nov 2004 22:57:22 +0000 (GMT) Received: from mail.hydrix.com (ns1.hydrix.com [218.214.210.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C4C243D54 for ; Thu, 25 Nov 2004 22:57:21 +0000 (GMT) (envelope-from jean-yves.avenard@hydrix.com) Received: from [192.168.2.11] (CPE-144-133-92-247.vic.bigpond.net.au [144.133.92.247]) (authenticated bits=0) by mail.hydrix.com (8.13.1/8.13.1) with ESMTP id iAPMvDP3060861 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Fri, 26 Nov 2004 09:57:15 +1100 (EST) (envelope-from jean-yves.avenard@hydrix.com) In-Reply-To: <200411251242.33406.peter@wemm.org> References: <20041116052630.GD49800@manor.msen.com> <20041124070652.GT49800@manor.msen.com> <80EAD071-3E8F-11D9-AF21-000D93AD5C52@hydrix.com> <200411251242.33406.peter@wemm.org> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <560E2314-3F35-11D9-AF21-000D93AD5C52@hydrix.com> Content-Transfer-Encoding: 7bit From: Jean-Yves Avenard Date: Fri, 26 Nov 2004 09:57:09 +1100 To: Peter Wemm X-Mailer: Apple Mail (2.619) X-Spam-Status: No, score=-2.2 required=6.5 tests=ALL_TRUSTED,J_CHICKENPOX_73 autolearn=failed version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on server2.private.hydrix.com X-Virus-Scanned: ClamAV 0.80/533/Sun Oct 17 11:09:44 2004 clamav-milter version 0.80j on server2.private.hydrix.com X-Virus-Status: Clean cc: freebsd-amd64@freebsd.org Subject: Re: How to use older libs in 32bit mode? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 22:57:22 -0000 Hello Peter. I have checked several times the mail list and each time I pass those *tests* On 26/11/2004, at 7:42 AM, Peter Wemm wrote: > Things to check: > > * Make sure you have COMPAT_IA32 in your kernel config. For example, > this command should work: > It is > peter@overcee[8:16pm]~/fbp4/hammer/sys/amd64/conf-120> sysctl > kern.elf32 > kern.elf32.fallback_brand: -1 > (The important thing is that it prints something, not the value) > server3# sysctl kern.elf32 kern.elf32.fallback_brand: -1 > > * Make sure you have NOT copied ld-elf or libc from an i386 system. > You *MUST* build at least these two on your machine. How to check: > > peter@overcee[8:17pm]~-123> strings /libexec/ld-elf32.so.1 | grep > libmap32 > /etc/libmap32.conf server3# strings /libexec/ld-elf32.so.1 | grep libmap32 /etc/libmap32.conf > If this comes up empty, you're in trouble. Check that > /usr/libexec/ld-elf32.so.1 and /libexec/ld-elf.so.1 are the same file. > Hum.. They aren't server3# ls -l total 504 -r-xr-xr-x 1 root wheel 173248 Nov 5 13:42 ld-elf.so.1 -r-xr-xr-x 1 root wheel 151620 Nov 26 04:02 ld-elf32.so.1 somebody sent me a copy on a system that did work and they didn't have the same ld-elf files either > If you are running 5.3-stable and not 5.3-release, you can check libc > like this: > > peter@overcee[8:18pm]~-125> objdump --dynamic-syms > /usr/lib32/libc.so.5 | grep fsbase > 00026500 g DF .text 0000002b _amd64_set_fsbase > 00026580 g DF .text 0000004a _amd64_get_fsbase > server3# objdump --dynamic-syms /usr/lib32/libc.so.5 | grep fsbase server3# Hum. Now that's weird. I'm not using 5.3-release anymore but STABLE. This is an extract of the cvsup file i'm using: *default host=cvsup.au.freebsd.org *default base=/usr *default prefix=/usr # The following line is for 4-stable. If you want 3-stable or 2.2-stable, # change "RELENG_4" to "RELENG_3" or "RELENG_2_2" respectively. *default release=cvs tag=RELENG_5 I did a make update last night and recompiled both KERNEL and WORLD > These will not be present on a 5.3-release system. > > Oh wait a second. Did you build your libraries with > WITH_LIB32=yes or by running build32.sh ? I have a suspicion > that build32.sh will produce a bad library now. > I did with both. Same result. First I did a makebuildworld make installworld , tried the simple Hello World program compiled on a FreeBSD 5.3-release i386 machine: core dump Then i deleted the /lib32 and /usr/lib32 and ran the build32.sh scripts. Same result: core dump > BTW: it is helpful to do a ktrace/kdump and show the last few lines. > I suspect there will be a sysarch syscall, followed by a SIGSEGV. If you could give me more details on how to do this it would be great. Thank you for your time and help here Jean-Yves --- Jean-Yves Avenard Hydrix Pty Ltd - Embedding the net www.hydrix.com | fax +61 3 9572 2686 | phone +61 3 9572 0686 ext 100 VoIP: direct: 100@voip.hydrix.com, general: info@voip.hydrix.com