LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems using qemu-x86_64 (http://www.linuxquestions.org/questions/linux-software-2/problems-using-qemu-x86_64-a-756869/)

prokhor 09-21-2009 07:21 PM

Problems using qemu-x86_64
 
Hi there

I try to run 64 bit binaries on an IA32...
qemu provides a script called qemu-x86_64 which allows to run 64 bit software on 32 bit.
The first problem was that the (64 bit binary) searched for some 64 bit library in lib64 which i solved by:
"
mkdir lib64
cp library lib64
"

Now I have two problems:
my 64 bit binary searches for some other library (libpthread.so.0) and is trying to load it from /etc/ld.so.preload which originally doesn't exist on my OSes (SUSE 11.1 / Mandriva)
I tryed to make a /etc/ld.so.preload and to put paths in it so it can load. It didn't work.

ERROR: ld.so: object '/lib64/libpthread.so.0' from /etc/ld.so.preload cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib' from /etc/ld.so.preload cannot be preloaded: ignored.
.program: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

the -strace option didn't give me more information than that libpthread.so.0 couldn't be preloaded from /etc/ld.so.preload .

Any suggestions?

Rgds

prokhor 09-21-2009 07:26 PM

PS: with -strace:

qemu-x86_64 -strace program
4702 uname(0x4007ecc0) = 0
4702 brk(0,1074261323,0,1074270920,33954567,4) = 0x00000000005e8000
4702 mmap(0,4096,3,34,4294967295,0) = 0x0000000042081000
4702 open("/etc/ld.so.preload",0,0) = 5
4702 fstat(5,(nil)) = 0
4702 mmap(0,32,3,2,5,0) = 0x0000000042082000
4702 close(5) = 0
4702 open("/lib64/libpthread.so.0",0,0) = 5
4702 read(5,0,1074259688) = 640
4702 close(5) = 0
4702 writev(2,(nil),0x4007e600)ERROR: ld.so: object '/lib64/libpthread.so.0' from /etc/ld.so.preload cannot be preloaded: ignored.
= 100
4702 open("/usr/lib",0,0) = 5
4702 read(5,0,1074259688) = -1 errno=21 (Is a directory)
4702 close(5) = 0
4702 writev(2,(nil),0x4007e600)ERROR: ld.so: object '/usr/lib' from /etc/ld.so.preload cannot be preloaded: ignored.
= 86
4702 munmap(0x42082000,0) = 0
4702 open("/etc/ld.so.cache",0,0) = 5
4702 fstat(5,(nil)) = 0
4702 mmap(0,136445,1,2,5,0) = 0x0000000042083000
4702 close(5) = 0
4702 open("/lib64/tls/i686/libpthread.so.0",0,0) = 5
4702 read(5,0,1074259400) = 640
4702 close(5) = 0
4702 stat("/lib64/tls/i686",(nil)) = 0
4702 open("/lib64/tls/libpthread.so.0",0,0) = -1 errno=2 (No such file or directory)
4702 stat("/lib64/tls",(nil)) = 0
4702 open("/lib64/i686/libpthread.so.0",0,0) = -1 errno=2 (No such file or directory)
4702 stat("/lib64/i686",(nil)) = -1 errno=2 (No such file or directory)
4702 open("/lib64/libpthread.so.0",0,0) = 5
4702 read(5,0,1074259400) = 640
4702 close(5) = 0
4702 stat("/lib64",(nil)) = 0
4702 open("/usr/lib64/tls/i686/libpthread.so.0",0,0) = 5
4702 read(5,0,1074259400) = 640
4702 close(5) = 0
4702 stat("/usr/lib64/tls/i686",(nil)) = 0
4702 open("/usr/lib64/tls/libpthread.so.0",0,0) = 5
4702 read(5,0,1074259400) = 640
4702 close(5) = 0
4702 stat("/usr/lib64/tls",(nil)) = 0
4702 open("/usr/lib64/i686/libpthread.so.0",0,0) = 5
4702 read(5,0,1074259400) = 640
4702 close(5) = 0
4702 stat("/usr/lib64/i686",(nil)) = 0
4702 open("/usr/lib64/libpthread.so.0",0,0) = 5
4702 read(5,0,1074259400) = 640
4702 close(5) = 0
4702 stat("/usr/lib64",(nil)) = 0
4702 writev(2,(nil),0x4007e070)genera: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
= 121
4702 exit_group(127)


All times are GMT -5. The time now is 12:55 PM.