How to use older libs in 32bit mode?

Jean-Yves Avenard jean-yves.avenard at
Thu Nov 25 14:57:22 PST 2004

Hello Peter.

I have checked several times the mail list and each time I pass those 

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 at 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 at overcee[8:17pm]~-123> strings /libexec/ | grep 
> libmap32
> /etc/libmap32.conf

server3# strings /libexec/ | grep libmap32

> If this comes up empty, you're in trouble.  Check that
> /usr/libexec/ and /libexec/ 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
-r-xr-xr-x  1 root  wheel  151620 Nov 26 04:02

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 at overcee[8:18pm]~-125> objdump --dynamic-syms 
> /usr/lib32/ | grep fsbase
> 00026500 g    DF .text  0000002b _amd64_set_fsbase
> 00026580 g    DF .text  0000004a _amd64_get_fsbase

server3# objdump --dynamic-syms /usr/lib32/ | grep fsbase

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 base=/usr
*default prefix=/usr
# The following line is for 4-stable.  If you want 3-stable or 
# 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 ?  I have a suspicion
> that 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 
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 Avenard
Hydrix Pty Ltd - Embedding the net | fax +61 3 9572 2686 | phone +61 3 9572 0686 ext 100
VoIP: direct: 100 at, general: info at

More information about the freebsd-amd64 mailing list