Closed Bug 936977 Opened 12 years ago Closed 11 years ago

Errors building Firefox OS with XCode 5 on OS X (redefinitions of char16_t)

Categories

(Firefox OS Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 935776

People

(Reporter: skao, Unassigned)

References

Details

I followed the instructions on MDN, and got the following errors: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:55: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:191:20: error: typedef redefinition with different types ('char16_t' vs 'uint16_t' (aka 'unsigned short')) typedef __char16_t char16_t; ^ frameworks/base/include/utils/Unicode.h:26:18: note: previous definition is here typedef uint16_t char16_t; ^ In file included from frameworks/base/tools/aapt/AaptAssets.cpp:5: In file included from frameworks/base/tools/aapt/AaptAssets.h:10: In file included from frameworks/base/include/utils/AssetManager.h:24: In file included from frameworks/base/include/utils/AssetDir.h:24: In file included from frameworks/base/include/utils/Vector.h:20: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:55: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__config:192:20: error: typedef redefinition with different types ('char32_t' vs 'uint32_t' (aka 'unsigned int')) typedef __char32_t char32_t; ^ frameworks/base/include/utils/Unicode.h:25:18: note: previous definition is here typedef uint32_t char32_t; ^ In file included from frameworks/base/tools/aapt/AaptAssets.cpp:5: In file included from frameworks/base/tools/aapt/AaptAssets.h:10: In file included from frameworks/base/include/utils/AssetManager.h:24: In file included from frameworks/base/include/utils/AssetDir.h:24: In file included from frameworks/base/include/utils/Vector.h:20: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/new:56: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/exception:81: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:233:20: error: redefinition of 'std::__1::__is_integral<char16_t>' template <> struct __is_integral<unsigned short> : public true_type {}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:229:20: note: previous definition is here template <> struct __is_integral<char16_t> : public true_type {}; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:235:20: error: redefinition of 'std::__1::__is_integral<char32_t>' template <> struct __is_integral<unsigned int> : public true_type {}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:230:20: note: previous definition is here template <> struct __is_integral<char32_t> : public true_type {}; ^ frameworks/base/tools/aapt/AaptAssets.cpp:2161:38: warning: unused parameter 'bundle' [-Wunused-parameter] AaptAssets::slurpResourceZip(Bundle* bundle, const char* filename) ^ 1 warning and 4 errors generated. make: *** [out/host/darwin-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] Error 1 real 0m11.783s user 0m5.481s sys 0m5.677s > Build failed! <
> I followed the instructions on MDN, Please post a link (or links) to exactly which instructions you followed. I've been building on OS X 10.9 for some months now, and have never seen these errors. Nor have they (yet) been reported by anyone else. My build system doesn't include any of the following files: In file included from frameworks/base/tools/aapt/AaptAssets.cpp:5: In file included from frameworks/base/tools/aapt/AaptAssets.h:10: In file included from frameworks/base/include/utils/AssetManager.h:24: In file included from frameworks/base/include/utils/AssetDir.h:24: In file included from frameworks/base/include/utils/Vector.h:20: Do you have any idea where they came from?
I got the same problems following the instructions here: https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites ... and found the solution here: https://developer.mozilla.org/en-US/Firefox_OS/Building#clang_errors_when_building_with_XCode_5_on_Mac (under "clang errors when building with Xcode 5 on Mac").
Oops, I mistakenly thought this bug was about building Firefox, not Firefox OS. Sorry for the confusion :-(
No longer blocks: 10.9-build_issues
Summary: Build errors on OSX 10.9 with redefinition errors → Errors building Firefox OS with XCode 5 on OS X
Summary: Errors building Firefox OS with XCode 5 on OS X → Errors building Firefox OS with XCode 5 on OS X (redefinitions of char16_t)
Skao, please try Martin's suggestion from comment #2. If that works for you, please mark this bug WEORKSFORME.
Will try it, thanks!
So, I tried this trick, and I have another error now: [qemu compilation log above...] host C: emulator-arm <= external/qemu/disas.c In file included from /usr/local/Cellar/gcc-4.6/4.6.3/gcc/lib/gcc/x86_64-apple-darwin13.0.0/4.6.3/include/stdint.h:3:0, from /Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/inttypes.h:255, from external/qemu/qemu-common.h:31, from external/qemu/hw/hw.h:5, from external/qemu/audio/audio.c:25: /usr/local/Cellar/gcc-4.6/4.6.3/gcc/lib/gcc/x86_64-apple-darwin13.0.0/4.6.3/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory compilation terminated. Is anyone able to reproduce and confirm, so that we know if it comes from my environment?
Cedric, your issue seems to be bug 935776, and yes, I hit it too, though I last tried a few weeks ago.
I ran into this problem too, and the instructions in the MDN page referenced in comment 2 fixed it for me. The patches on bug 935776 are intended to accomplish the same thing by updating the bootstrap/build scripts to install and use g++-4.6 by default. I'm going to dupe this bug over to that one since the patches there, if landed, would fix all the issues discussed in this bug.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.