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

NEW
Unassigned

Status

Firefox Build System
General
6 years ago
4 months ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

Trunk
x86_64
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
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....
(Reporter)

Comment 2

6 years ago
Likely due to the change in bug 794959.

I guess configure should require a newer version of clang.
Blocks: 794959
Component: DOM → Build Config
(Reporter)

Comment 3

6 years ago
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.

Comment 5

6 years ago
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?

Comment 7

6 years ago
Please file a new bug against Core : Build Config with the Xcode detection issue.
(Reporter)

Comment 8

6 years ago
> 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.

Updated

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