Closed Bug 335454 Opened 18 years ago Closed 18 years ago

Unable to find library 'libsoftokn3.sl' on HP-UX 64 bit

Categories

(NSS :: Libraries, defect, P2)

3.11
HP
HP-UX

Tracking

(Not tracked)

RESOLVED FIXED
3.11.4

People

(Reporter: christophe.ravel.bugs, Assigned: christophe.ravel.bugs)

References

Details

Attachments

(1 file, 2 obsolete files)

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
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'.

------------------------------------------------------------------------------
Priority: -- → P2
Workaround:
set LD_LIBRARY_PATH
Blocks: 334843
Whiteboard: regression?
Target Milestone: 3.11.1 → 3.11.2
Retargetting all P2s to 3.11.3 .
Target Milestone: 3.11.2 → 3.11.3
Assignee: nobody → christophe.ravel.bugs
Target Milestone: 3.11.3 → 3.11.4
The fix for HP-UX is similar to what is done on Solaris.
Attachment #245773 - Flags: superreview?(nelson)
Attachment #245773 - Flags: review?(wtchang)
Status: NEW → ASSIGNED
OS: Linux → HP-UX
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 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.
Wan-Teh,
I took the PATH from cmd/platlibs.mk
I think we use lib/64 at Sun.
Trying to workaround a bugzilla bug...
Attachment #245776 - Flags: superreview?(wtchang)
Attachment #245776 - Flags: review+
Attachment #245773 - Attachment is obsolete: true
Attachment #245773 - Flags: superreview?(nelson)
Attachment #245773 - Flags: review?(wtchang)
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.
Attachment #245776 - Flags: review+ → review-
Attachment #245776 - Attachment is obsolete: true
Attachment #245776 - Flags: superreview?(wtchang)
Attached patch Simplier patchSplinter Review
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.
Attachment #245782 - Flags: superreview?(wtchang)
Attachment #245782 - Flags: review?(nelson)
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
Attachment #245782 - Flags: superreview?(wtchang) → superreview+
Comment on attachment 245782 [details] [diff] [review]
Simplier patch

r=nelson, provided it is tested
Attachment #245782 - Flags: review?(nelson) → review+
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
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: regression?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: