I'm a regular user on a server running Jaunty x86_64. I need to compile some 32-bit binaries, but the server is not configured to support this. When I try to compile an empty program with -m32, I get the following output:
Code:
$ gcc -m32 test.c
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/libgcc.a when searching for -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
Since I'm not a superuser, I can't apt-get the necessary packages to make this work. I've asked the server's maintainers to install them, but in the meantime, I'd like to try and install the missing libraries into my home directory.
I got as far as downloading and extracting ia32-libs_2.7ubuntu6.1.tar.gz, but the fetch-and-build script fails because it can't find grep-dctrl. Anyway, that looks like maybe it was the wrong approach. At least, I don't see a configure script to pass a prefix to, and that's about all I know how to do when building from source.
I also tried downloading and extracting the relevant Debian packages into my home directory. I actually got a copy of libgcc from the gcc-4.3-multilib package. But even when I add the directory that file to my LD_LIBRARY_PATH, I get the same error message I was getting before from gcc; my new copy of libgcc isn't listed anywhere.
I'm running out of ideas here. Is there a right way to do this?
Thanks for your help,
-Justin