GCC 4.2 fails with errors - widget/src/cocoa/nsMenuBarX.h

RESOLVED FIXED

Status

()

Core
Widget: Cocoa
RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: Simon Howes, Assigned: Simon Howes)

Tracking

Trunk
PowerPC
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 2 obsolete attachments)

(Assignee)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en; rv:1.9b2pre) Gecko/2007120814 Camino/2.0a1pre (like Firefox/3.0b2pre)
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en; rv:1.9b2pre) Gecko/2007120814 Camino/2.0a1pre (like Firefox/3.0b2pre)

Camino fails to build using Apple's GCC 4.2 preview. See attachment.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
(Assignee)

Updated

11 years ago
Version: unspecified → Trunk
(Assignee)

Comment 1

11 years ago
Created attachment 292253 [details]
Log
Assignee: nobody → joshmoz
Component: General → Widget: Cocoa
Product: Camino → Core
QA Contact: general → cocoa
Can someone with a Mac remove the extra qualifications from:
mozilla/widget/src/cocoa/nsMenuBarX.h:133
mozilla/widget/src/cocoa/nsFilePicker.h:97

and generate a patch?

Newer versions of GCC treats extra qualification as errors.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 3

11 years ago
One more in 

/mozilla/camino/src/application/AppDirServiceProvider.h:72

After that has been corrected as well, Camino at least will build with GCC 4.2.

Comment 4

11 years ago
Simon, if you can generate a patch that fixes your build, I'll happily review it.  This is a simple matter of removing the redundant qualification:

static nsresult AppDirServiceProvider::EnsureExists(nsILocalFile* inFolder);

becomes

static nsresult EnsureExists(nsILocalFile* inFolder);
(Assignee)

Comment 5

11 years ago
I would if I knew how to write the patch - I'm not a programmer.
Created attachment 292326 [details] [diff] [review]
possible fix

Simon, try this.

cd your/src/dir/mozilla
patch -p0 < path/to/the/patch

and make again in the relevant places.

Caveat: I've only tested that this doesn't break the build in my Camino debug build with gcc 4.0.  If things get hairy anywhere else, I'm not the guy who should have this bug ;)
Assignee: joshmoz → alqahira
Status: NEW → ASSIGNED
Comment on attachment 292326 [details] [diff] [review]
possible fix

Remember he already have applied the changes, so he should got an error message saying the patches already were applied.

If he changed something else no one will know.

I believe it's easier for him to generate the patch.

Simon, run this command on the mozilla source tree (/Volumes/mozilla/mozilla):

cvs diff -up8 > applegcc2.diff

and upload the file (it's plain text).
(Assignee)

Comment 8

11 years ago
Created attachment 292341 [details] [diff] [review]
Patch
(Assignee)

Comment 9

11 years ago
That was easy. Here was me thinking you all write these patches manually by hand.  Cheers guys.
(Assignee)

Comment 10

11 years ago
Created attachment 292344 [details] [diff] [review]
Patch 2 - missing 't' in target corrected.
Attachment #292341 - Attachment is obsolete: true
Attachment #292344 - Flags: review?(mark)
Oops, I misread a couple of the comments in there.  Over to Simon, then.
Assignee: alqahira → simon.bugzilla
Status: ASSIGNED → NEW
(Assignee)

Comment 12

11 years ago
Compiles fine, however app crashes on startup.
(Assignee)

Comment 13

11 years ago
Created attachment 292374 [details]
Crash report
(Assignee)

Comment 14

11 years ago
Have it working fine now.  I relaxed my optimisations on my mozconfig to just -O2.

The crash happens if I have in my config:

-enable-optimize='-O2 -mssse3'

Still, it should still load fine saying I'm on a core2 machine.  I'll do some more research and leave it for another bug if need be.
(Assignee)

Updated

11 years ago
Attachment #292374 - Attachment is obsolete: true

Updated

11 years ago
Attachment #292344 - Flags: review?(mark)
Attachment #292344 - Flags: review+
Attachment #292344 - Flags: approval1.9?

Updated

11 years ago
Attachment #292344 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed

Updated

11 years ago
Attachment #292344 - Flags: superreview?(roc)
Attachment #292344 - Flags: superreview?(roc) → superreview+

Updated

11 years ago
Keywords: checkin-needed

Comment 15

11 years ago
Checked in:

mozilla/camino/src/application/AppDirServiceProvider.h   1.6
mozilla/widget/src/cocoa/nsFilePicker.h                 1.11
mozilla/widget/src/cocoa/nsMenuBarX.h                   1.32

Thanks for the patch.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Comment 16

11 years ago
whew, I was just about to check this in when I saw the commit bugmail!
You need to log in before you can comment on or make changes to this bug.