From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Dec 10 18:20:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D731B1065673 for ; Wed, 10 Dec 2008 18:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B54C48FC23 for ; Wed, 10 Dec 2008 18:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAIK1sr056665 for ; Wed, 10 Dec 2008 18:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mBAIK1AM056664; Wed, 10 Dec 2008 18:20:01 GMT (envelope-from gnats) Resent-Date: Wed, 10 Dec 2008 18:20:01 GMT Resent-Message-Id: <200812101820.mBAIK1AM056664@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bengt Ahlgren Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F091B1065670 for ; Wed, 10 Dec 2008 18:14:27 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id E0FE58FC14 for ; Wed, 10 Dec 2008 18:14:27 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAIER0B071438 for ; Wed, 10 Dec 2008 18:14:27 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mBAIERYg071437; Wed, 10 Dec 2008 18:14:27 GMT (envelope-from nobody) Message-Id: <200812101814.mBAIERYg071437@www.freebsd.org> Date: Wed, 10 Dec 2008 18:14:27 GMT From: Bengt Ahlgren To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/129553: [patch] print/acroread8 can't launch some programs due to LD_LIBRARY_PATH X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 18:20:02 -0000 >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@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: