Path mapping wrapper application?

From: Aki Niimura
Date: Fri Mar 13 2009 - 03:20:09 EST


Hello Linux experts,

I have one application that requires glibc 2.1.3.
I would like to use it with other Linux applications that use more
recent glibc version (such as glibc 2.3.2).
I originally thought I could workaround this problem by installing
glibc 2.1.3 library files in another directory and set LD_LIBRARY_PATH
locally.

Unfortunately it didn't work.
The trace I got using strace showed that the application didn't use
LD_LIBRARY_PATH environment variable to load the following key files.
/lib/libc.so.6
/lib/ld-linux.so.2

The paths for these libraries seems embedded in the application binary.

Now, I thought I could work around the problem if I write a simple
wrapper program to map directories.
ex.
$ wrapper_app old_app

old_app -> /lib/libc.so.6 --> /usr/local/old_lib/libc.so.6

Before writing such application by myself, I'm wondering if there is
such linux program already available.
Also, maybe there is another way to deal with this kind of problem in Linux.
Some OS provides a way to dynamically map directories.

BTW, I'm very new to Linux but why the same libc.so.6 name is being
used for apparently not compatible libraries?

If the file name is different, for example libc.so.6.2.1, I wouldn't
have this problem.
Maybe, there is a historical reason behind this. But this glibc
version issue has caused several problems around me already.

Any suggestions will be greatly appreciated.

Best regards,
Aki Niimura
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/