Closed
Bug 1451931
Opened 7 years ago
Closed 7 years ago
The spidermonkey-sm-rust-bindings-linux64/debug job fails if C++14 relaxed constexpr is used
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox61 fixed)
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: emk, Assigned: emk)
References
Details
Attachments
(2 files)
See <https://groups.google.com/forum/#!topic/mozilla.dev.platform/OQ-4nVQ0P2s> for the context.
I found js/rust/CMakeLists.txt had the explicit `-std=c++11` switch to enabled the "latest" C++ features. But if I try to bump the C++ version, I got the following error:
https://treeherder.mozilla.org/logviewer.html#?job_id=172184002&repo=try&lineNumber=552
> [task 2018-04-05T21:50:08.059Z] Running `/builds/worker/workspace/build/src/target/debug/deps/callback-4ce8a82da6acbfdf`
> [task 2018-04-05T21:50:08.061Z] /builds/worker/workspace/build/src/target/debug/deps/callback-4ce8a82da6acbfdf: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /builds/worker/workspace/build/src/target/debug/deps/callback-4ce8a82da6acbfdf)
> [task 2018-04-05T21:50:08.062Z] error: test failed, to rerun pass '--test callback'
> [taskcluster 2018-04-05 21:50:08.366Z] === Task Finished ===
> [taskcluster 2018-04-05 21:50:08.485Z] Artifact "public/build" not found at "/builds/worker/artifacts/"
> [taskcluster 2018-04-05 21:50:09.294Z] Unsuccessful task run with exit code: 1 completed in 364.169 seconds
How to fix this error?
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(mh+mozilla)
Flags: needinfo?(jgilbert)
Comment 2•7 years ago
|
||
Nobody has responded to the dev-platform thread. One option would be to simply land bug 1451278 and see if anyone complains about this job breaking.
Comment 3•7 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #0)
> See
> <https://groups.google.com/forum/#!topic/mozilla.dev.platform/OQ-4nVQ0P2s>
> for the context.
>
> I found js/rust/CMakeLists.txt had the explicit `-std=c++11` switch to
> enabled the "latest" C++ features. But if I try to bump the C++ version, I
> got the following error:
> https://treeherder.mozilla.org/logviewer.
> html#?job_id=172184002&repo=try&lineNumber=552
> > [task 2018-04-05T21:50:08.059Z] Running `/builds/worker/workspace/build/src/target/debug/deps/callback-4ce8a82da6acbfdf`
> > [task 2018-04-05T21:50:08.061Z] /builds/worker/workspace/build/src/target/debug/deps/callback-4ce8a82da6acbfdf: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /builds/worker/workspace/build/src/target/debug/deps/callback-4ce8a82da6acbfdf)
> > [task 2018-04-05T21:50:08.062Z] error: test failed, to rerun pass '--test callback'
> > [taskcluster 2018-04-05 21:50:08.366Z] === Task Finished ===
> > [taskcluster 2018-04-05 21:50:08.485Z] Artifact "public/build" not found at "/builds/worker/artifacts/"
> > [taskcluster 2018-04-05 21:50:09.294Z] Unsuccessful task run with exit code: 1 completed in 364.169 seconds
>
> How to fix this error?
Set LD_LIBRARY_PATH to the gcc/lib64 directory from the toolchain package. Kind of like we do in build/unix/mozconfig.stdcxx
Flags: needinfo?(mh+mozilla)
Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #3)
> Set LD_LIBRARY_PATH to the gcc/lib64 directory from the toolchain package.
> Kind of like we do in build/unix/mozconfig.stdcxx
Thanks you, it works:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=83af1488cfa7be239cc14ba64f14ec51746714a4
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8965678 [details]
Bug 1451931 - Add gcc/lib64 to the LD_LIBRARY_PATH of sm-rust-binding.
https://reviewboard.mozilla.org/r/234528/#review240812
Attachment #8965678 -
Flags: review?(mh+mozilla) → review+
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8965679 [details]
Bug 1451931 - Enable C++14 for SpiderMonkey Rust Bindings.
https://reviewboard.mozilla.org/r/234530/#review240814
::: js/rust/CMakeLists.txt:29
(Diff revision 1)
> endif()
> if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
> add_definitions(-Wno-c++0x-extensions -Wno-return-type-c-linkage -Wno-invalid-offsetof)
> endif()
> add_definitions(-fPIC -fno-rtti)
> - add_definitions(-std=c++11 -DJS_NO_JSVAL_JSID_STRUCT_TYPES)
> + add_definitions(-DJS_NO_JSVAL_JSID_STRUCT_TYPES)
For one, this is third party code, so this would need to be updated in the corresponding rust crate first, otherwise, it will end up being reverted.
Second, removing -std=c++11 is going to break things with compilers where C++14 is not the default, so you actually want -std=c++14.
Attachment #8965679 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 9•7 years ago
|
||
Nick, I'm asking you because I found you in the commit log. Where is the upstream repo of the `js` crate?
Flags: needinfo?(nfitzgerald)
Comment 10•7 years ago
|
||
https://github.com/servo/rust-mozjs it seems.
Assignee | ||
Comment 11•7 years ago
|
||
https://dxr.mozilla.org/mozilla-central/rev/30d72755b1749953d438199456f1524ce84ab5e5/js/rust/Cargo.toml#3
> version = "0.1.4"
https://github.com/servo/rust-mozjs/blob/d027dbb85f587343c06a869d7fab8ae5981d535f/Cargo.toml#L5
> version = "0.6.1"
Wow, our in-tree copy is pretty old...
Assignee | ||
Comment 12•7 years ago
|
||
OK, so I'll have to
1. fix the upstream rust-mozjs to require C++14,
2. update the in-tree copy of rust-mozjs to the latest, and
3. land changes in this bug.
I'd rather unblock bug 1451278 and 1451722 and simply land them. Spidermonkey-sm-rust-bindings-linux64/debug is tier 2, after all.
Comment 13•7 years ago
|
||
It's fine if you don't do 2, as long as you ensure 1 is done, so that if 2 happens in the future, the changes from this bug are not reverted.
Comment 14•7 years ago
|
||
The upstream is https://github.com/servo/rust-mozjs, but they have also forked a bit.
Flags: needinfo?(nfitzgerald)
Assignee | ||
Updated•7 years ago
|
See Also: → https://github.com/servo/rust-mozjs/pull/423
Assignee | ||
Comment 15•7 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #8)
> Second, removing -std=c++11 is going to break things with compilers where
> C++14 is not the default, so you actually want -std=c++14.
Adding -std=c++14 broke compilers that do not support C++14 such as travis-ci :(
Flags: needinfo?(mh+mozilla)
Comment 16•7 years ago
|
||
The travis image they use is trusty, and that contains GCC 4.8. Which hasn't been supported to build js for a while... How outdated is upstream rust-mozjs?
Flags: needinfo?(mh+mozilla) → needinfo?(nfitzgerald)
Comment 17•7 years ago
|
||
It is 1.5 to 2 years old SM at this point. IIRC, the travis config adds a custom apt source with a newer GCC, though.
Flags: needinfo?(nfitzgerald)
Comment 18•7 years ago
|
||
Here is an example of what the travis config to use a newer GCC looks like: https://github.com/fitzgen/mozjs/blob/smup-smup-smup/.travis.yml#L14-L27
Comment 19•7 years ago
|
||
If their mozjs is that old, then I guess it doesn't make sense to have them use -std=c++14. And their build will fail with -std=c++11 when they try to update to a more current mozjs, so I guess we're fine with the status quo?
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 22•7 years ago
|
||
OK, then, please review this patch.
Comment 23•7 years ago
|
||
mozreview-review |
Comment on attachment 8965679 [details]
Bug 1451931 - Enable C++14 for SpiderMonkey Rust Bindings.
https://reviewboard.mozilla.org/r/234530/#review242090
Attachment #8965679 -
Flags: review?(mh+mozilla) → review+
Comment 24•7 years ago
|
||
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/2852286117d3
Add gcc/lib64 to the LD_LIBRARY_PATH of sm-rust-binding. r=glandium
https://hg.mozilla.org/integration/autoland/rev/b50c6e4262d1
Enable C++14 for SpiderMonkey Rust Bindings. r=glandium
Comment 25•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2852286117d3
https://hg.mozilla.org/mozilla-central/rev/b50c6e4262d1
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•6 years ago
|
Version: Version 3 → 3 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•