GNU bug report logs - #10704
All GCC "libtool" libraries need relinking during installation on hppa*-*-hpux* (GCC PR target/52098)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: libtool; Reported by: John David Anglin <dave.anglin@HIDDEN>; dated Thu, 2 Feb 2012 21:19:01 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 Feb 2012 21:18:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 02 16:18:55 2012
Received: from localhost ([127.0.0.1]:51356 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Rt43S-0001H0-A2
	for submit <at> debbugs.gnu.org; Thu, 02 Feb 2012 16:18:54 -0500
Received: from eggs.gnu.org ([140.186.70.92]:42696)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <dave.anglin@HIDDEN>) id 1Rt40p-0001CO-Lk
	for submit <at> debbugs.gnu.org; Thu, 02 Feb 2012 16:16:18 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dave.anglin@HIDDEN>) id 1Rt40G-0000jl-ED
	for submit <at> debbugs.gnu.org; Thu, 02 Feb 2012 16:15:37 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:48173)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dave.anglin@HIDDEN>) id 1Rt40G-0000jh-Ck
	for submit <at> debbugs.gnu.org; Thu, 02 Feb 2012 16:15:36 -0500
Received: from eggs.gnu.org ([140.186.70.92]:47833)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dave.anglin@HIDDEN>) id 1Rt40F-0004UL-2v
	for bug-libtool@HIDDEN; Thu, 02 Feb 2012 16:15:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dave.anglin@HIDDEN>) id 1Rt40B-0000il-U4
	for bug-libtool@HIDDEN; Thu, 02 Feb 2012 16:15:34 -0500
Received: from mail16.primus.ca ([216.254.141.183]:56621
	helo=mail-06.primus.ca) by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dave.anglin@HIDDEN>) id 1Rt40B-0000ia-JY
	for bug-libtool@HIDDEN; Thu, 02 Feb 2012 16:15:31 -0500
Received: from luxcom.gta.igs.net ([216.58.40.249] helo=[192.168.0.181])
	by mail-06.primus.ca with esmtpa (Exim 4.72)
	(envelope-from <dave.anglin@HIDDEN>)
	id 1Rt409-0004wd-1x; Thu, 02 Feb 2012 16:15:29 -0500
Message-ID: <4F2AFCF2.2020802@HIDDEN>
Date: Thu, 02 Feb 2012 16:15:30 -0500
From: John David Anglin <dave.anglin@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 5.1;
	rv:9.0) Gecko/20111222 Thunderbird/9.0.1
MIME-Version: 1.0
To: bug-libtool@HIDDEN
Subject: All GCC "libtool" libraries need relinking during installation on
	hppa*-*-hpux* (GCC PR target/52098)
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Authenticated: danglin-lux@HIDDEN - luxcom.gta.igs.net ([192.168.0.181])
	[216.58.40.249]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -3.5 (---)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 02 Feb 2012 16:18:53 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.5 (---)

The following GCC libraries are incorrectly installed:
libffi.sl, libgcj.sl, libgomp.sl, libobjc.sl, libquadmath.sl,
libssp.sl and libstdc++.sl.

The issue is slightly different on 32 and 64-bit targets, but
essentially the problem is the original links encode rpaths
from the build tree that remain in the installed libraries.
This occurs because "fast install" is used for all libraries
that don't have a dependent libtool library.

Here is an example of an incorrectly installed 32-bit library:

-bash-3.2$ chatr libstdc++.sl
libstdc++.sl:
          shared library
          shared library dynamic path search:
              SHLIB_PATH     disabled  second
              embedded path  enabled   first  /opt/gnu/gcc/gcc-4.6/lib
          internal name:
              libstdc++.sl.6
          shared library list:
              dynamic   /usr/lib/libm.2
              dynamic   /mnt/gnu/gcc/obj32dir/./gcc/libgcc_s.4

The dynamic path for libgcc_s.4 is from the original build.  The
HP dynamic linker uses the hardcoded path
/mnt/gnu/gcc/obj32dir/./gcc/libgcc_s.4
first and then the embedded path in trying to locate libgcc_s.4.
Searching the hardcoded path is a nuisance and a security issue.

Here is an example of a library which has been correctly installed:

-bash-3.2$ chatr libgfortran.sl
libgfortran.sl:
          shared library
          shared library dynamic path search:
              SHLIB_PATH     disabled  second
              embedded path  enabled   first  /opt/gnu/gcc/gcc-4.6/lib
          internal name:
              libgfortran.sl.3
          shared library list:
              dynamic   /opt/gnu/gcc/gcc-4.6/lib/libquadmath.sl.0
              dynamic   /usr/lib/libm.2
              dynamic   /usr/lib/libc.2
              dynamic   /opt/gnu/gcc/gcc-4.6/lib/libgcc_s.4

The 64-bit linker doesn't hardcode paths into the library list but the
default behavior is to concatenate -L paths into the embedded path:

-bash-3.2$ chatr libstdc++.sl
libstdc++.sl:
          64-bit ELF shared library
          shared library dynamic path search:
              LD_LIBRARY_PATH    enabled  first
              SHLIB_PATH         enabled  second
              embedded path      enabled  third
/mnt/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/src:/mnt/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/src/.libs:/mnt/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/src:/mnt/gnu/gcc/objdir/hppa64-hp-hpux11.11/libstdc++-v3/src/.libs:/mnt/gnu/gcc/objdir/./gcc:/usr/ccs/lib/pa20_64:/opt/langtools/lib/pa20_64:/lib/pa20_64:/usr/lib/pa20_64:/mnt/gnu/gcc/objdir/./gcc:/usr/ccs/lib/pa20_64:/opt/langtools/lib/pa20_64:/lib/pa20_64:/usr/lib/pa20_64
          internal name:
              libstdc++.sl.6
          shared library list:
              libm.2
              libgcc_s.4

Again libgfortran.sl is an example of a correctly installed library:

-bash-3.2$ chatr libgfortran.sl
libgfortran.sl:
          64-bit ELF shared library
          shared library dynamic path search:
              LD_LIBRARY_PATH    enabled  first
              SHLIB_PATH         enabled  second
              embedded path      enabled  third  /opt/gnu64/gcc/gcc-4.6/lib
          internal name:
              libgfortran.sl.3
          shared library list:
              libquadmath.sl.0
              libm.2
              libc.2
              libgcc_s.4

Relinking is the only way I can see to change the hardcoded library paths
for the 32-bit libraries.  I think the same could be done for the 64-bit
libraries.  However, I believe the +nodefaultrpath and +b path options
could be used on the initial link to generate libraries that are directly
installable.

Dave
-- 
John David Anglin    dave.anglin@HIDDEN





Acknowledgement sent to John David Anglin <dave.anglin@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#10704; Package libtool. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.