DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 9th December 2008
Gemini Gemini is offline
New User
 
Join Date: Dec 2008
Posts: 7
Thanked 0 Times in 0 Posts
Default I386 ELF32 binary on AMD64 system can't find shared libraries

Hello all,

I have encountered an issue trying to execute an I386 ELF32 binary on my AMD64 platform. When I attempt to execute the binary, it reports back with the following error:

Code:
[user@k8 ~]$ ./zsnes
/libexec/ld-elf.so.1: /usr/local/lib/libSDL-1.2.so.11: unsupported file layout
Now, it appears that the binary is attempting to link to a 64-bit version of the library that I have installed rather than the 32-bit version of the library. This is odd because I do have the 32-bit library installed, and it is listed in the hints cache:

Code:
[user@k8 ~]$ ldconfig -r |grep libSDL
359:-lSDL-1.2.11 => /usr/X11R6/lib/libSDL-1.2.so.11
674:-lSDL-1.2.11 => /usr/local/lib/libSDL-1.2.so.11

[user@k8 ~]$ ldconfig -32 -r |grep libSDL
76:-lSDL-1.2.11 => /usr/lib32/libSDL-1.2.so.11
However, when I attempt to dump the library dependencies of the binary, it doesn't show up:

Code:
[user@k8 ~/bin]$ ldd32 ./zsnes 
./zsnes:
	libz.so.3 => /usr/lib32/libz.so.3 (0x2834d000)
	libSDL-1.2.so.11 => not found (0x0)
	libpng.so.5 => not found (0x0)
	libstdc++.so.5 => /usr/lib32/libstdc++.so.5 (0x2835f000)
	libm.so.4 => /usr/lib32/libm.so.4 (0x28434000)
	libpthread.so.2 => /usr/lib32/libpthread.so.2 (0x2844a000)
	libc.so.6 => /usr/lib32/libc.so.6 (0x28471000)
I've run elfdump against all of libraries, and they all come back with:

Code:
elf header:

	e_ident: ELFCLASS32 ELFDATA2LSB ELFOSABI_FREEBSD
	e_type: ET_DYN
	e_machine: EM_386
	e_version: EV_CURRENT
The only difference between the 32-bit libraries being detected by ldd32 and those that are missing is that I hand installed the latter libraries myself. I grabbed the parent package from the i386/packages-6.3, unrolled the tarballs, and copied the files over manually, checked permissions, and then ran ldconfig -R. No luck.

So, what am I doing wrong here? Is there something special about the libraries installed with the lib32 distribution set versus ones in the wild?

System is running FreeBSD 6.4-RELEASE/AMD64. Kernel was built with "options COMPAT_IA32".

Last edited by Gemini; 9th December 2008 at 06:52 AM. Reason: missed pasting a line with my ldconfig -r output
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone with AMD64 random panics on i386? indiocolifa FreeBSD General 13 24th March 2009 02:53 AM
shared libraries and linux emulation Business_woman FreeBSD General 4 16th November 2008 10:03 AM
Modular xorg binary packages for i386? GullibleJones NetBSD Package System (pkgsrc) 1 23rd September 2008 06:20 PM
i386 drivers on amd64 kienjakenobi FreeBSD Ports and Packages 5 25th June 2008 05:37 PM
Revert from AMD64 to i386 chavez243 FreeBSD General 6 6th May 2008 12:24 PM


All times are GMT. The time now is 03:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick