Closed Bug 537594 Opened 15 years ago Closed 14 years ago

AIX port unresolved external symbol, nsAutoSyncManager.cpp

Categories

(MailNews Core :: Networking: IMAP, defect)

1.9.1 Branch
PowerPC
AIX
defect
Not set
normal

Tracking

(thunderbird3.1 beta1-fixed, thunderbird3.0 .2-fixed)

RESOLVED FIXED
Thunderbird 3.1b1
Tracking Status
thunderbird3.1 --- beta1-fixed
thunderbird3.0 --- .2-fixed

People

(Reporter: ul-mcamafia, Assigned: ul-mcamafia)

References

Details

(Keywords: fixed-seamonkey2.0.4)

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; AIX 5.1; en-US; rv:1.9.1.6) Gecko/20100101 SeaMonkey/2.0.1
Build Identifier: Thunderbird 3.0.x / Seamonkey 2.0.x

rm -f libmail.so
xlC_r -qmkshrobj=1 -o libmail.so -bE:/home/ulink/Src/comm-1.9.1/mozilla/build/unix/aix.exp -bnoexpall  nsMailModule.o     -lpthreads -bh:5 -Wl,-brtl -blibpath:/usr/lib:/lib     ../base/util/libmsgbsutl_s.a ../base/src/libmsgbase_s.a ../base/search/src/libmsgsearch_s.a ../local/src//libmsglocal_s.a ../compose/src/libmsgcompose_s.a ../db/msgdb/src/libmsgdb_s.a ../imap/src/libmsgimap_s.a ../addrbook/src/libaddrbook_s.a ../news/src/libmsgnews_s.a ../mime/src/libmime_s.a ../mime/emitters/src/libemitterutil_s.a ../extensions/bayesian-spam-filter/src/libbayesflt_s.a ../extensions/fts3/src/libfts3tok_s.a ../extensions/mailviews/src/libmailview_s.a ../extensions/mdn/src/libmsgmdn_s.a ../mime/cthandlers/vcard/libvcard_s.a ../mime/cthandlers/glue/libmimecthglue_s.a   ../../mozilla/rdf/util/src/internal/librdfutil_s.a ../../mozilla/modules/libreg/src/libmozreg_s.a -L/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/bin -lmozjs /home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/lib/libunicharutil_s.a -L/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/bin -lxpcom -lxpcom_core  -liconv -L/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/bin `/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/bin/nspr-config --prefix=/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist --libdir=/home/ulink/Src/comm-1.9.1/TB3_OBJ/mozilla/dist/lib --libs` -lz    -lC_r -ldl -lm -lc_r    
ld: 0711-317 ERROR: Undefined symbol: nsAutoSyncManager::kDefaultGroupSize
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
gmake[4]: *** [libmail.so] Error 8
gmake[4]: Leaving directory `/home/ulink/Src/comm-1.9.1/TB3_OBJ/mailnews/build'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/home/ulink/Src/comm-1.9.1/TB3_OBJ/mailnews'
gmake[2]: *** [libs_tier_app] Error 2
gmake[2]: Leaving directory `/home/ulink/Src/comm-1.9.1/TB3_OBJ'
gmake[1]: *** [tier_app] Error 2
gmake[1]: Leaving directory `/home/ulink/Src/comm-1.9.1/TB3_OBJ'
gmake: *** [default] Error 2


Reproducible: Always

Steps to Reproduce:
1. Compile on AIX 5.1 with IBM XLC/C++ 7.0

Actual Results:  
Linker error when binding libmail.so

Expected Results:  
Successfull compilation, linking and a resulting stable binary
This resolves the linking error.
Component: General → Networking: IMAP
Product: Thunderbird → MailNews Core
Version: unspecified → 1.9.1 Branch
Blocks: 537588
QA Contact: general → networking.imap
(In reply to comment #1)
> Created an attachment (id=419821) [details]
> additional const cast to avoid symbol from not being exported
> 
> This resolves the linking error.

You need to ask for review and sr as described at https://developer.mozilla.org/en/Mailnews_and_Mail_code_review_requirements.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #419821 - Flags: review?(bugzilla)
The IBM XLC/C++ compilers are very picky about the constness of array size.
Attachment #419821 - Flags: review?(bienvenu)
But kDefaultGroupSize is already const. Would moving it out of the header file into the cpp file fix the error as well? It doesn't need to be declared in the class at all.
(In reply to comment #4)
> But kDefaultGroupSize is already const. 

Yes. 
I don't understand why, but the patch makes libmail.so link successfully on AIX and mGroupSize is initialized with 60K. 
When I need porting changes I prefer minimal (or none?) impact first.

> Would moving it out of the header file
> into the cpp file fix the error as well? It doesn't need to be declared in the
> class at all.

Will try this later. Will be quite time consuming as I have to test it with both SeaMonkey and Thunderbird.
Attachment #419821 - Attachment is obsolete: true
Attachment #419821 - Flags: review?(bugzilla)
Attachment #419821 - Flags: review?(bienvenu)
I don't want kDefaultGroupSize to be visible - there's no need for it, so it's better for it not to be visible. So moving the declaration would be improving the code, as well as fixing the compiler error.
Comment on attachment 425806 [details] [diff] [review]
additional const cast keeps visibility of kDefaultGroupSize 

I can add a comment that the const cast is needed to workaround the IBM VisualAge Compiler.
Attachment #425806 - Flags: review?(bienvenu)
(In reply to comment #9)
> (From update of attachment 425806 [details] [diff] [review])
> I can add a comment that the const cast is needed to workaround the IBM
> VisualAge Compiler.

I'd still rather see the declaration moved to be more private, with less scope. And those kinds of comments always decrease my faith in the compiler :-)
Attached patch w/o additional const casts (obsolete) — Splinter Review
Proposal No. 1
Moved static const member kDefaultGroupSize from header to .cpp else the linker cannot resolve kDefaultGroupSize within SetGroupSize member function's ? : operator.
Attachment #425806 - Attachment is obsolete: true
Attachment #425824 - Attachment is obsolete: true
Attachment #425806 - Flags: review?(bienvenu)
Attachment #425832 - Flags: review?(bienvenu)
Comment on attachment 425832 [details] [diff] [review]
resolves the linker error

fix checked in, thx, Uli.
Attachment #425832 - Flags: superreview+
Attachment #425832 - Flags: review?(bienvenu)
Attachment #425832 - Flags: review+
fixed on the trunk, that is. I'm guessing you'd like this for the 3.0x branch as well?
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1b1
Attachment #425832 - Flags: approval-thunderbird3.0.2?
Comment on attachment 425832 [details] [diff] [review]
resolves the linker error

I'll land this for 3.0x as well, tomorrow, if I don't forget...
Attachment #425832 - Flags: approval-thunderbird3.0.2? → approval-thunderbird3.0.2+
Assignee: nobody → ul.mcamafia
Keywords: checkin-needed
Whiteboard: [ checkin to comm-1.9.1 ]
Checked into comm-1.9.1:
http://hg.mozilla.org/releases/comm-1.9.1/rev/9f833ebcf0bf
Keywords: checkin-needed
Whiteboard: [ checkin to comm-1.9.1 ]
Verified fixed by code inspection (simple move of variable) and the fact that the tree still builds etc.
(In reply to comment #17)
> Verified fixed by code inspection (simple move of variable) and the fact that
> the tree still builds etc.

And builds fine on AIX verified yesterday with a "nightly" build just before the 3.0.2 RELEASE version bump.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: