Open Bug 798004 Opened 13 years ago Updated 3 years ago

Build failure: no viable conversion from 'NonNull<JSObject>' to 'JSObject'

Categories

(Firefox Build System :: General, defect)

x86_64
macOS
defect

Tracking

(Not tracked)

People

(Reporter: jruderman, Unassigned)

References

Details

In file included from /Users/jruderman/mozilla-central/js/xpconnect/src/dombindings.cpp:1020: In file included from ./dombindings_gen.cpp:16: In file included from /Users/jruderman/mozilla-central/content/html/content/src/nsHTMLSelectElement.h:30: ../../../dist/include/mozilla/dom/UnionTypes.h:394:12: error: no viable conversion from 'NonNull<JSObject>' to 'JSObject' return const_cast<NonNull<JSObject>&>(mValue.mObject.Value()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../dist/include/mozilla/dom/BindingUtils.h:815:3: note: candidate function operator T&() { ^ ../../../dist/include/mozilla/dom/BindingUtils.h:821:3: note: candidate function operator const T&() const { ^ In file included from /Users/jruderman/mozilla-central/js/xpconnect/src/dombindings.cpp:1020: In file included from ./dombindings_gen.cpp:16: In file included from /Users/jruderman/mozilla-central/content/html/content/src/nsHTMLSelectElement.h:30: ../../../dist/include/mozilla/dom/UnionTypes.h:482:12: error: no viable conversion from 'NonNull<JSObject>' to 'JSObject' return const_cast<NonNull<JSObject>&>(mValue.mObject.Value()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../dist/include/mozilla/dom/BindingUtils.h:815:3: note: candidate function operator T&() { ^ ../../../dist/include/mozilla/dom/BindingUtils.h:821:3: note: candidate function operator const T&() const { ^ In file included from /Users/jruderman/mozilla-central/js/xpconnect/src/dombindings.cpp:1020: In file included from ./dombindings_gen.cpp:16: In file included from /Users/jruderman/mozilla-central/content/html/content/src/nsHTMLSelectElement.h:30: ../../../dist/include/mozilla/dom/UnionTypes.h:579:12: error: no viable conversion from 'NonNull<JSObject>' to 'JSObject' return const_cast<NonNull<JSObject>&>(mValue.mObject.Value()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../dist/include/mozilla/dom/BindingUtils.h:815:3: note: candidate function operator T&() { ^ ../../../dist/include/mozilla/dom/BindingUtils.h:821:3: note: candidate function operator const T&() const { ^ 3 errors generated. make[6]: *** [dombindings.o] Error 1 make[5]: *** [libs] Error 2 make[4]: *** [libs_tier_platform] Error 2 make[3]: *** [tier_platform] Error 2 make[2]: *** [default] Error 2 make[1]: *** [realbuild] Error 2 make: *** [build] Error 2 jruderman-mini3:mozilla-central jruderman$ clang --version Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix
Jesse, I don't think we support building with clang 3.0. You need a more recent clang version....
Likely due to the change in bug 794959. I guess configure should require a newer version of clang.
Blocks: 794959
Component: DOM → Build Config
I updated clang on my mac mini :)
I hit the same issue and have the same version of xcode as Jesse. I wonder if the new XCode 4.5.1 will fix it? Not sure that I want to install another version of clang beside the xcode distributed one.
Your best bet is to always use a Clang built from source, not the Xcode one. This is what the buildbot builders do, after all. The simplest way to achieve this is to run: $ python python/mozboot/bin/bootstrap.py
(In reply to Gregory Szorc [:gps] from comment #5) > Your best bet is to always use a Clang built from source, not the Xcode one. > This is what the buildbot builders do, after all. The simplest way to > achieve this is to run: > > $ python python/mozboot/bin/bootstrap.py It always claims that xcode has to be installed, while it is already installed in the latest version. So it's not a real help for me and probably worth another bug if there is none yet about it?
Please file a new bug against Core : Build Config with the Xcode detection issue.
> I wonder if the new XCode 4.5.1 will fix it? Yes, upgrading XCode fixed the issue for me. (I also had to run XCode -> Prefs -> Downloads -> Install Command-line Tools.) > Not sure that I want to install another version of clang beside the xcode > distributed one. My experience is that XCode clang works well enough as long as I don't use ASan. But note that the builders have their clang updated fairly often (e.g. bug 784691).
(In reply to Jesse Ruderman from comment #8) > > I wonder if the new XCode 4.5.1 will fix it? > > Yes, upgrading XCode fixed the issue for me. (I also had to run XCode -> > Prefs -> Downloads -> Install Command-line Tools.) That's what I did and it works again. Thanks Jesse!
I upgrade XCode, installed the Command Line tools and tried again. And now I'm running into an error that is reported in bug 797533. If I back out to a 9-30-12 build (hg update 738c9ad0f809), then I can build.
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.