Hi Roger, I had a similar problem with an older of arkeia which only ran with GLIB v2.0 and required LD_ASSUME_KERNEL to be set, my solution was to use a wrapper script that set the relavent environment variables before calling the original executable. The script works by renaming the original executable and then creating a symlink of the same name to the wrapper script, which sets the variables and then calls the original exec. The install/uninstall function does not delete the original exec. The script also takes care of passing any return codes back to the calling environment. I've attached the wrapper script in case it is useful. 1. Put the script in /usr/local/bin or wherever 2. If you change the script name or put it anywhere else then edit the line SRC= accordingly (this step is very important or it doesn't work). 3. To "wrap" the executable type: wrapper_glib20.sh install <path/program name> 4. To remove the wrapper type: wrapper_glib20.sh uninstall <path/program name> E.g. If we had a program called "/bin/weirdlibs" then the syntax would be: wrapper_glib20.sh install /bin/weirdlibs Or, wrapper_glib20.sh uninstall /bin/weirdlibs The executable is called as before by it's original name. Although the example wrapper is for LD_ASSUME_KERNEL you could modify it to set LD_RUN_PATH or similar. I'm sure there is a more elegant method and a better written script but this works for me. Rgds, Simon
-----Original Message----- From: Roger Oberholtzer [mailto:roger@opq.se] Sent: Wednesday, September 20, 2006 22:35 To: suse-programming-e@suse.com Subject: [suse-programming-e] LD_RUN_PATH on SUSE 10.x
I have a situation where a package installs some of its own libraries, as well as one library with the exact same name as on in /usr/lib. However, the package's library was compiled with different flags and is not compatible with the one in /usr/lib.
If I set LD_RUN_PATH to include the package's libraries, my executables that link with the library in /usr/lib pick up the one in the package's directory instead when they are run.
IIRC, SVR4.2 (e.g., UnixWare) had syntax for LD_RUN_PATH that told if the paths in LD_RUN_PATH should be checked before or after the system directories. Is there any such capability for Linux? I would in fact prefer to put the package's library directory in ldconfig. However, doing so keeps things like KDE, GNOME and YAST from running, as they then pick up the offending/incompatible version of the library. That is why I am even bothering with LD_RUN_PATH.
-- Roger Oberholtzer
-- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e