update the default compiler on OS X because we can't build with gcc 4.2 any longer

RESOLVED FIXED in mozilla18

Status

Firefox Build System
General
RESOLVED FIXED
6 years ago
5 months ago

People

(Reporter: jfkthame, Assigned: espindola)

Tracking

({dev-doc-needed})

unspecified
mozilla18
x86_64
Mac OS X
dev-doc-needed
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

6 years ago
The build system chooses gcc-4.2 by default as the preferred compiler on OS X:

http://mxr.mozilla.org/mozilla-central/source/build/autoconf/compiler-opts.m4#37

However, mozilla-central no longer compiles with gcc-4.2. According to bug 784029, at least, this is a deliberate decision. So we should change the default compiler to one that actually works.

(IMO, this should've been done *before* pushing known gcc-4.2-breaking code into the tree.)
Assignee: nobody → respindola

Updated

6 years ago
Duplicate of this bug: 788276
(In reply to Jonathan Kew (:jfkthame) from comment #0)
> (IMO, this should've been done *before* pushing known gcc-4.2-breaking code
> into the tree.)

Yes, I'm losing time because of this because I can't even compile clang from trunk ATM :(
(In reply to Benoit Girard (:BenWa) from comment #3)
> Yes, I'm losing time because of this because I can't even compile clang from
> trunk ATM :(

BenWa fwiw, I have a copy of clang r161152

http://tooltool.pub.build.mozilla.org/temp-sm-stuff/sha512/708bf18f40edd46517c6368b6b5ad5cd05904d3c60614cdb483248e035cdca0fc905f0e72e90d94de9dccaa18270aadfe07987ab95adcc0c6bb4ce51aa292623

Its truely a .tar.bz2 file compiled for mac and should unblock you short-term.

Note this dir is explicitly *temporary* and could go away at any time.
Thanks, I downloaded it.

For the record here's the error I got. Probably not worth investigating since I didn't follow any particular instruction other then building trunk then tried to build with 'svn update -r 161152':
/Users/bgirard/ben/clang/llvm/tools/llvm-ranlib/llvm-ranlib.cpp:84:53: error: too many arguments to function call, expected 3, have 4
Comment on attachment 659694 [details] [diff] [review]
patch

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

::: build/autoconf/compiler-opts.m4
@@ +33,5 @@
>          HOST_LDFLAGS=" "
>      fi
>      ;;
>  *-darwin*)
> +    # GCC on darwing is based on gcc 4.2 and we don't support it anymore.

"darwin"

@@ +42,2 @@
>      then
> +      echo gcc is known to be broken on OS X, please use clang.

This doesn't seem right. I'd support a check for gcc 4.2 that errors out to prevent the common case, but we should let people build with stock GCC if they have a new enough version.
Attachment #659694 - Flags: review?(ted.mielczarek) → review-
Created attachment 659696 [details] [diff] [review]
fix typo

I don't think that non apple gcc will work. We use an API that uses blocks in ./widget/cocoa/nsChildView.mm:

 usingHandler:^(CGFloat gestureAmount, NSEventPhase phase, BOOL isComplete, BOOL *stop) {
Attachment #659694 - Attachment is obsolete: true
Attachment #659696 - Flags: review?(ted.mielczarek)

Comment 9

6 years ago
Comment on attachment 659696 [details] [diff] [review]
fix typo

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

Can you make the error message helpful? Perhaps drop a link to an MDN page saying how to ensure you have a proper compiler. I'm content with this being a follow-up because not having this specific patch in the tree is causing a lot of developer pain. For that reason, I support landing this directly in m-c.
Attachment #659696 - Flags: review?(ted.mielczarek) → review+
> I don't think that non apple gcc will work. We use an API that uses blocks
> in ./widget/cocoa/nsChildView.mm:

Correct. See also bug 700772.
https://hg.mozilla.org/mozilla-central/rev/ebd88961b3c3

Leaving open until we add a more useful error message.

Updated

6 years ago
Duplicate of this bug: 700772
Created attachment 659844 [details] [diff] [review]
Add better error message.

Add better error message.
Attachment #659696 - Attachment is obsolete: true
Attachment #659844 - Flags: review?(gps)

Updated

6 years ago
Attachment #659844 - Flags: review?(gps) → review+
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/e21afef2e576
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18

Updated

5 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.