Last Comment Bug 335454 - Unable to find library 'libsoftokn3.sl' on HP-UX 64 bit
: Unable to find library 'libsoftokn3.sl' on HP-UX 64 bit
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: 3.11
: HP HP-UX
: P2 major (vote)
: 3.11.4
Assigned To: Christophe Ravel
:
Mentors:
Depends on:
Blocks: 334843
  Show dependency treegraph
 
Reported: 2006-04-25 16:54 PDT by Christophe Ravel
Modified: 2006-11-20 10:45 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix in mozilla/security/nss/lib/nss/config.mk for HP-UX (1.24 KB, patch)
2006-11-16 11:48 PST, Christophe Ravel
no flags Details | Diff | Splinter Review
Same patch, but with "++" transformed in "+ +" (1.24 KB, patch)
2006-11-16 12:18 PST, Christophe Ravel
nelson: review-
Details | Diff | Splinter Review
Simplier patch (1.10 KB, patch)
2006-11-16 13:24 PST, Christophe Ravel
nelson: review+
wtc: superreview+
Details | Diff | Splinter Review

Description Christophe Ravel 2006-04-25 16:54:01 PDT
When running the NSS tools on HP-UX 64 bit, the loader is able to find libnss3.sl but not libsoftokn3.sl even if these 2 libraries are in the same directory.

example:
bin/64/certutil
lib/64/libnss3.sl
lib/64/libsoftokn3.sl
lib/64/libsoftokn3.chk
lib/64/<all nspr and nss libraries>

$ bin/64/certutil -h
/usr/lib/pa20_64/dld.sl: Unable to find library 'libsoftokn3.sl'.
Killed
Comment 1 Christophe Ravel 2006-04-25 16:58:11 PDT
More information:

The 64 bit build uses -Wl,+b,'$ORIGIN/../../lib/pa20_64:$ORIGIN/../../lib/64:$ORIGIN/../lib' to set the library search path.

At run time, no LD_LIBRARY_PATH nor SHLIB_PATH is set.

All other libraries are found, but not libsoftokn.so

The 32 bit build uses: -Wl,+b,'$ORIGIN/../lib'
This 32 bit build has no issue.

----------------------------------------------------------------------------
LDD OUTPUT:
===========

$ ldd bin/64/certutil
        libssl3.sl =>   /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libssl3.sl
        libsmime3.sl => /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libsmime3.sl
        libnss3.sl =>   /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnss3.sl
        libplc4.sl =>   /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplc4.sl
        libplds4.sl =>  /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplds4.sl
        libnspr4.sl =>  /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnspr4.sl
        libpthread.1 => /lib/pa20_64/libpthread.1
        libm.2 =>       /lib/pa20_64/libm.2
        librt.2 =>      /lib/pa20_64/librt.2
        libc.2 =>       /lib/pa20_64/libc.2
        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnss3.sl =>        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnss3.sl
        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplc4.sl =>        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplc4.sl
        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplds4.sl =>       /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplds4.sl
        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnspr4.sl =>       /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnspr4.sl
        libpthread.1 => /lib/pa20_64/libpthread.1
        libm.2 =>       /lib/pa20_64/libm.2
        librt.2 =>      /lib/pa20_64/librt.2
        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnss3.sl =>        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnss3.sl
        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplc4.sl =>        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplc4.sl
        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplds4.sl =>       /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplds4.sl
        /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnspr4.sl =>       /home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnspr4.sl
        Unable to find library 'libsoftokn3.sl'.

------------------------------------------------------------------------------
TUSC OUTPUT: (equivalent to truss)
============

