Closed Bug 1563714 Opened 6 years ago Closed 6 years ago

Upgrading to rustc 1.36.0 breaks build: error: the option `Z` is only accepted on the nightly compiler

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: ato, Unassigned)

Details

Attachments

(1 file)

After upgrading to the latest stable rustc 1.36.0, my local build breaks:
https://gist.github.com/andreastt/50cc10935af7d3619ec6238972517368

Relevant excerpt:

 0:34.30    Compiling unicode-xid v0.1.0
 0:34.33 error: the option `Z` is only accepted on the nightly compiler
 0:34.36 error: Could not compile `unicode-xid`.
 0:34.36 To learn more, run the command again with --verbose.
 0:34.37 make[4]: *** [/home/ato/src/gecko/config/makefiles/rust.mk:241: force-cargo-library-build] Error 101
 0:34.37 make[3]: *** [/home/ato/src/gecko/config/recurse.mk:74: js/src/rust/target] Error 2
 1:20.76 make[2]: *** [/home/ato/src/gecko/config/recurse.mk:34: compile] Error 2
 1:20.76 make[1]: *** [/home/ato/src/gecko/config/rules.mk:391: default] Error 2
 1:20.76 make: *** [client.mk:125: build] Error 2

I first thought this was related to RUSTC_WRAPPER and sccache,
but unsetting it didn’t help.

One of the failing build targets is testing/geckodriver,
but if I run cargo build directly in that subdirectory I don’t get any build errors.

Can you attach a mach build -v log?

Attached file build.log

Here you are!

A few more tidbits:

% rustc --version
rustc 1.36.0 (a53f9df32 2019-07-03)
% uname -a
Linux tristan 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 (2018-12-22) x86_64 GNU/Linux

So the rust compiler is being passed "-Zunstable-options -Zemit-artifact-notifications" by something. That something is not the build system. Is that done in your mozconfig?

Flags: needinfo?(ato)

Thanks to your hint, I found this instruction in my mozconfig is
incompatible with rustc 1.36.0:

mk_add_options 'export CARGO_BUILD_PIPELINING=true'

Removing it causes the build to succeed.

Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(ato)
Resolution: --- → INVALID

Huh, you should file a bug against cargo. Setting an environment variable for a nightly cargo feature should not actually do anything with stable cargo.

The instructions to enable export CARGO_BUILD_PIPELINING=true explicitely said to do rustup update nightly && rustup default nightly
see https://groups.google.com/forum/#!topic/mozilla.dev.platform/bXB5QxAV-fE
I hit the same problem and resolved following those instructions

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: