You are not logged in.
Hi All,
I'm trying to build a program as a 32-bit binary on my x86_64 machine and run it locally. The program is:
// test.c
int main(void) {
return 0;
}
Everything works as expected when building for 64-bit:
$ /usr/bin/gcc test.c
$ file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x30e6ad62aa6052e7e6fedd7aca341036b2c3927d, not stripped
$ ldd a.out
linux-vdso.so.1 (0x00007fffecbce000)
libc.so.6 => /lib/libc.so.6 (0x00007f1c4cdfb000)
/lib/ld-linux-x86-64.so.2 (0x00007f1c4d19f000)
$ ./a.out
$
32-bit doesn't work, though:
$ /usr/bin/gcc -m32 test.c
$ file a.out
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x36c22ccf4fba70042ed49700f3bb2c54c347be5b, not stripped
$ ldd a.out
not a dynamic executable
$ ./a.out
bash: ./a.out: No such file or directory
I have gcc-multilib and lib32-glibc installed. Any ideas what the problem is?
Thanks!
Last edited by deadguys (2012-07-22 00:56:17)
Offline
Quick update: it looks like I can't run any 32-bit programs, e.g. skype. I used to be able to, and recently updated, so I guess that probably has something to do with it...
Offline
Try to reinstall lib32-glibc. You need to have /lib/ld-linux.so.2 (or symlink /lib -> /usr/lib and /usr/lib/ld-linux.so.2)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Thanks! /lib is not symlinked to /usr/lib, but I symlinked:
# ln -s /usr/lib/ld-linux.so.2 /lib/ld-linux.so.2
Which did the trick.
Offline
Thanks! /lib is not symlinked to /usr/lib
Then your glibc is not up to date.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline