Last Comment Bug 814967 - Fix includes in mailnews/ .idl files so that builds no longer fail randomly with "error: name 'nsMsgSocketType' specified twice"
: Fix includes in mailnews/ .idl files so that builds no longer fail randomly w...
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86 Linux
: -- major (vote)
: Thunderbird 20.0
Assigned To: Frank Wein [:mcsmurf]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-25 07:55 PST by Frank Wein [:mcsmurf]
Modified: 2013-02-06 23:06 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments
Like this? (8.24 KB, patch)
2012-11-29 02:59 PST, Frank Wein [:mcsmurf]
no flags Details | Diff | Splinter Review
Like this? (8.35 KB, patch)
2012-11-29 03:00 PST, Frank Wein [:mcsmurf]
no flags Details | Diff | Splinter Review
Like this? (8.46 KB, patch)
2012-11-29 03:18 PST, Frank Wein [:mcsmurf]
standard8: review+
standard8: approval‑comm‑beta+
Details | Diff | Splinter Review
Another patch (3.45 KB, patch)
2012-12-30 13:34 PST, Frank Wein [:mcsmurf]
standard8: review+
standard8: approval‑comm‑beta+
Details | Diff | Splinter Review

Description Frank Wein [:mcsmurf] 2012-11-25 07:55:33 PST
SeaMonkey Linux trunk sometimes(?) fails to compile, log from today's nightly build:
Traceback (most recent call last):
  File "/builds/slave/comm-cen-trunk-lnx-ntly/build/mozilla/config/pythonpath.py", line 56, in <module>
    main(sys.argv[1:])
  File "/builds/slave/comm-cen-trunk-lnx-ntly/build/mozilla/config/pythonpath.py", line 48, in main
    execfile(script, frozenglobals)
  File "/builds/slave/comm-cen-trunk-lnx-ntly/build/objdir/mozilla/dist/sdk/bin/header.py", line 524, in <module>
    idl.resolve(options.incdirs, p)
  File "/builds/slave/comm-cen-trunk-lnx-ntly/build/objdir/mozilla/dist/sdk/bin/xpidl.py", line 287, in resolve
    p.resolve(self)
  File "/builds/slave/comm-cen-trunk-lnx-ntly/build/objdir/mozilla/dist/sdk/bin/xpidl.py", line 253, in resolve
    parent.setName(type)
  File "/builds/slave/comm-cen-trunk-lnx-ntly/build/objdir/mozilla/dist/sdk/bin/xpidl.py", line 265, in setName
    self.namemap.set(object)
  File "/builds/slave/comm-cen-trunk-lnx-ntly/build/objdir/mozilla/dist/sdk/bin/xpidl.py", line 211, in set
    raise IDLError("name '%s' specified twice. Previous location: %s" % (object.name, self._d[object.name].location), object.location)
