Last Comment Bug 463678 - Need to add RPATH to 64-bit libraries on HP-UX
: Need to add RPATH to 64-bit libraries on HP-UX
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: 3.12.2
: HP HP-UX
: P2 normal (vote)
: 3.12.3
Assigned To: Christophe Ravel
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-07 12:02 PST by Christophe Ravel
Modified: 2009-01-14 19:21 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Add RPATH to libssl3.sl and libsmime3.so for HP-UX 64 bit (1.30 KB, patch)
2008-11-07 15:05 PST, Christophe Ravel
julien.pierre: review+
Details | Diff | Splinter Review
Add RPATH to libssl3.sl, libsmime3.sl, libsqlite3.sl, libnssutil3.sl, libsoftokn3.sl, libnssdbm3.sl and libnssckbi.sl for HP-UX 64 bit (4.54 KB, patch)
2008-11-14 11:47 PST, Christophe Ravel
julien.pierre: review+
Details | Diff | Splinter Review
Patch as checked in (3.89 KB, patch)
2008-11-17 13:55 PST, Christophe Ravel
no flags Details | Diff | Splinter Review

Description Christophe Ravel 2008-11-07 12:02:27 PST
We fixed libnss3.sl in bug 335454.
We need to fix the other NSS public libraries: libssl3.sl and libsmime3.sl
Comment 1 Christophe Ravel 2008-11-07 15:05:38 PST
Created attachment 346974 [details] [diff] [review]
Add RPATH to libssl3.sl and libsmime3.so for HP-UX 64 bit

Do we need to set the rpath for other libraries ?
Comment 2 Christophe Ravel 2008-11-07 15:10:18 PST
Comment on attachment 346974 [details] [diff] [review]
Add RPATH to libssl3.sl and libsmime3.so for HP-UX 64 bit

Note: the fix for libssl3.sl and libsmime3.sl is identical to what has been done for libnss3.sl.
Comment 3 Julien Pierre 2008-11-07 15:20:53 PST
We probably need this fix in every one of our public libraries.

I think libsoftokn3 may need it, as well as libnssckbi .

We should consider NSPR as well.

For the private libraries, ie. freebl, nssdbm, etc., I'm less sure how the HP-UX  64-bit linker works. We may want to add new test programs without setting SHLIB_PATH and see what happens.
Comment 4 Christophe Ravel 2008-11-14 10:18:20 PST
I searched all the config.mk files under nss/lib to check where we set the RPATH for Solaris as a comparison.

For Solaris, we set the RPATH in the following files:
nss/lib/ckfw/builtins/config.mk
nss/lib/ckfw/capi/config.mk
nss/lib/nss/config.mk
nss/lib/smime/config.mk
nss/lib/softoken/config.mk
nss/lib/softoken/legacydb/config.mk
nss/lib/sqlite/config.mk
nss/lib/ssl/config.mk
nss/lib/util/config.mk

