<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Loading libraries from custom path in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/loading-libraries-from-custom-path/m-p/5389035#M639748</link>
    <description>&lt;P&gt;I am trying to build openldap using gcc. The build completes successfully. The problem is that library path is getting hardcoded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the following command works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ ldd libraries/libldap/.libs/libldap.sl 
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2
        /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2
        /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib/libcrypto.sl.0.9.7 =&amp;gt;   /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib/libcrypto.sl.0.9.7
        /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2
        /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib/libssl.sl.0.9.7 =&amp;gt;      /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib/libssl.sl.0.9.7
        /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2
        /home/njakhar/njakhar/ovaldi/3rdParty-build/HP-UX/openldap-2.4.23/libraries/libldap/../../libraries/liblber/.libs/liblber-2.4.sl.7 =&amp;gt;   /home/njakhar/njakhar/ovaldi/3rdParty-build/HP-UX/openldap-2.4.23/libraries/libldap/../../libraries/liblber/.libs/liblber-2.4.sl.7
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I move /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib to current directory and set SHLIB_PATH to this new path ldd fails:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ SHLIB_PATH=lib ldd libraries/libldap/.libs/libldap.sl 
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2
        /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2
/usr/lib/dld.sl: Can't find path for shared library: libcrypto.sl.0.9.7
/usr/lib/dld.sl: No such file or directory&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get around this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: The build is already using -fPIC.&lt;/P&gt;</description>
    <pubDate>Sun, 13 Nov 2011 21:20:43 GMT</pubDate>
    <dc:creator>slash_blog</dc:creator>
    <dc:date>2011-11-13T21:20:43Z</dc:date>
    <item>
      <title>Loading libraries from custom path</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/loading-libraries-from-custom-path/m-p/5389035#M639748</link>
      <description>&lt;P&gt;I am trying to build openldap using gcc. The build completes successfully. The problem is that library path is getting hardcoded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the following command works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ ldd libraries/libldap/.libs/libldap.sl 
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2
        /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2
        /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib/libcrypto.sl.0.9.7 =&amp;gt;   /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib/libcrypto.sl.0.9.7
        /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2
        /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib/libssl.sl.0.9.7 =&amp;gt;      /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib/libssl.sl.0.9.7
        /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2
        /home/njakhar/njakhar/ovaldi/3rdParty-build/HP-UX/openldap-2.4.23/libraries/libldap/../../libraries/liblber/.libs/liblber-2.4.sl.7 =&amp;gt;   /home/njakhar/njakhar/ovaldi/3rdParty-build/HP-UX/openldap-2.4.23/libraries/libldap/../../libraries/liblber/.libs/liblber-2.4.sl.7
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I move /home/njakhar/njakhar/ovaldi/3rdParty/HP-UX/lib to current directory and set SHLIB_PATH to this new path ldd fails:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ SHLIB_PATH=lib ldd libraries/libldap/.libs/libldap.sl 
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2
        /usr/lib/libdld.2 =&amp;gt;    /usr/lib/libdld.2
        /usr/lib/libc.2 =&amp;gt;      /usr/lib/libc.2
/usr/lib/dld.sl: Can't find path for shared library: libcrypto.sl.0.9.7
/usr/lib/dld.sl: No such file or directory&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get around this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: The build is already using -fPIC.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2011 21:20:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/loading-libraries-from-custom-path/m-p/5389035#M639748</guid>
      <dc:creator>slash_blog</dc:creator>
      <dc:date>2011-11-13T21:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Loading libraries from custom path</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/loading-libraries-from-custom-path/m-p/5389169#M639749</link>
      <description>&lt;P&gt;&amp;gt;The problem is that library path is getting hardcoded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The linker provides several options:&lt;/P&gt;&lt;P&gt;-Wl,+s: enable SHLIB_PATH/LD_LIBRARY_PATH (for ELF files)&lt;/P&gt;&lt;P&gt;-Wl,+b: provide path in load module.&lt;/P&gt;&lt;P&gt;$ORIGIN: relative paths.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;set SHLIB_PATH to this new path ldd fails:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to use chatr(1) to see the path options.&amp;nbsp; You can also use "chatr +s enable" to enable SHLIB_PATH.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2011 03:30:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/loading-libraries-from-custom-path/m-p/5389169#M639749</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-11-14T03:30:48Z</dc:date>
    </item>
  </channel>
</rss>

