WARNING: This e-mail has been altered by MIMEDefang.  Following this
paragraph are indications of the actual changes made.  For more
information about your site's MIMEDefang policy, contact
MIMEDefang Administrator's Full Name <[EMAIL PROTECTED]>.  For more information 
about MIMEDefang, see:

            http://www.roaringpenguin.com/mimedefang/enduser.php3

An attachment named '00-solaris.sh' was converted to 'defang-1.binary'.
To recover the file, right-click on the attachment and Save As
'00-solaris.sh'

Hi,

if one does "source ${EPREFIX}/etc/profile" to switch to prefix, and
there's an LD_LIBRARY_PATH preset from system (why ever), some binaries
in prefix might not work, because they might find different sharedlibs
than they are expected to do:

  $ . /tools/haubi/gentoo/sauxy3/etc/profile
  $ type groff
  /tools/haubi/gentoo/sauxy3/usr/bin/groff
  $ ldd /tools/haubi/gentoo/sauxy3/usr/bin/groff
        libstdc++.so.6 =>        /usr/sfw/lib/libstdc++.so.6
        libstdc++.so.6 (GLIBCXX_3.4) =>  (version not found)
        libstdc++.so.6 (CXXABI_1.3) =>   (version not found)
        libm.so.2 =>     /lib/libm.so.2
        libgcc_s.so.1 =>         /usr/sfw/lib/libgcc_s.so.1
        libc.so.1 =>     /lib/libc.so.1
  $ echo $LD_LIBRARY_PATH
  
/usr/local/lib:/usr/sfw/lib:/usr/local/gcc-3.3.6/lib:/opt/sfw/lib:/oracle10/product/10.1.0/lib

So, I put attached file into ${EPREFIX}/etc/profile.d/00-solaris.sh,
which could be generated by some baselayout and gets sourced by
etc/profile, ldd then says:

  $ echo $LD_LIBRARY_PATH
  
/tools/haubi/gentoo/sauxy3/lib:/tools/haubi/gentoo/sauxy3/usr/lib:/usr/local/lib:/usr/sfw/lib:/usr/local/gcc-3.3.6/lib:/opt/sfw/lib:/oracle10/product/10.1.0/lib
  $ ldd /tools/haubi/gentoo/sauxy3/usr/bin/groff
        libstdc++.so.6 =>        
/net/toolsjunk/haubi/gentoo/sauxy3/lib/libstdc++.so.6
        libm.so.2 =>     /lib/libm.so.2
        libgcc_s.so.1 =>         
/net/toolsjunk/haubi/gentoo/sauxy3/lib/libgcc_s.so.1
        libc.so.1 =>     /lib/libc.so.1

This is the same as when unsetting LD_LIBRARY_PATH, which I don't want
to do in this case, because I want continue to use some executables from
outside the prefix.

Thing is, when LD_LIBRARY_PATH is preset, builtin DT_RUNPATH
(LDFLAGS=-Wl,-R...) is searched too late to find the correct libraries.

Comments ?

/haubi/
-- 
Michael Haubenwallner                    SALOMON Automation GmbH
Forschung & Entwicklung                  A-8114 Friesach bei Graz
mailto:[EMAIL PROTECTED]  http://www.salomon.at
No HTML/MIME please, see http://expita.com/nomime.html

Attachment: defang-1.binary
Description: defang-1.binary

Reply via email to