Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Nov 2004 09:57:09 +1100
From:      Jean-Yves Avenard <jean-yves.avenard@hydrix.com>
To:        Peter Wemm <peter@wemm.org>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: How to use older libs in 32bit mode?
Message-ID:  <560E2314-3F35-11D9-AF21-000D93AD5C52@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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?560E2314-3F35-11D9-AF21-000D93AD5C52>