AIX linker error for trunk build xpcom module :ERROR: Undefined symbol: .PR_dtoa

RESOLVED FIXED in mozilla1.9beta4

Status

()

Core
XPCOM
--
major
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Shailen, Assigned: Benjamin Smedberg)

Tracking

({regression})

Trunk
mozilla1.9beta4
Other
AIX
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

4.18 KB, patch
dwitte@gmail.com
: review+
Mike Schroepfer
: approval1.9+
Details | Diff | Splinter Review
(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

While building the trunk on AIX, getting below linker error for mozilla/obj-opt/xpcom/tools/registry

ld: 0711-317 ERROR: Undefined symbol: .PR_dtoa
ld: 0711-317 ERROR: Undefined symbol: .PR_snprintf
ld: 0711-317 ERROR: Undefined symbol: .PR_Assert
ld: 0711-317 ERROR: Undefined symbol: .PR_Free




Reproducible: Always

Steps to Reproduce:
1.Build Mozilla Firefox Trunk build on AIX with Gnome 2.12 RPMS of 64 bit
version.
2.
3.
Actual Results:  
Build fails with the above error.

Expected Results:  
No build failure
(Reporter)

Updated

10 years ago
OS: Other → AIX
Version: unspecified → Trunk
(Reporter)

Comment 1

10 years ago
Created attachment 295916 [details] [diff] [review]
Patch V1

Adding NSPR_LIBS helps resolving the below undefined symbols

.PR_dtoa
.PR_snprintf
.PR_Assert
.PR_Free
Attachment #295916 - Flags: review?(benjamin)
(Assignee)

Comment 2

10 years ago
Comment on attachment 295916 [details] [diff] [review]
Patch V1

regxpcom should not be referencing PR_dtoa or those other symbols... what library is bringing them in?
Attachment #295916 - Flags: review?(benjamin) → review-
(Reporter)

Comment 3

10 years ago
Looks like the library libxpcomglue.a is bringing these symbols in.

Below is how it is used 

/usr/vacpp/bin/xlC_r     -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING -g -o regxpcom regxpcom.o  -lpthreads -bh:5 -bbigtoc -Wl,-brtl -blibpath:/usr/lib:/lib          -L../../../dist/bin -L../../../dist/lib ../../../dist/lib/libxpcomglue.a  -lC_r -ldl -lm -lc_r

Can you please advise how this can be avoided ?
(Reporter)

Comment 4

10 years ago
Can you please provide suggestions to resolve this issue ?

Comment 5

10 years ago
Benjamin: Can you maybe give Shailen some advice here?
(Assignee)

Comment 6

10 years ago
Which object in libxpcomglue.a references PR_dtoa and the others?
(Reporter)

Comment 7

10 years ago
Below are the files in xpcom/glue that references PR_dtoa and PR_snprintf

nsTextFormatter.cpp:        // limit precision to avoid PR_dtoa bug 108335
nsTextFormatter.cpp:    if (PR_dtoa(d, mode, numdigits, &decpt, &sign, &endnum, num, bufsz) == PR_FAILURE) {

nsAutoLock.cpp:                PR_snprintf(buf, sizeof buf,
nsID.cpp:    PR_snprintf(res, NSID_LENGTH, gIDFormat,
nsID.cpp:  PR_snprintf(dest, NSID_LENGTH, gIDFormat,
nsTextFormatter.cpp:            PR_snprintf(bufp, bufsz - (bufp - buf), "%+03d", decpt-1);
nsTextFormatter.cpp:                PR_snprintf(bufp, bufsz - (bufp - buf), "%+03d", decpt-1);

Please let me know if you need more information.
(Assignee)

Comment 8

10 years ago
I need you to use `nm` to figure out which objects in libxpcomglue.a actually reference these symbols. The standalone glue isn't supposed to have any dependencies on NSPR, and we used to successfully #ifdef them all away in the XPCOM_GLUE case. I'd like to figure out whether this is an AIX-specific bug or whether we've added an incorrect dependency somewhere.
(Reporter)

Comment 9

10 years ago
Please find below the output for nm command and let me know if you need more information

libxpcomglue.a[nsTextFormatter.o]: .PR_Assert           U           -
libxpcomglue.a[nsTextFormatter.o]: .PR_Free             U           -
libxpcomglue.a[nsTextFormatter.o]: .PR_dtoa             U           -
libxpcomglue.a[nsTextFormatter.o]: .PR_snprintf         U           -

Thanks,
Shailendra
(Assignee)

Comment 10

10 years ago
Argh, this is a real bug where the standalone glue has NSPR dependencies again. It doesn't show up on other linkers because they do symbol GC, but that's really fragile. Patch forthcoming.
Status: UNCONFIRMED → NEW
Component: Build Config → XPCOM
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
QA Contact: build.config → xpcom
Target Milestone: --- → mozilla1.9beta4
(Assignee)

Comment 11

10 years ago
Created attachment 301666 [details] [diff] [review]
Remove standalone glue dependencies on NSPR, rev. 1
Assignee: nobody → benjamin
Attachment #295916 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #301666 - Flags: review?(dwitte)

Comment 12

10 years ago
Comment on attachment 301666 [details] [diff] [review]
Remove standalone glue dependencies on NSPR, rev. 1

sounds good! r=me
Attachment #301666 - Flags: review?(dwitte) → review+
(Assignee)

Updated

10 years ago
Attachment #301666 - Flags: approval1.9?

Updated

10 years ago
Attachment #301666 - Flags: approval1.9? → approval1.9+
(Assignee)

Updated

10 years ago
Keywords: checkin-needed
Checking in xpcom/glue/nsID.cpp;
/cvsroot/mozilla/xpcom/glue/nsID.cpp,v  <--  nsID.cpp
new revision: 3.18; previous revision: 3.17
done
Checking in xpcom/glue/nsID.h;
/cvsroot/mozilla/xpcom/glue/nsID.h,v  <--  nsID.h
new revision: 1.31; previous revision: 1.30
done
Checking in xpcom/glue/nsTextFormatter.h;
/cvsroot/mozilla/xpcom/glue/nsTextFormatter.h,v  <--  nsTextFormatter.h
new revision: 1.2; previous revision: 1.1
done
Checking in xpcom/glue/objs.mk;
/cvsroot/mozilla/xpcom/glue/objs.mk,v  <--  objs.mk
new revision: 1.35; previous revision: 1.34
done
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.