Closed
Bug 245518
Opened 21 years ago
Closed 21 years ago
NSS tools should have an rpath of /usr/lib/mps/secv1
Categories
(NSS :: Tools, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
3.9.2
People
(Reporter: julien.pierre, Assigned: saul.edwards.bugs)
References
Details
Attachments
(3 files, 3 obsolete files)
752 bytes,
patch
|
glenbeasley
:
review+
|
Details | Diff | Splinter Review |
706 bytes,
patch
|
Details | Diff | Splinter Review | |
782 bytes,
patch
|
Details | Diff | Splinter Review |
Several NSS tools (certutil, modutil, and a couple more ) get bundled with
Solaris and need to work even if LD_LIBRARY_PATH is not set. The NSS libraries
are loaded in /usr/lib/mps/secv1 . The solution is to link the tools with -R
/usr/lib/mps/secv1 .
Note that if LD_LIBRARY_PATH is set, it takes precedence over the -R in the
executable, so it is still possible to use the tools with an alternate version
of NSS if desired.
Reporter | ||
Comment 1•21 years ago
|
||
This patch also sets -R $ORIGIN and -R $ORIGIN/../lib since ../lib it is a very
common location for the NSS libraries relative to the tools.
For 64-bit versions, it sets rpath to / usr/lib/mps/secv1/sparcv9, which is
where we bundle the 64-bit NSPR/NSS binaries in Solaris.
Reporter | ||
Updated•21 years ago
|
Attachment #149969 -
Flags: superreview?(wchang0222)
Attachment #149969 -
Flags: review?(glen.beasley)
Reporter | ||
Updated•21 years ago
|
Priority: -- → P2
Target Milestone: --- → 3.9.2
Updated•21 years ago
|
OS: SunOS → Solaris
Comment 2•21 years ago
|
||
Comment on attachment 149969 [details] [diff] [review]
set rpath as needed when linking NSS tools on Solaris
>+EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib' -R '$$ORIGIN/..'
The $ORIGIN/.. path seems to be specific to the NSS build
intended to be installed under /usr/lib/mps. See my
comment below.
Did you mean to say -R '$$ORIGIN', which would match your
comment 1?
>+ifeq ($(USE_64), 1)
>+EXTRA_SHARED_LIBS += -R '/usr/lib/mps/secv1/sparcv9'
>+else
>+EXTRA_SHARED_LIBS += -R '/usr/lib/mps/secv1'
>+endif
This path is only right for the NSS build intended
to be installed under /usr/lib/mps. We should not
do this in general. We should invent a new make
variable BUILD_SUN_PKG or some other build option
to indicate that we are building NSS this way.
(Note: BUILD_SUN_PKG was used on the
NSPRPUB_RELEASE_4_1_BRANCH to handle a similar
issue.)
Updated•21 years ago
|
Attachment #149969 -
Flags: review?(glen.beasley) → review+
Reporter | ||
Updated•21 years ago
|
Assignee: julien.pierre.bugs → saul.edwards
Assignee | ||
Comment 3•21 years ago
|
||
This version uses BUILD_SUN_PKG for the /usr/lib/mps rpath addition as
suggested by Wan-Teh. I tested on Solaris with and without BUILD_SUN_PKG=1.
Julien, please confirm that you meant ORIGIN and not ORIGIN/.. in your original
patch. ORIGIN/.. is dangerous, especially with the 64-bit version in the
sparcv9 directory.
Assignee | ||
Updated•21 years ago
|
Attachment #150642 -
Flags: superreview?(wchang0222)
Attachment #150642 -
Flags: review?(julien.pierre.bugs)
Comment 4•21 years ago
|
||
*** Bug 217376 has been marked as a duplicate of this bug. ***
Comment 5•21 years ago
|
||
Comment on attachment 150642 [details] [diff] [review]
add BUILD_SUN_PKG variable to original patch.
This patch is good. r=wtc.
Note that I don't know whether you want -R '$$ORIGIN/..'
or -R '$$ORIGIN'. Kirk Erickson's patch in bug 217376
also says -R '$$ORIGIN/..', and he explained why:
This will make installed Solaris packages work, since
the libs install in /usr/lib/mps, and the tools into
/usr/lib/mps/bin
If it is -R '$$ORIGIN/..' that you want, it should also
be moved inside the BUILD_SUN_PKG block.
Attachment #150642 -
Flags: superreview?(wchang0222) → superreview+
Comment 6•21 years ago
|
||
Comment on attachment 150642 [details] [diff] [review]
add BUILD_SUN_PKG variable to original patch.
Saul, Julien,
Another comment: I am wondering if the order between
-R '$$ORIGIN/../lib' and -R '$$ORIGIN' matters.
Comment 7•21 years ago
|
||
Comment on attachment 150642 [details] [diff] [review]
add BUILD_SUN_PKG variable to original patch.
It seems better to search in $ORIGIN before $ORIGIN/../lib.
Since on Unix people don't usually install .so's in the
same directory as the executable programs, it's not clear
which ordering is right.
Assignee | ||
Comment 8•21 years ago
|
||
(In reply to comment #5)
There is no such thing as /usr/lib/mps/bin any more... we meant $$ORIGIN
As for the ordering, I don't have a preference because we never install binaries
with libraries. Anyone else?
Reporter | ||
Comment 9•21 years ago
|
||
Comment on attachment 150642 [details] [diff] [review]
add BUILD_SUN_PKG variable to original patch.
Looks good. Please checking for 3.9.2 . Thanks !
Attachment #150642 -
Flags: review?(julien.pierre.bugs) → review+
Comment 10•21 years ago
|
||
Comment on attachment 150642 [details] [diff] [review]
add BUILD_SUN_PKG variable to original patch.
You might want to remove -R '$$ORIGIN' to be
conservative. Apparently nobody asks for it.
Reporter | ||
Comment 11•21 years ago
|
||
Christophe,
Please start building with the BUILD_SUN_PKG=1 make variable . Thanks !
Assignee | ||
Comment 12•21 years ago
|
||
Checked in with $ORIGIN/../lib and not $ORIGIN, as suggested by Wan-Teh.
Tip:
Checking in platlibs.mk;
/cvsroot/mozilla/security/nss/cmd/platlibs.mk,v <-- platlibs.mk
new revision: 1.35; previous revision: 1.34
done
NSS_3_9_BRANCH:
Checking in platlibs.mk;
/cvsroot/mozilla/security/nss/cmd/platlibs.mk,v <-- platlibs.mk
new revision: 1.33.16.1; previous revision: 1.33
done
Attachment #150642 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 13•21 years ago
|
||
Thanks, Saul. If we ever add $ORIGIN back, I've formed
my opinion: it should go before $ORIGIN/../lib because
$ORIGIN implies a tighter binding than $ORIGIN/../lib.
Reporter | ||
Updated•21 years ago
|
Attachment #149969 -
Flags: superreview?(wchang0222)
Reporter | ||
Comment 14•21 years ago
|
||
We also need to have /usr/lib/mps since the secv1 location is being obsoleted .
Reopening bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 15•21 years ago
|
||
Reporter | ||
Comment 16•21 years ago
|
||
Comment on attachment 158370 [details] [diff] [review]
add mps location. incremental patch
Saul, please review. If this looks ok, could you check this patch in to the tip
and NSS_3_9_BRANCH ?
Thanks .
Attachment #158370 -
Flags: review?(saul.edwards.bugs)
Reporter | ||
Comment 17•21 years ago
|
||
Actually, I think the original patch is busted. The Solaris linker only
considers one instance of "-R" - the last one . So we can't use += .
Reporter | ||
Updated•21 years ago
|
Keywords: sun-orion3
Assignee | ||
Comment 18•21 years ago
|
||
Comment on attachment 158370 [details] [diff] [review]
add mps location. incremental patch
RPATHs cannot be "added" (+=) because compilers will only accept the first -R
option.
Attachment #158370 -
Flags: review?(saul.edwards.bugs) → review-
Assignee | ||
Comment 19•21 years ago
|
||
Tested BUILD_SUN_PKG on and off, using Solaris.
Attachment #158370 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #159228 -
Flags: superreview?(wchang0222)
Attachment #159228 -
Flags: review?(julien.pierre.bugs)
Comment 20•21 years ago
|
||
Comment on attachment 159228 [details] [diff] [review]
Compact the RPATH option for each case, add /usr/lib/mps for Sun
Saul, could you adjust your patch so that it
uses ifeq instead of ifneq with BUILD_SUN_PKG?
It's easier for me to understand that way. Thanks.
r=wtc.
Attachment #159228 -
Flags: superreview?(wchang0222) → superreview+
Reporter | ||
Updated•21 years ago
|
Attachment #159228 -
Flags: review?(julien.pierre.bugs) → review+
Assignee | ||
Comment 21•21 years ago
|
||
Attachment #159228 -
Attachment is obsolete: true
Assignee | ||
Comment 22•21 years ago
|
||
Checked in:
Tip:
Checking in platlibs.mk;
/cvsroot/mozilla/security/nss/cmd/platlibs.mk,v <-- platlibs.mk
new revision: 1.36; previous revision: 1.35
done
3.9:
Checking in platlibs.mk;
/cvsroot/mozilla/security/nss/cmd/platlibs.mk,v <-- platlibs.mk
new revision: 1.33.16.2; previous revision: 1.33.16.1
done
Status: REOPENED → ASSIGNED
Reporter | ||
Updated•21 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•