xpidl.IDLError: error: name 'nsMsgSocketType' specified twice. Previous location: /builds/slave/comm-cen-trunk-lnx-ntly/build/mailnews/base/public/MailNewsTypes2.idl line 38:0
interface nsMsgSocketType {
^, ../../../../mozilla/dist/idl/MailNewsTypes2.idl line 38:0
interface nsMsgSocketType {
^
NEXT ERROR make[7]: *** [_xpidlgen/nsIMsgDatabase.h] Error 1
make[7]: *** Deleting file `_xpidlgen/nsIMsgDatabase.h'
make[7]: Leaving directory `/builds/slave/comm-cen-trunk-lnx-ntly/build/objdir/mailnews/db/msgdb/public'
make[6]: Leaving directory `/builds/slave/comm-cen-trunk-lnx-ntly/build/objdir/mailnews/db/msgdb'
NEXT ERROR make[6]: *** [public_export] Error 2
make[5]: *** [db/msgdb_export] Error 2
make[5]: *** Waiting for unfinished jobs....

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1353832204.1353832899.27156.gz&fulltext=1#err0
Comment 1 Jens Hatlak (:InvisibleSmiley) 2012-11-25 13:07:04 PST
I'd guess this is fallout from bug 465339. I also see it quite frequently locally (Win7 x64, pymake with -j8).
Comment 2 Frank Wein [:mcsmurf] 2012-11-26 00:16:37 PST
Here's another build failure, I think it's related so maybe we can fix it here, too:
From the Linux 64-bit SeaMonkey tinderbox, build failure in nsIMsgFilter.idl:
Traceback (most recent call last):
  File "/builds/slave/comm-cen-trunk-lnx64-ntly/build/mozilla/config/pythonpath.py", line 56, in <module>
    main(sys.argv[1:])
  File "/builds/slave/comm-cen-trunk-lnx64-ntly/build/mozilla/config/pythonpath.py", line 48, in main
    execfile(script, frozenglobals)
  File "/builds/slave/comm-cen-trunk-lnx64-ntly/build/objdir/mozilla/dist/sdk/bin/header.py", line 524, in <module>
    idl.resolve(options.incdirs, p)
  File "/builds/slave/comm-cen-trunk-lnx64-ntly/build/objdir/mozilla/dist/sdk/bin/xpidl.py", line 287, in resolve
    p.resolve(self)
  File "/builds/slave/comm-cen-trunk-lnx64-ntly/build/objdir/mozilla/dist/sdk/bin/xpidl.py", line 253, in resolve
    parent.setName(type)
  File "/builds/slave/comm-cen-trunk-lnx64-ntly/build/objdir/mozilla/dist/sdk/bin/xpidl.py", line 265, in setName
    self.namemap.set(object)
  File "/builds/slave/comm-cen-trunk-lnx64-ntly/build/objdir/mozilla/dist/sdk/bin/xpidl.py", line 211, in set
    raise IDLError("name '%s' specified twice. Previous location: %s" % (object.name, self._d[object.name].location), object.location)
xpidl.IDLError: error: name 'nsMsgSocketType' specified twice. Previous location: /builds/slave/comm-cen-trunk-lnx64-ntly/build/mailnews/base/public/MailNewsTypes2.idl line 38:0
interface nsMsgSocketType {
^, ../../../../mozilla/dist/idl/MailNewsTypes2.idl line 38:0
interface nsMsgSocketType {
^
NEXT ERROR make[7]: *** [_xpidlgen/nsIMsgFilter.h] Error 1
Comment 3 Mark Banner (:standard8) (afk until 26th July) 2012-11-26 01:36:36 PST
Yes, most likely a result of the same bug. The main thing to do here is to look at the includes in nsIMsgDatabase.idl and see if a) you can replace the include by an "interface" definition, b) reduce where MailNewsTypes2.idl is included in the include tree.

Once you've done those, build & compile and add any missing includes as necessary.

Same with nsIMsgFilter.idl.
Comment 4 Frank Wein [:mcsmurf] 2012-11-29 02:59:26 PST
Created attachment 686506 [details] [diff] [review]
Like this?

I'm not sure if this is how it should be done, but it works at least. nsIMsgSearchTerm.idl and nsIMsgSearchValue.idl both include nsMsgSearchCore.idl which includes MailNewsTypes2.idl (would it have worked, too if I only had removed one of those two includes?). In nsIMsgDatabase.idl I removed nsIMsgDBView.idl from the include list, it includes MailNewsTypes2.idl. I also removed MailNewsTypes2.idl itself from the include list as it gets included via nsIDBChangeAnnouncer.idl.
Comment 5 Frank Wein [:mcsmurf] 2012-11-29 03:00:50 PST
Created attachment 686507 [details] [diff] [review]
Like this?

Forgot to add a change, see Comment 4 for what this patch does.
Comment 6 Frank Wein [:mcsmurf] 2012-11-29 03:04:28 PST
Actually the nsIMsgSearchScopeTerm.idl include (in nsIMsgFilter.idl) includes nsIMsgSearchSession.idl which includes nsIMsgSearchValue.idl which includes nsMsgSearchCore.idl which includes MailNewsTypes2.idl again :)
Comment 7 Frank Wein [:mcsmurf] 2012-11-29 03:18:18 PST
Created attachment 686511 [details] [diff] [review]
Like this?

Need to remove nsIMsgSearchScopeTerm.idl, too as it also includes MailNewsTypes2.idl via the nsIMsgSearchSession.idl include path. Now only nsMsgFilterCore.idl in nsIMsgFilter.idl should include MailNewsTypes2.idl.
Comment 8 Mozilla RelEng Bot 2012-11-29 06:00:37 PST
Try run for c42a35f5a00b is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=c42a35f5a00b
Results (out of 11 total builds):
    success: 9
    failure: 2
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/mcsmurf@mcsmurf.de-c42a35f5a00b
Comment 9 Mark Banner (:standard8) (afk until 26th July) 2012-11-29 06:50:46 PST
Comment on attachment 686511 [details] [diff] [review]
Like this?

Review of attachment 686511 [details] [diff] [review]:
-----------------------------------------------------------------

Yep, looks good. Thanks.
Comment 10 Frank Wein [:mcsmurf] 2012-11-29 13:03:27 PST
Pushed: https://hg.mozilla.org/comm-central/rev/14a8939f9f47
Comment 11 Frank Wein [:mcsmurf] 2012-12-30 13:34:16 PST
Created attachment 696649 [details] [diff] [review]
Another patch

Appending to this bug here as it's the same issue. A Linux SeaMonkey build failed with the same error message as in Comment 0. The cause is that nsIMsgNewsFolder.idl includes both nsIMsgThread.idl and nsIMsgIncomingServer.idl. Both files include MailNewsTypes2.idl.
Comment 12 Frank Wein [:mcsmurf] 2012-12-30 15:58:55 PST
reopening because of new patch, pushed patch to try.
Comment 13 Frank Wein [:mcsmurf] 2013-01-03 03:38:28 PST
Comment on attachment 696649 [details] [diff] [review]
Another patch

Compiling this patch worked fine locally (test with -j4 and -j6), it also worked fine on Try: https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=34cace5c617b. See Comment 11 why this patch is needed.
Comment 15 Frank Wein [:mcsmurf] 2013-01-22 02:12:08 PST
Resolving for now, I think I saw another occurrence of this bug a few weeks ago. But I'll file a new bug then if I see this happen again.
Comment 16 Justin Wood (:Callek) 2013-01-30 20:24:45 PST
Comment on attachment 686511 [details] [diff] [review]
Like this?

I'm seeing this on today's SeaMonkey beta build, assuming the patch applies, Mark can I get you're approval to land [I think these are safe to land]
Comment 17 Justin Wood (:Callek) 2013-01-30 20:25:07 PST
Comment on attachment 696649 [details] [diff] [review]
Another patch

Review of attachment 696649 [details] [diff] [review]:
-----------------------------------------------------------------

I'm seeing this on today's SeaMonkey beta build, assuming the patch applies, Mark can I get you're approval to land [I think these are safe to land]
Comment 18 Justin Wood (:Callek) 2013-01-30 20:26:11 PST
I'll note these two patches are already on aurora. And that SeaMonkey Council has not been given the "right" to do approvals for mailnews/* yet despite a few attempt at discussing, so hoping this can get triaged by next week!
Comment 19 Mark Banner (:standard8) (afk until 26th July) 2013-01-31 00:15:42 PST
Comment on attachment 686511 [details] [diff] [review]
Like this?

Yeah these should be fine, less risk of builds braking during release etc.

Note You need to log in before you can comment on or make changes to this bug.