Hi is great Christopher - thanks! I've added the following entry to the 
documentation:

https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Building#clang_errors_when_building_with_XCode_5_on_Mac

Let me know if you think this reads ok.

Chris Mills
   Senior tech writer || Mozilla
developer.mozilla.org || MDN
   [email protected] || @chrisdavidmills



On 14 Oct 2013, at 17:53, Christopher De Cairos <[email protected]> 
wrote:

> I'll do my best to describe the problem below:
> 
> While building B2G with it configured for Inari, I ran into trouble on OSX. 
> Xcode 5 changes the gcc and g++ compilers in /usr/bin, which breaks the build 
> process if you try to use them to compile.
> 
> In order to work around the problem, I decided to manually change instances 
> of `g++` and `gcc`  to `llvm-g++-4.2` and `llvm-ggc-4.2`  in the following 
> folders:
> 
> objdir-gecko/_virtualenv/lib/python2.7/config/Makefile
>       • CC
>       • CXX
> build/core/combo/HOST_darwin-x86.mk
>       • HOST_OBJCC
>       • HOST_CC
>       • HOST_CXX
> 
> I also added this to my .userconfig file, for good measure:
> export CXX=llvm-g++-4.6
> export CC=llvm-gcc-4.6
> export CPP=llvm-gcc-4.6
> 
> Let me know if I can clarify any of the above a bit further.
> 
> 
> Regards, 
> 
> Christopher De Cairos
> Integration Engineer - Webmaker
> Mozilla Foundation
> 
> On 2013-10-14 1:25 AM, Chris Mills wrote:
>> And a clear description of the problem would be good too. I'll then get it 
>> added to MDN in an appropriate place.
>> 
>> cheers!
>> 
>> Chris Mills
>>    Senior tech writer || Mozilla
>> developer.mozilla.org || MDN
>>    
>> [email protected]
>>  || @chrisdavidmills
>> 
>> 
>> 
>> On 14 Oct 2013, at 01:02, James Kruth 
>> <[email protected]>
>>  wrote:
>> 
>> 
>>> Christopher,
>>> 
>>> That's great news!  I'm wondering if you might be so kind as to outline the 
>>> files you needed to change?
>>> 
>>> - James
>>> 
>>> On Sunday, October 13, 2013 6:40:09 PM UTC-4, Christopher De Cairos wrote:
>>> 
>>>> James,
>>>> 
>>>> 
>>>> 
>>>> Yes, the changes I made allowed me to successfully build B2G v1.3. There 
>>>> 
>>>> were a few other bumps down the road - some other spots needed updates 
>>>> 
>>>> for CC and CXX vars
>>>> 
>>>> 
>>>> 
>>>> In the end, I was able to successfully flash it onto my ZTE Open, and so 
>>>> 
>>>> far it's working great.
>>>> 
>>>> 
>>>> 
>>>> Your assessment of the Xcode 5 update sounds about right to me, gcc and 
>>>> 
>>>> g++ on my machine were no longer symlinked to my llvm-* binaries as they 
>>>> 
>>>> may have been in Xcode 4.x
>>>> 
>>>> 
>>>> 
>>>> If the output from the build process was correct, then I won't be able 
>>>> 
>>>> to build for a simulator, but I haven't tried that.
>>>> 
>>>> 
>>>> 
>>>> Regards,
>>>> 
>>>> 
>>>> 
>>>> Christopher De Cairos
>>>> 
>>>> Integration Engineer - Webmaker
>>>> 
>>>> Mozilla Foundation
>>>> 
>>>> 
>>>> 
>>>> On 2013-10-12 4:12 PM, James Kruth wrote:
>>>> 
>>>> 
>>>>> Some updates on what appears to be going on here:
>>>>> 
>>>>> * On Xcode 4.x, /usr/bin/gcc was a symlink, likely to llvm-gcc-4.2 (which 
>>>>> apparently wouldn't produce a usable emulator build - I'm not sure about 
>>>>> inari)
>>>>> 
>>>>> * With the Xcode 5 update, the CLI tools have replaced that symlink with 
>>>>> an actual binary, which is clang, as opposed to gcc.
>>>>> 
>>>>> The build obviously doesn't compile with clang, and so things are broken 
>>>>> in their current state.  I'd be curious to know if Christopher's 
>>>>> modifications gave him a working inari build.
>>>>> 
>>>>> Where is the appropriate place to report a bug like this?
>>>>> 
>>>>> - James
>>>>> 
>>>>> On Saturday, October 12, 2013 12:59:23 AM UTC-4, James Kruth wrote:
>>>>> 
>>>>>> Actually, Keon is called out specifically:
>>>>>> 
>>>>>> https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Firefox_OS_build_prerequisites#Requirements_for_Mac_OS_X
>>>>>> At this point, I'm willing to say it's not a problem with inari, as I 
>>>>>> just attempted to build for emulator and received the same clang errors. 
>>>>>>  There's definitely a problem with the build process.
>>>>>> 
>>>>>> - James
>>>>>> 
>>>>>> On Saturday, October 12, 2013 12:55:27 AM UTC-4, Caio Lima wrote:
>>>>>> 
>>>>>>> Guys, I don't remember where, but I have seen in documentation that the
>>>>>>> 
>>>>>>> inari build is not working on Mac OS X. I guess it was in "Build the
>>>>>>> 
>>>>>>> Firefox OS" on MDN
>>>>>>> 
>>>>>>> Give a look on this tutorial.
>>>>>>> 
>>>>>>> On Saturday, October 12, 2013, Reuben Morais wrote:
>>>>>>> 
>>>>>>>> And yes, I'm pretty sure the bootstrap script should be passing
>>>>>>>> 
>>>>>>>> --enable-cxx to GCC's configure script. Not entirely sure because it 
>>>>>>>> looks
>>>>>>>> 
>>>>>>>> like Clang is being picked up (and causing the errors in the OP). You 
>>>>>>>> can
>>>>>>>> 
>>>>>>>> manually fix it by doing:
>>>>>>>> 
>>>>>>>>   brew install
>>>>>>>> 
>>>>>>>> https://raw.github.com/mozilla-b2g/B2G/master/scripts/homebrew/gcc-4.6.rb--enable-cxx
>>>>>>>> -- reuben
>>>>>>>> 
>>>>>>> -- 
>>>>>>> 
>>>>>>> Caio Lima
>>>>>>> 
>>>>> _______________________________________________
>>>>> 
>>>>> dev-b2g mailing list
>>>>> 
>>>>> [email protected]
>>>>> https://lists.mozilla.org/listinfo/dev-b2g
>>> _______________________________________________
>>> dev-b2g mailing list
>>> 
>>> [email protected]
>>> https://lists.mozilla.org/listinfo/dev-b2g
>> _______________________________________________
>> dev-b2g mailing list
>> 
>> [email protected]
>> https://lists.mozilla.org/listinfo/dev-b2g
> 

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to