Closed Bug 1209397 Opened 9 years ago Closed 9 years ago

PR_DuplicateEnvironment getting undefined in NSPR 4.10.9

Categories

(NSPR :: NSPR, defect, P1)

4.10.9
x86_64
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ashwani.kadian, Assigned: jld)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 Build ID: 20150826023504 Steps to reproduce: Build NSPR 4.10.9 Actual results: Build failed with following error : cc env.o -R /share/builds/mccrel3/security/securitytip/builds/20150925.1/wozzeck_Solaris8/nss/../dist/SunOS5.8_OPT.OBJ/lib -L/share/builds/mccrel3/security/securitytip/builds/20150925.1/wozzeck_Solaris8/nss/../dist/SunOS5.8_OPT.OBJ/lib -lplc4 -L/share/builds/mccrel3/security/securitytip/builds/20150925.1/wozzeck_Solaris8/nss/../dist/SunOS5.8_OPT.OBJ/lib -lnspr4 -lpthread -o env Undefined first referenced symbol in file PR_DuplicateEnvironment env.o ld: fatal: Symbol referencing errors. No output written to env gmake-3.79[1]: *** [env] Error 1 gmake-3.79[1]: Leaving directory `/share/builds/mccrel3/security/securitytip/builds/20150925.1/wozzeck_Solaris8/nspr/SunOS5.8_OPT.OBJ/pr/tests' gmake-3.79: *** [nspr] Error 2 Expected results: Build should have passed.
The environment settings are the same. NSPR 4.10.8 build is passing but this is seen only in NSPR 4.10.9 on all the platforms.
OS: Unspecified → All
Hardware: Unspecified → All
Summary: PR_DuplicateEnvironment → PR_DuplicateEnvironment getting undefined in NSPR 4.10.9
Can you check the object file for pr/src/misc/prenv.c and see if it has this function compiled in ? If so, it's probably an issue with the linker not exporting the symbol from the NSPR shared lib. Check the build log to see if it uses a def file. I think the issue is that pr/src/nspr.def does not contain this symbol. Try to add it there, relink NSPR, and see if that fixes the link issue with the test.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: All → Other
Priority: -- → P1
Hardware: All → x86_64
Target Milestone: --- → 4.11
Looks like this is a regression introduced in bug 773414 . If we were building the NSPR/NSS trunk regularly , we would have found this earlier.
I confirmed this, the symbol is compiled in prenv.c file but is not present in nspr.def file. Adding this symbol to nspr.def solves the problem.
(In reply to Julien Pierre from comment #3) > Looks like this is a regression introduced in bug 773414 . If we were > building the NSPR/NSS trunk regularly , we would have found this earlier. The function was added in bug 1132760, in NSPR 4.10.9. The function should have the symbol version "NSPR_4.10.9" in nspr.def.
Wan-Teh, Since the def file is supposed to allow proper versioning, but was not done properly for this function in 4.10.9, I would suggest that we list this function in nspr.def in the section for the next version of NSPR that will have this listed in nspr.def . I don't see a target milestone for 4.10.10 in bugzilla, so I selected 4.11 . I think that milestone should be in the def file.
See Also: → 1223516
I broke this, so I might as well try to fix it. I don't have a Solaris system on hand, and I don't want to have to block this on bug 1223516, so I haven't actually tested it.
Assignee: wtc → jld
Attachment #8686790 - Flags: review?(wtc)
Comment on attachment 8686790 [details] [diff] [review] Patch: export PR_DuplicateEnvironment in version NSPR_4.11 Review of attachment 8686790 [details] [diff] [review]: ----------------------------------------------------------------- r=wtc. Thanks for writing the patch. ::: pr/src/nspr.def @@ +454,5 @@ > ;+NSPR_4.10.3 { > ;+ global: > PR_SyncMemMap; > ;+} NSPR_4.9.2; > +;+NSPR_4.11 { Please add a comment to point out that this function was actually added in 4.10.9, but we neglected to add it to nspr.def until NSPR 4.11. Note: I actually think it is better to just use the NSPR_4.10.9 symbol version because the symbol version is just a text string. But if you're convinced by Julien, the NSPR_4.11 symbol version is fine, too.
Attachment #8686790 - Flags: review?(wtc) → review+
Patch adjusted to 4.12, as it missed 4.11 Added the comment that Wan-Teh suggested. https://hg.mozilla.org/projects/nspr/rev/aea5ad424c3b
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: 4.11 → 4.12
No longer blocks: 1133073
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: