AIX port unresolved external symbol, nsAutoSyncManager.cpp

RESOLVED FIXED in Thunderbird 3.1b1

Status

MailNews Core
Networking: IMAP
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: ul, Assigned: ul)

Tracking

({fixed-seamonkey2.0.4})

1.9.1 Branch
Thunderbird 3.1b1
PowerPC
AIX
fixed-seamonkey2.0.4

Thunderbird Tracking Flags

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

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

8 years ago
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
(Assignee)

Comment 1

8 years ago
Created attachment 419821 [details] [diff] [review]
additional const cast to avoid symbol from not being exported

This resolves the linking error.
(Assignee)

Updated

8 years ago
Component: General → Networking: IMAP
Product: Thunderbird → MailNews Core
Version: unspecified → 1.9.1 Branch
(Assignee)

Updated

8 years ago
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
(Assignee)

Updated

8 years ago
Attachment #419821 - Flags: review?(bugzilla)
(Assignee)

Comment 3

8 years ago
The IBM XLC/C++ compilers are very picky about the constness of array size.
(Assignee)

Updated

8 years ago
Attachment #419821 - Flags: review?(bienvenu)

Comment 4

8 years ago
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.
(Assignee)

Comment 5

8 years ago
(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.
(Assignee)

Comment 6

8 years ago
https://bugzilla.mozilla.org/show_bug.cgi?id=429105#c3
(Assignee)

Comment 7

8 years ago
Created attachment 425806 [details] [diff] [review]
additional const cast keeps visibility of kDefaultGroupSize
Attachment #419821 - Attachment is obsolete: true
Attachment #419821 - Flags: review?(bugzilla)
Attachment #419821 - Flags: review?(bienvenu)

Comment 8

8 years ago
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.
(Assignee)

Comment 9

8 years ago
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)

Comment 10

8 years ago
(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 :-)
(Assignee)

Comment 11

8 years ago
Created attachment 425824 [details] [diff] [review]
w/o additional const casts

Proposal No. 1
(Assignee)

Comment 12

8 years ago
Created attachment 425832 [details] [diff] [review]
resolves the linker error

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)
(Assignee)

Updated

8 years ago
Attachment #425832 - Flags: review?(bienvenu)

Comment 13

8 years ago
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+

Comment 14

8 years ago
fixed on the trunk, that is. I'm guessing you'd like this for the 3.0x branch as well?
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.1b1

Updated

8 years ago
Attachment #425832 - Flags: approval-thunderbird3.0.2?

Comment 15

8 years ago
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
(Assignee)

Updated

8 years ago
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
status-thunderbird3.0: --- → .2-fixed
status-thunderbird3.1: --- → beta1-fixed
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.
Keywords: verified-thunderbird3.0
(Assignee)

Comment 18

8 years ago
(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.

Updated

7 years ago
Keywords: fixed-seamonkey2.0.4
You need to log in before you can comment on or make changes to this bug.