For HP-UX, we currently set the RPATH in (including the proposed one in patch #1):
nss/lib/nss/config.mk
nss/lib/smime/config.mk
nss/lib/ssl/config.mk
nss/lib/util/config.mk

I'd suggest the we extend this list to match what we do for Solaris. Add:
nss/lib/ckfw/builtins/config.mk
nss/lib/ckfw/capi/config.mk
nss/lib/softoken/config.mk
nss/lib/softoken/legacydb/config.mk
nss/lib/sqlite/config.mk

Details of the search:
$ find nss/lib -name config.mk | xargs grep ORIGIN
nss/lib/ckfw/builtins/config.mk:# The -R '$ORIGIN' linker option instructs this library to search for its
nss/lib/ckfw/builtins/config.mk:MKSHLIB += -R '$$ORIGIN'
nss/lib/ckfw/capi/config.mk:# The -R '$ORIGIN' linker option instructs this library to search for its
nss/lib/ckfw/capi/config.mk:MKSHLIB += -R '$$ORIGIN'
nss/lib/nss/config.mk:# The -R '$ORIGIN' linker option instructs this library to search for its
nss/lib/nss/config.mk:MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
nss/lib/nss/config.mk:MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1:/usr/lib/mps'
nss/lib/nss/config.mk:MKSHLIB += -R '$$ORIGIN'
nss/lib/nss/config.mk:MKSHLIB += +b '$$ORIGIN'
nss/lib/smime/config.mk:# The -R '$ORIGIN' linker option instructs this library to search for its
nss/lib/smime/config.mk:MKSHLIB += -R '$$ORIGIN'
nss/lib/smime/config.mk:MKSHLIB += +b '$$ORIGIN'
nss/lib/softoken/config.mk:# The -R '$ORIGIN' linker option instructs this library to search for its
nss/lib/softoken/config.mk:MKSHLIB += -R '$$ORIGIN'
nss/lib/softoken/legacydb/config.mk:# The -R '$ORIGIN' linker option instructs this library to search for its
nss/lib/softoken/legacydb/config.mk:MKSHLIB += -R '$$ORIGIN'
nss/lib/sqlite/config.mk:# The -R '$ORIGIN' linker option instructs this library to search for its
nss/lib/sqlite/config.mk:MKSHLIB += -R '$$ORIGIN'
nss/lib/ssl/config.mk:# The -R '$ORIGIN' linker option instructs this library to search for its
nss/lib/ssl/config.mk:MKSHLIB += -R '$$ORIGIN'
nss/lib/ssl/config.mk:MKSHLIB += +b '$$ORIGIN'
nss/lib/util/config.mk:# The -R '$ORIGIN' linker option instructs this library to search for its
nss/lib/util/config.mk:MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
nss/lib/util/config.mk:MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1:/usr/lib/mps'
nss/lib/util/config.mk:MKSHLIB += -R '$$ORIGIN'
nss/lib/util/config.mk:MKSHLIB += +b '$$ORIGIN'
Comment 5 Christophe Ravel 2008-11-14 11:47:46 PST
Created attachment 348228 [details] [diff] [review]
Add RPATH to libssl3.sl, libsmime3.sl, libsqlite3.sl, libnssutil3.sl, libsoftokn3.sl, libnssdbm3.sl and libnssckbi.sl for HP-UX 64 bit
Comment 6 Julien Pierre 2008-11-14 12:21:57 PST
Comment on attachment 348228 [details] [diff] [review]
Add RPATH to libssl3.sl, libsmime3.sl, libsqlite3.sl, libnssutil3.sl, libsoftokn3.sl, libnssdbm3.sl and libnssckbi.sl for HP-UX 64 bit

This is all OK except for the lib/ckfw/capi/config.mk change . That module is only built on Windows, never on HP-UX . So the change should not go in for that file.
Comment 7 Christophe Ravel 2008-11-17 13:55:11 PST
Created attachment 348635 [details] [diff] [review]
Patch as checked in

I'll check in this patch when the tree is open again. Take's Julien comment about lib/ckfw/capi/config.mk into account.
Comment 8 Christophe Ravel 2008-11-19 12:11:20 PST
Patch #3 checked in.

Checking in ckfw/builtins/config.mk;
/cvsroot/mozilla/security/nss/lib/ckfw/builtins/config.mk,v  <--  config.mk
new revision: 1.12; previous revision: 1.11
done
Checking in smime/config.mk;
/cvsroot/mozilla/security/nss/lib/smime/config.mk,v  <--  config.mk
new revision: 1.26; previous revision: 1.25
done
Checking in softoken/config.mk;
/cvsroot/mozilla/security/nss/lib/softoken/config.mk,v  <--  config.mk
new revision: 1.25; previous revision: 1.24
done
Checking in softoken/legacydb/config.mk;
/cvsroot/mozilla/security/nss/lib/softoken/legacydb/config.mk,v  <--  config.mk
new revision: 1.7; previous revision: 1.6
done
Checking in sqlite/config.mk;
/cvsroot/mozilla/security/nss/lib/sqlite/config.mk,v  <--  config.mk
new revision: 1.5; previous revision: 1.4
done
Checking in ssl/config.mk;
/cvsroot/mozilla/security/nss/lib/ssl/config.mk,v  <--  config.mk
new revision: 1.26; previous revision: 1.25
done
Comment 9 Kai Engert (:kaie) 2009-01-14 15:54:30 PST
I need to do a update-roots-module-only release of NSS (by tomorrow, will discuss tomorrow in the NSS call).

If I take only the portion of the patch that lives in the ckfw subdirectory for the upcoming Firefox 3.0.6 release, is that OK ? Thanks!
Comment 10 Christophe Ravel 2009-01-14 16:30:45 PST
Do you deliver a 64 bit Firefox on HP-UX ? If the answer is no, then you don't need this patch.
But don't apply this patch partially in a tag. We need to go back to a clean situation with our tags.
Comment 11 Kai Engert (:kaie) 2009-01-14 19:21:11 PST
I don't deliver such a Firefox.

But the effect of my proposal would be:
The official source tarball for Firefox 3.0.6 would contain only the ckfw subset from this bug and patch.

I hear you don't like that idea. Someone might try to use this official tarball to build for HP-UX 64.

I'll use a different approach for my problem, thanks.

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