$ /usr/local/bin/tusc -s open bin/64/certutil -h
open("bin/64/certutil", O_RDONLY|O_LARGEFILE, 0) ......... = 3
open(".", O_RDONLY|O_LARGEFILE, 0) ....................... = 3
open("..", O_RDONLY|O_LARGEFILE, 0) ...................... = 4
open("..", O_RDONLY|O_LARGEFILE, 0) ...................... = 4
open("..", O_RDONLY|O_LARGEFILE, 0) ...................... = 4
open("..", O_RDONLY|O_LARGEFILE, 0) ...................... = 4
open("..", O_RDONLY|O_LARGEFILE, 0) ...................... = 4
open("..", O_RDONLY|O_LARGEFILE, 0) ...................... = 4
open("..", O_RDONLY|O_LARGEFILE, 0) ...................... = 4
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/libssl3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libssl3.sl", O_RDONLY|O_LARGEFILE, 0) = 3
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/libsmime3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libsmime3.sl", O_RDONLY|O_LARGEFILE, 0) = 3
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) = 3
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) = 3
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/libplds4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libplds4.sl", O_RDONLY|O_LARGEFILE, 0) = 3
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0) = 3
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/libpthread.1", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libpthread.1", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../lib/libpthread.1", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libpthread.1", O_RDONLY|O_LARGEFILE, 0) = 3
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/libm.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libm.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../lib/libm.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libm.2", O_RDONLY|O_LARGEFILE, 0) ..... = 3
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/librt.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/librt.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../lib/librt.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/librt.2", O_RDONLY|O_LARGEFILE, 0) .... = 3
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/pa20_64/libc.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../../lib/64/libc.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/home/chravel/security/securitytip/ws_20060420/hpux_64/bin/64/../lib/libc.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libc.2", O_RDONLY|O_LARGEFILE, 0) ..... = 3
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) . ERR#2 ENOENT
open("/usr/lib/pa20_64/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) . ERR#2 ENOENT
open("/usr/lib/pa20_64/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libplds4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libplds4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libplds4.sl", O_RDONLY|O_LARGEFILE, 0)  ERR#2 ENOENT
open("/usr/lib/pa20_64/libplds4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0)  ERR#2 ENOENT
open("/usr/lib/pa20_64/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libpthread.1", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libpthread.1", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libpthread.1", O_RDONLY|O_LARGEFILE, 0) = 3
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libm.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libm.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libm.2", O_RDONLY|O_LARGEFILE, 0) ..... = 3
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/librt.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/librt.2", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/librt.2", O_RDONLY|O_LARGEFILE, 0) .... = 3
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) . ERR#2 ENOENT
open("/usr/lib/pa20_64/libnss3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) . ERR#2 ENOENT
open("/usr/lib/pa20_64/libplc4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libplds4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libplds4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libplds4.sl", O_RDONLY|O_LARGEFILE, 0)  ERR#2 ENOENT
open("/usr/lib/pa20_64/libplds4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0)  ERR#2 ENOENT
open("/usr/lib/pa20_64/libnspr4.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libsoftokn3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("../../../../dist/HP-UXB.11.11_64_OPT.OBJ/lib/libsoftokn3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/lib/pa20_64/libsoftokn3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
open("/usr/lib/pa20_64/libsoftokn3.sl", O_RDONLY|O_LARGEFILE, 0) ERR#2 ENOENT
/usr/lib/pa20_64/dld.sl: Unable to find library 'libsoftokn3.sl'.

------------------------------------------------------------------------------
Comment 2 Christophe Ravel 2006-04-25 16:58:37 PDT
Workaround:
set LD_LIBRARY_PATH
Comment 3 Julien Pierre 2006-06-20 16:31:20 PDT
Retargetting all P2s to 3.11.3 .
Comment 4 Christophe Ravel 2006-11-16 11:48:16 PST
Created attachment 245773 [details] [diff] [review]
Fix in mozilla/security/nss/lib/nss/config.mk for HP-UX

The fix for HP-UX is similar to what is done on Solaris.
Comment 5 Wan-Teh Chang 2006-11-16 11:55:59 PST
Comment on attachment 245773 [details] [diff] [review]
Fix in mozilla/security/nss/lib/nss/config.mk for HP-UX

In the 64-bit PA-RISC case, you specified three directories:

'$$ORIGIN/../../lib/pa20_64:$$ORIGIN/../../lib/64:$$ORIGIN/../lib'

Please only specify what you absolutely need.  Because of our
backward compatibility, any directory we add now can't be removed
in the future.

HP-UX itself doesn't use the lib/64 convention for its system
libraries.  I believe lib/64 is a Solaris convention.
Comment 6 Wan-Teh Chang 2006-11-16 11:59:44 PST
Comment on attachment 245773 [details] [diff] [review]
Fix in mozilla/security/nss/lib/nss/config.mk for HP-UX

Since your products install all the NSS shared libraries in the
same directory, I believe

    MKSHLIB += +b '$$ORIGIN'

is all you need.  You should not need any relative pathnames.
Comment 7 Christophe Ravel 2006-11-16 12:17:02 PST
Wan-Teh,
I took the PATH from cmd/platlibs.mk
I think we use lib/64 at Sun.
Comment 8 Christophe Ravel 2006-11-16 12:18:48 PST
Created attachment 245776 [details] [diff] [review]
Same patch, but with "++" transformed in "+ +"

Trying to workaround a bugzilla bug...
Comment 9 Nelson Bolyard (seldom reads bugmail) 2006-11-16 12:28:27 PST
Comment on attachment 245776 [details] [diff] [review]
Same patch, but with "++" transformed in "+ +"

I agree with Wan-Teh's comment 6. 
So, I am removing my r+ from the second patch.  Sorry.
Comment 10 Christophe Ravel 2006-11-16 13:24:34 PST
Created attachment 245782 [details] [diff] [review]
Simplier patch

The libraries used by libnss3.sl are loaded from the same directory.
The 64 bit loader on HP-UX takes $ORIGIN from libnss3.sl, not for the executable using libnss3.sl.

This patch changes only pa-risc with 64 bit binaries (not IA64).
There is no need for a fix for pa-risc with 32 bit binaries, it already works.
Comment 11 Wan-Teh Chang 2006-11-16 14:58:59 PST
Comment on attachment 245782 [details] [diff] [review]
Simplier patch

I believe that you can just say:

  ifeq ($(OS_ARCH), HP-UX) 
  MKSHLIB += +b '$$ORIGIN'
  endif
Comment 12 Nelson Bolyard (seldom reads bugmail) 2006-11-16 17:27:20 PST
Comment on attachment 245782 [details] [diff] [review]
Simplier patch

r=nelson, provided it is tested
Comment 13 Christophe Ravel 2006-11-16 17:34:25 PST
Committed on tip:
Checking in config.mk;
/cvsroot/mozilla/security/nss/lib/nss/config.mk,v  <--  config.mk
new revision: 1.27; previous revision: 1.26
done

Committed on NSS_3_11_BRANCH:
Checking in config.mk;
/cvsroot/mozilla/security/nss/lib/nss/config.mk,v  <--  config.mk
new revision: 1.26.2.1; previous revision: 1.26
done

Note You need to log in before you can comment on or make changes to this bug.