Closed Bug 837720 Opened 12 years ago Closed 12 years ago

Build failure with "#error "mfbt (and Gecko) require at least gcc 4.4 to build."

Categories

(Core :: mozglue, defect)

21 Branch
All
Android
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: kats, Unassigned)

References

Details

Building latest m-c for android using ndk-r8c and gcc-4.6, I get the following error: In file included from ../../dist/include/mozilla/Attributes.h:11, from ../../dist/include/mozilla/Assertions.h:11, from /Users/kats/zspace/mozilla-git/mozglue/linker/szip.cpp:11: ../../dist/include/mozilla/Compiler.h:20:4: error: #error "mfbt (and Gecko) require at least gcc 4.4 to build." make[6]: *** [host_szip.o] Error 1 This appears to be happening because szip.cpp is compiled using the "host" compiler (it appears in HOST_CPPSRCS in mozglue/linker/Makefile) which on my machine executes this command: c++ -o host_szip.o -c -I/Users/kats/zspace/mozilla-git/mozglue/linker -I. -I../../dist/include -I/Users/kats/zspace/mozilla-git/obj-android/dist/include/nspr -I/Users/kats/zspace/mozilla-git/obj-android/dist/include/nss -I/Users/kats/zspace/mozilla-git/obj-android/dist/include/nspr /Users/kats/zspace/mozilla-git/mozglue/linker/szip.cpp On my machine: kats@kgupta-air mozilla-git$ which c++ /usr/bin/c++ kats@kgupta-air mozilla-git$ c++ --version i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. which is why it's failing the build. This didn't use to happen before, so I suspect it is a regression from bug 833254. However, it may just be that bug 833254 exposed an underlying problem with our build; I'm not really sure.
Set HOST_CC and HOST_CXX appropriately.
in your mozconfig, that is.
That works, thanks. (For anybody else that runs into this, I added these: export HOST_CC=/opt/local/bin/gcc-mp-4.7 export HOST_CXX=/opt/local/bin/g++-mp-4.7 to my mozconfig to point the "host" compiler to the gcc-4.7 installed with macports, and had to do a clobber build.)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.