Configure fails to validate Cargo features required for Tup

RESOLVED FIXED in Firefox 63

Status

enhancement
RESOLVED FIXED
Last year
Last year

People

(Reporter: gps, Assigned: chmanchester)

Tracking

(Blocks 1 bug)

Trunk
mozilla63
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(2 attachments)

Reporter

Description

Last year
When trying to build with --enable-build-backends=Tup and rustc==1.26.0 and cargo==1.26.0, I get the following cryptic error message. I reckon this is due to running a cargo that doesn't support --build-plan.

Perhaps we should have configure ensure --build-plan is supported before trying to invoke it as part of the Tup backend.

 0:14.44 Reticulating splines...
 0:16.80  0:02.39 File already read. Skipping: /home/gps/src/firefox/gfx/angle/targets/angle_common/moz.build
 0:31.78  0:17.37 /home/gps/.cargo/bin/cargo build --build-plan -Z unstable-options --release --frozen --manifest-path /home/gps/src/firefox/toolkit/library/rust/Cargo.toml --lib --target=x86_64-unknown-linux-gnu --features servo bindgen quantum_render cubeb_pulse_rust cubeb-remoting moz_memory oom_with_global_alloc
 0:31.86 Traceback (most recent call last):
 0:31.86   File "/home/gps/src/firefox/configure.py", line 123, in <module>
 0:31.86     sys.exit(main(sys.argv))
 0:31.87   File "/home/gps/src/firefox/configure.py", line 34, in main
 0:31.87     return config_status(config)
 0:31.87   File "/home/gps/src/firefox/configure.py", line 118, in config_status
 0:31.87     return config_status(args=[], **encode(sanitized_config, encoding))
 0:31.87   File "/home/gps/src/firefox/python/mozbuild/mozbuild/config_status.py", line 146, in config_status
 0:31.87     the_backend.consume(definitions)
 0:31.87   File "/home/gps/src/firefox/python/mozbuild/mozbuild/backend/base.py", line 143, in consume
 0:31.87     self.consume_finished()
 0:31.87   File "/home/gps/src/firefox/python/mozbuild/mozbuild/backend/tup.py", line 623, in consume_finished
 0:31.87     gen_method(backend_file)
 0:31.87   File "/home/gps/src/firefox/python/mozbuild/mozbuild/backend/tup.py", line 819, in _gen_rust
 0:31.87     explicit_env=cargo_env)
 0:31.87   File "/home/gps/src/firefox/python/mach/mach/mixin/process.py", line 153, in run_process
 0:31.87     raise Exception('Process executed with non-0 exit code %d: %s' % (status, args))
 0:31.87 Exception: Process executed with non-0 exit code 1: ['/home/gps/.cargo/bin/cargo', u'build', u'--build-plan', u'-Z', u'unstable-options', u'--release', u'--frozen', u'--manifest-path', u'/home/gps/src/firefox/toolkit/library/rust/Cargo.toml', u'--lib', u'--target=x86_64-unknown-linux-gnu', u'--features', u'servo bindgen quantum_render cubeb_pulse_rust cubeb-remoting moz_memory oom_with_global_alloc']
 0:32.57 *** Fix above errors and then restart with\
 0:32.57                "/usr/bin/make -f client.mk build"
 0:32.57 client.mk:123: recipe for target 'configure' failed
 0:32.57 make: *** [configure] Error 1
Reporter

Comment 1

Last year
I haven't looked at the code, but it looks like we may be swallowing error output from `cargo` as well.
We should be enforcing rustc/cargo 1.28 in configure.
Assignee: nobody → cmanchester
Blocks: buildtup
Comment hidden (mozreview-request)

Comment 5

Last year
mozreview-review
Comment on attachment 8988054 [details]
Bug 1471425 - Print output of cargo if it fails when run as a part of the Tup backend.

https://reviewboard.mozilla.org/r/253296/#review260072
Attachment #8988054 - Flags: review+
Attachment #8988054 - Flags: review?(core-build-config-reviews)

Comment 6

Last year
mozreview-review
Comment on attachment 8988055 [details]
Bug 1471425 - Require rustc 1.28 in configure when building with Tup.

https://reviewboard.mozilla.org/r/253298/#review260074

Good idea to move all this out to a separate file!
Attachment #8988055 - Flags: review+
Attachment #8988055 - Flags: review?(core-build-config-reviews)

Comment 7

Last year
Pushed by cmanchester@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d6ed3df9e0d6
Print output of cargo if it fails when run as a part of the Tup backend. r=mshal
https://hg.mozilla.org/integration/autoland/rev/93ac072b098d
Require rustc 1.28 in configure when building with Tup. r=mshal
Reporter

Comment 8

Last year
Thank you for fixing this pair of bugs so promptly!

Comment 9

Last year
mozreview-review
Comment on attachment 8988055 [details]
Bug 1471425 - Require rustc 1.28 in configure when building with Tup.

https://reviewboard.mozilla.org/r/253298/#review260184

::: build/moz.configure/tup.configure:53
(Diff revision 1)
> +        die('Cannot use sccache with tup yet. Please disable sccache or use '
> +            'the make backend until it is supported.')
> +
> +@depends(tup, rustc_info)
> +def check_tup_min_rustc_version(tup, rustc_info):
> +    min_rustc_version = Version('1.28.0')

you're relying on a *cargo* feature, right? Then you should check the *cargo* version, not the rustc version.
Assignee

Comment 10

Last year
mozreview-review-reply
Comment on attachment 8988055 [details]
Bug 1471425 - Require rustc 1.28 in configure when building with Tup.

https://reviewboard.mozilla.org/r/253298/#review260184

> you're relying on a *cargo* feature, right? Then you should check the *cargo* version, not the rustc version.

We need both. I expect people generally have rustc/cargo versions in sync locally.

Comment 11

Last year
bugherder
https://hg.mozilla.org/mozilla-central/rev/d6ed3df9e0d6
https://hg.mozilla.org/mozilla-central/rev/93ac072b098d
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.