From stdcxx-dev-return-2325-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Fri Nov 03 23:53:17 2006 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 91697 invoked from network); 3 Nov 2006 23:53:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Nov 2006 23:53:04 -0000 Received: (qmail 35333 invoked by uid 500); 3 Nov 2006 23:53:16 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 35314 invoked by uid 500); 3 Nov 2006 23:53:15 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 35303 invoked by uid 99); 3 Nov 2006 23:53:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Nov 2006 15:53:15 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Nov 2006 15:53:00 -0800 Received: from qxvcexch01.ad.quovadx.com (qxvcexch01.ad.quovadx.com [192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id kA3NpfnX024197 for ; Fri, 3 Nov 2006 23:51:41 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 16:52:46 -0700 Message-ID: <454BD649.9010205@roguewave.com> Date: Fri, 03 Nov 2006 16:52:41 -0700 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: [PATCH] Library path fix References: <454BB782.9000500@roguewave.com> In-Reply-To: <454BB782.9000500@roguewave.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Nov 2006 23:52:46.0559 (UTC) FILETIME=[2960A6F0:01C6FFA3] X-Virus-Checked: Checked by ClamAV on apache.org Andrew Black wrote: > Greetings all. > > Attached is a patch that aims to fix a bug that manifests itself when > running 64-bit builds on SPARC Solaris. The issue that arises is that > dynamic builds of this type use the LD_LIBRARY_PATH_64 variable to > determine where to locate shared libraries, rather than the > LD_LIBRARY_PATH variable used almost everywhere else. According to the Environment Variables section of the Sun ld man page: http://docs.sun.com/app/docs/doc/816-5165/6mbb0m9jt?a=view the runtime loader does use LD_LIBRARY_PATH for both 32 and 64-bit libs, but only when the suffix version of the variable is not defined. I.e., the variable with the _64 suffix (or _32 for 32-bit executables) takes precedence over the general LD_LIBRARY_PATH. We appear to set both in our environment so the stdcxx infrastructure needs to use the width-specific variable. But in an environment where only LD_LIBRARY_PATH is set stdcxx should probably use it in favor of the specific variable, otherwise we might cause the loader to fail to find the libraries pointed to by the generic variable. Another alternative might be for us to set the suffixed variable to the concatenation of the generic one and our paths if it's not defined. I.e., in shell, something like if [ -z $LD_LIBRARY_PATH_64 ]; then LD_LIBRARY_PATH_64=$LIBDIR:$LD_LIBRARY_PATH else LD_LIBRARY_PATH_64=$LIBDIR:$LD_LIBRARY_PATH_64 fi Also, I would like to suggest a different name for the variable. How about LDSOVAR? (It's a VARiable specific to LD.SO, the Shared Object LoaDer aka dynamic linker). It would go with LDSOFLAGS. Martin