This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to make an application look somewhere other than /lib for ld-linux.so.2
- From: Daniel Kegel <dank at kegel dot com>
- To: gcc at gcc dot gnu dot org, "Mark Cuss" <mcuss at cdlsystems dot com>
- Date: Thu, 14 Jul 2005 15:07:23 -0700
- Subject: How to make an application look somewhere other than /lib for ld-linux.so.2
"Mark Cuss" <mcuss@cdlsystems.com> wrote:
I'm trying to get myself a group of libraries that I can distribute
> with my program so that they'll run on any distro.
> I run into problems all the time when different distros have different versions of system libraries like libstdc++, libgcc, libc, etc.
...
Is there a way to somehow configure gcc build executables that look elsewhere
for ld-linux.so.2, or is what I'm trying to do simply not possible?
I'd really like to have a set of libraries with my program so that
it's binary compatible with other distros... there must be a way.
If anyone has any tips or advice I'd appreciate it.
There are two official ways to go:
1) Build static binaries. (If your apps use libnss*.a, you may want to
configure your toolchain's glibc with --enable-static-nss; I'm
doing that now for one project. Don't tell drepper.)
2) Build your apps with lsbcc. That will link to the LSB's
frozen version of libstdc++, etc.
#1 is doable right now. #2 is, too, but requires your users to
install your distro's LSB runtime package.
- Dan