mach build for Firefox 67 fails on Ubuntu 18.04.2 LTS with rust mismatched types error in servo/components/style/gecko/conversions.rs
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: david+bugs, Unassigned)
Details
Attachments
(1 file)
1.65 MB,
application/octet-stream
|
Details |
Attempting to compile Firefox 67 under Ubuntu 18.04.2 LTS fails with a rust error error[E0308]: mismatched types in servo/components/style/gecko/conversions.rs:713:64 (expected struct values::generics::NonNegative
, found struct values::computed::length::LengthPercentage
).
This is using rustc 1.35.0 (3c235d560 2019-05-20) (downloaded by "rustup" as explained in command lines below), gcc version 6.5.0 20181026 (Ubuntu 6.5.0-2ubuntu1~18.04), and other tools straight from Ubuntu.
The following exact command lines were used to perform the build (the build directory /usr/local/src/mozilla contains nothing but a Mercurial checkout, and the pristine directory /tmp/firefox-compile-typescript is used to make sure nothing from the compiling user's $HOME could get in the way):
cd /usr/local/src/mozilla
script /tmp/firefox-compile-typescript
cd /usr/local/src/mozilla
lsb_release -a
gcc-6 -v
hg pull http://hg.mozilla.org/releases/mozilla-release/
hg checkout 92c887a6b2b0d03bfc66000c2070b33089636d01
BOOTSTRAPDIR=/tmp/firefox-bootstrap
rm -rf "$BOOTSTRAPDIR"
mkdir "$BOOTSTRAPDIR"
curl -o $BOOTSTRAPDIR/sh.rustup.rs https://sh.rustup.rs
PATH="$BOOTSTRAPDIR/.cargo/bin:$PATH"
export PATH
HOME="$BOOTSTRAPDIR" sh "$BOOTSTRAPDIR/sh.rustup.rs" -y
HOME="$BOOTSTRAPDIR" rustup update
HOME="$BOOTSTRAPDIR" rustup toolchain install stable
HOME="$BOOTSTRAPDIR" rustup default stable
HOME="$BOOTSTRAPDIR" rustc --version
HOME="$BOOTSTRAPDIR" cargo --version
HOME="$BOOTSTRAPDIR" cargo install cbindgen
cat > "$BOOTSTRAPDIR/.mozconfig" << '__EOF__'
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@
mk_add_options MOZ_MAKE_FLAGS=-j24
mk_add_options AUTOCONF=autoconf2.13
mk_add_options MOZ_CO_PROJECT=browser
. $topsrcdir/browser/config/mozconfig
export CC=gcc-6
export CXX=g++-6
export LLVM_CONFIG=llvm-config-3.9
export NODEJS=/opt/node-v10/bin/node
ac_add_options --prefix=/opt/firefox-67.0.2
ac_add_options --enable-optimize='-march=native -O2'
ac_add_options --enable-official-branding
ac_add_options --enable-startup-notification
ac_add_options --disable-tests
__EOF__
MOZCONFIG="$BOOTSTRAPDIR/.mozconfig" HOME="$BOOTSTRAPDIR" ./mach build
The full build transcript is attached to this bug report (produced by the Unix "script" utility, so it isn't very readable), but the first failing lines are as follows:
9:54.56 error[E0308]: mismatched types
9:54.56 --> servo/components/style/gecko/conversions.rs:713:64
9:54.56 |
9:54.57 713 | GenericBasicShape::Inset(InsetRect { rect, round })
9:54.57 | ^^^^^ expected struct `values::generics::NonNegative`, found struct `values::computed::length::LengthPercentage`
9:54.57 |
9:54.57 = note: expected type `values::generics::border::GenericBorderRadius<values::generics::NonNegative<values::computed::length::LengthPercentage>>`
9:54.57 found type `values::generics::border::GenericBorderRadius<values::computed::length::LengthPercentage>`
Reporter | ||
Comment 1•5 years ago
|
||
Cross-references: Google returns very few results when searching for “servo/components/style/gecko/conversions.rs "mismatched types"”, but one is but #1367904 from this bugzilla, which I don't understand at all, and another is the tweet https://twitter.com/mito70950481/status/1132480416793841664 which suggests I am not alone in encountering this problem. But I don't understand why it is so rare.
Comment 2•5 years ago
|
||
We only support building release with the version of Rust defined in build/moz.configure/rust.configure; in this case 1.32. mach bootstrap
isn't guaranteed to provide a working build on non-mozilla-central trees.
Reporter | ||
Comment 3•5 years ago
|
||
I will retry with rust 1.32, but where do I find the precise build instructions for the stable branch?
Reporter | ||
Comment 4•5 years ago
|
||
I just retried with rust 1.32 (rustc 1.32.0 (9fda7c223 2019-01-16)
) as specified in build/moz.configure/rust.configure
and cbindgen 0.8.2 as specified in build/moz.configure/bindgen.configure
, and the same error occurred, so rust and cbindgen versions don't seem to be the issue here.
I have the same mistake.
root@astra-orel:/opt# rustc --version
rustc 1.35.0 (3c235d560 2019-05-20)
Updated•2 years ago
|
Description
•