ports/129553: [patch] print/acroread8 can't launch some programs due to LD_LIBRARY_PATH
Bengt Ahlgren
bengta at sics.se
Wed Dec 10 18:20:02 UTC 2008
>Number: 129553
>Category: ports
>Synopsis: [patch] print/acroread8 can't launch some programs due to LD_LIBRARY_PATH
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Dec 10 18:20:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Bengt Ahlgren
>Release: 7.1-BETA2 (approx)
>Organization:
>Environment:
FreeBSD zeus.bga.sics.se 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #1: Mon Nov 3 00:52:40 CET 2008 root at zeus.bga.sics.se:/usr/obj/usr/src/sys/ZEUS71 amd64
>Description:
When testing acroread8 (on 7.1-PRE) I got the following error when
trying to print using KDE's kprinter on i386:
The following error occurred while printing...
'/libexec/ld-elf.so.1: /usr/local/Adobe/Reader8/ENU/Adobe/Reader8/Reader/intellinux/lib/libstdc++.so.6: unsupported file layout'
and on amd64:
The following error occurred while printing...
'/libexec/ld-elf.so.1: Shared object "libm.so.6" not found, required by "libstdc++.so.6"'
The reason is that the acroread launch script sets LD_LIBRARY_PATH to:
LD_LIBRARY_PATH=/usr/local/Adobe/Reader8/ENU/Adobe/Reader8/Reader/intellinux/lib:/usr/local/Adobe/Reader8/ENU/Adobe/Reader8/Reader/intellinux/sidecars:/..//usr/local/lib/linux-nvu
which makes (some) helper programs fail to link its shared libs if it
happens to pick up a (Linux) library from the above. libstdc++.so.6
is one of them.
The problem also exist for launching a browser.
>How-To-Repeat:
Enter "kprinter" as the print program in the print dialogue, or try to
use firefox as the browser (in edit/preferences/internet). The latter
does however not result in an error message.
>Fix:
The problem is easily worked around for the print program - you can do
"env -u LD_LIBRARY_PATH kprinter" for instance directly in the print
dialogue. But that does not work for the browser executable set in
the "edit/preferences/internet" dialogue. So if you want to be able
to launch a browser from acroread, you need a wrapper script.
I see that the Linux dynamic linker
(/usr/compat/linux/lib/ld-linux.so.2) has a flag:
--library-path PATH use given PATH instead of content of the environment
variable LD_LIBRARY_PATH
so I tried to patch the acroread launch script in
/usr/local/Adobe/Reader8/ENU/Adobe/Reader8/bin with:
--- acroread.orig 2008-10-08 06:28:27.000000000 +0200
+++ acroread 2008-12-08 22:59:46.000000000 +0100
@@ -16,7 +16,9 @@
LaunchBinary()
{
if [ "`uname -s`" = "Linux" ] && [ ! -x /lib/ld-lsb.so.3 ]; then
- exec /lib/ld-linux.so.2 ${1+"$@"}
+ TEMP_LIB_PATH="$LD_LIBRARY_PATH"
+ unset LD_LIBRARY_PATH
+ exec /lib/ld-linux.so.2 --library-path "$TEMP_LIB_PATH" ${1+"$@"}
else
exec ${1+"$@"}
fi
Question: what is a proper fix for these problems???
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list