Closed Bug 227841 Opened 21 years ago Closed 21 years ago

AIX: Thunderbird fails to build because of redefined macros

Categories

(Thunderbird :: Build Config, defect)

Other
AIX
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pkwarren, Assigned: pkwarren)

References

Details

Attachments

(1 file)

I am trying to build Thunderbird 0.4 on AIX, but I am running into the following errors: nsMailModule.cpp xlC_r -o nsMailModule.o -c -DMOZ_LDAP_XPCOM -DOSTYPE=\"AIX5.1\" -DOSARCH=\"AIX\" -DHAVE_DEPENDENT_LIBS -DHAVE_MOVEMAIL -I/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build -I/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/../base/src -I/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/../local/src -I../../dist/include/xpcom -I../../dist/include/xpcom_obsolete -I../../dist/include/xpobsolete -I../../dist/include/addrbook -I../../dist/include/appcomps -I../../dist/include/appshell -I../../dist/include/bayesflt -I../../dist/include/content -I../../dist/include/dom -I../../dist/include/docshell -I../../dist/include/editor -I../../dist/include/gfx -I../../dist/include/intl -I../../dist/include/locale -I../../dist/include/layout -I../../dist/include/lwbrk -I../../dist/include/mailnews -I../../dist/include/mailview -I../../dist/include/msglocal -I../../dist/include/msgcompose -I../../dist/include/msgbaseutil -I../../dist/include/msgbase -I../../dist/include/msgnews -I../../dist/include/msgimap -I../../dist/include/msgdb -I../../dist/include/msgmdn -I../../dist/include/mime -I../../dist/include/mimeemitter -I../../dist/include/mork -I../../dist/include/necko -I../../dist/include/nkcache -I../../dist/include/pref -I../../dist/include/rdf -I../../dist/include/rdfutil -I../../dist/include/string -I../../dist/include/txmgr -I../../dist/include/widget -I../../dist/include/webbrwsr -I../../dist/include/uconv -I../../dist/include/uriloader -I../../dist/include/mozldap -I../../dist/include/mail -I../../dist/include -I/home/pkw/sb/thunderbird/0.4/mozilla/obj-opt/dist/include/nspr -I. -qflag=w:w -DNDEBUG -DTRIMMED -O2 -qmax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ING=1 -DMOZ_USER_DIR=\".mozilla\" -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_DLL_SUFFIX=\".so\" -DXP_UNIX=1 -DUNIX_ASYNC_DNS=1 -DJS_THREADSAFE=1 -DNS_PRINT_PREVIEW=1 -DNS_PRINTING=1 -DMOZILLA_VERSION=\"1.6b\" /home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp "../../dist/include/msgnews/nsNNTPNewsgroupPost.h", line 48.9: 1540-0848 (S) The macro name "HEADER_FROM" is already defined with a different definition. "../../dist/include/mime/nsMailHeaders.h", line 65.9: 1540-0425 (I) "HEADER_FROM" is defined on line 65 of "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp". "../../dist/include/msgnews/nsNNTPNewsgroupPost.h", line 49.9: 1540-0848 (S) The macro name "HEADER_NEWSGROUPS" is already defined with a different definition. "../../dist/include/mime/nsMailHeaders.h", line 70.9: 1540-0425 (I) "HEADER_NEWSGROUPS" is defined on line 70 of "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp". "../../dist/include/msgnews/nsNNTPNewsgroupPost.h", line 50.9: 1540-0848 (S) The macro name "HEADER_SUBJECT" is already defined with a different definition. "../../dist/include/mime/nsMailHeaders.h", line 82.9: 1540-0425 (I) "HEADER_SUBJECT" is defined on line 82 of "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp". "../../dist/include/msgnews/nsNNTPNewsgroupPost.h", line 56.9: 1540-0848 (S) The macro name "HEADER_DATE" is already defined with a different definition. "../../dist/include/mime/nsMailHeaders.h", line 61.9: 1540-0425 (I) "HEADER_DATE" is defined on line 61 of "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp". "../../dist/include/msgnews/nsNNTPNewsgroupPost.h", line 59.9: 1540-0848 (S) The macro name "HEADER_SENDER" is already defined with a different definition. "../../dist/include/mime/nsMailHeaders.h", line 81.9: 1540-0425 (I) "HEADER_SENDER" is defined on line 81 of "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp". "../../dist/include/msgnews/nsNNTPNewsgroupPost.h", line 64.9: 1540-0848 (S) The macro name "HEADER_DISTRIBUTION" is already defined with a different definition. "../../dist/include/mime/nsMailHeaders.h", line 62.9: 1540-0425 (I) "HEADER_DISTRIBUTION" is defined on line 62 of "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp". "../../dist/include/msgnews/nsNNTPNewsgroupPost.h", line 65.9: 1540-0848 (S) The macro name "HEADER_ORGANIZATION" is already defined with a different definition. "../../dist/include/mime/nsMailHeaders.h", line 71.9: 1540-0425 (I) "HEADER_ORGANIZATION" is defined on line 71 of "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp". "../../dist/include/msgnews/nsNNTPNewsgroupPost.h", line 66.9: 1540-0848 (S) The macro name "HEADER_REFERENCES" is already defined with a different definition. "../../dist/include/mime/nsMailHeaders.h", line 72.9: 1540-0425 (I) "HEADER_REFERENCES" is defined on line 72 of "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp". "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/../base/src/nsMsgRDFUtils.h", line 106.9: 1540-0848 (S) The macro name "NC_RDF_DELETE" is already defined with a different definition. "../../dist/include/addrbook/nsAddressBook.h", line 56.9: 1540-0425 (I) "NC_RDF_DELETE" is defined on line 56 of "/home/pkw/sb/thunderbird/0.4/mozilla/mailnews/build/nsMailModule.cpp". gmake[1]: *** [nsMailModule.o] Error 1 gmake[1]: Leaving directory `/home/pkw/sb/thunderbird/0.4/mozilla/obj-opt/mailnews/build' gmake: *** [all] Error 2 I saw this same error while trying to build Thunderbird 0.3, but I have no problem building Mozilla's Mail&News component.
Attached patch Patch v1Splinter Review
- Uses the NC_NAMESPACE_URI prefix on all define's in nsAddressBook.h. This makes the definition of NC_RDF_DELETE not conflict with the other definition. - Change all HEADER_* defines in nsNNTPNewsgroupPost.h to be IDX_HEADER_*. These seem to be internal to nsNNTPNewsgroupPost so they really don't need to be exported at all, but this was the simplest solution for now without rewriting this class. - AppendAndAlloc is a simple utility function in nsNNTPNewsgroup post and is not used by any other files, so I moved it out of the class declaration.
Attachment #137065 - Flags: superreview?(mscott)
Attachment #137065 - Flags: review?(mscott)
Comment on attachment 137065 [details] [diff] [review] Patch v1 What does IDX stand for?
Attachment #137065 - Flags: superreview?(mscott)
Attachment #137065 - Flags: superreview+
Attachment #137065 - Flags: review?(mscott)
Attachment #137065 - Flags: review+
"IDX" stands for index, since those defines are only used to index into an array. If you have another suggestion for those names, I'd be happy to use them.
Is this OK to check in as is?
yup!
I will check this in soon. I have pulled the latest Thunderbird source and I want to make sure it still builds with this fix before I check it in.
Assignee: mscott → pkw
Status: NEW → ASSIGNED
Fixed. Checking in addrbook/src/nsAddressBook.h; /cvsroot/mozilla/mailnews/addrbook/src/nsAddressBook.h,v <-- nsAddressBook.h new revision: 1.32; previous revision: 1.31 done Checking in news/src/nsNNTPNewsgroupPost.cpp; /cvsroot/mozilla/mailnews/news/src/nsNNTPNewsgroupPost.cpp,v <-- nsNNTPNewsgroupPost.cpp new revision: 1.33; previous revision: 1.32 done Checking in news/src/nsNNTPNewsgroupPost.h; /cvsroot/mozilla/mailnews/news/src/nsNNTPNewsgroupPost.h,v <-- nsNNTPNewsgroupPost.h new revision: 1.13; previous revision: 1.12 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
I ported this to the M4 branch too in case we build AIX from that branch.
Blocks: 230700
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: