Closed
Bug 1305604
Opened 8 years ago
Closed 8 years ago
Build failure with Rust GTests due to dash/underscore mismatch
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox52 fixed)
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: kinetik, Assigned: kinetik)
Details
Attachments
(1 file)
887 bytes,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
Building gtests with rustc 1.11.0 fails with: libxul-gtest-real-rs-prelink.a /home/kinetik/.cargo/bin/rustc -o ../../../toolkit/library/gtest/rust/libxul-gtest-real-rs-prelink.a --crate-type staticlib --target x86_64-unknown-linux-gnu --extern gkrust=../../../toolkit/library/rust/x86_64-unknown-linux-gnu/debug/libgkrust.rlib -L ../../../toolkit/library/rust/x86_64-unknown-linux-gnu/debug/deps --extern gkrust-gtest=../../../toolkit/library/gtest/rust/x86_64-unknown-linux-gnu/debug/libgkrust_gtest.rlib -L ../../../toolkit/library/gtest/rust/x86_64-unknown-linux-gnu/debug/deps -g -C panic=abort -C opt-level=1 -C debug-assertions /home/kinetik/mozilla/gecko/obj-x86_64-pc-linux-gnu/toolkit/library/gtest/xul-gtest-real-rs-prelink.rs /home/kinetik/mozilla/gecko/obj-x86_64-pc-linux-gnu/toolkit/library/gtest/xul-gtest-real-rs-prelink.rs:4:1: 4:27 error: can't find crate for `gkrust_gtest` [E0463] Note that the rustc command contains "-extern gkrust-gtest=..." but Rust expects gkrust_gtest. Where the rs-prelink.rs file is generated in python/mozbuild/mozbuild/backend/recursivemake.py, rlib.basename has dashes replaced with underscores, but later when the --extern option is built it does not.
Assignee | ||
Comment 1•8 years ago
|
||
Use the same dash-to-underscore replacement when building the --extern option as is used when writing the rs-prelink.rs file. Not sure if this is the right way to fix it, but it works for me.
Attachment #8795097 -
Flags: review?(nfroyd)
Comment 2•8 years ago
|
||
Comment on attachment 8795097 [details] [diff] [review] v0 Review of attachment 8795097 [details] [diff] [review]: ----------------------------------------------------------------- I'm curious why this doesn't show up on automation, since we use Rust 1.11 there...
Attachment #8795097 -
Flags: review?(nfroyd) → review+
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → kinetik
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #2) > I'm curious why this doesn't show up on automation, since we use Rust 1.11 > there... Yeah, the fact that I'm the only one that seems to have hit this seems strange. It's not a recent change to rustc option handling, either, since I went as far back as 1.9.0 and saw the same problem.
Pushed by mgregan@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b7366ba1500d Convert dashes to underscores in crate name when generating --extern option. r=froydnj
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b7366ba1500d
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•