Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 871972 - =dev-lang/spidermonkey-78.15.0: error: expected one of `!` or `::`, found keyword `mod`
Summary: =dev-lang/spidermonkey-78.15.0: error: expected one of `!` or `::`, found ke...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-20 04:25 UTC by jesxpresso
Modified: 2022-09-22 08:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
spidermonkey-91.11.0 build.log (build.log,462.50 KB, text/plain)
2022-09-21 09:53 UTC, Frederik Pfautsch
Details
emerge --info (emerge-info.txt,22.24 KB, text/plain)
2022-09-21 09:53 UTC, Frederik Pfautsch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jesxpresso 2022-09-20 04:25:34 UTC
When emerging spidermonkey 78.15.0, the package fails to compile due to a crate (packed_simd v0.3.4) being being broken on crates.io that is no longer maintained. A replacement crate is available and a fix has been proposed on the packed_simd GitHub . It seems that adding 
EXTRA_ECONF="--disable-rust-simd" to make.conf and running emerge -v1 spidermonkey:78 allows for successful compilation.
Comment 1 Stephan Hartmann (RETIRED) gentoo-dev 2022-09-20 08:27:50 UTC
Please attach the full build.log and paste emerge --info. Afterwards, please re-open. Also add the link to the proposed fix on GitHub.
Comment 2 Frederik Pfautsch 2022-09-21 09:52:41 UTC
I am getting this (or at least an error which presents itself similarly with the same fix), hence I am attaching my logs. If your error, jesxpresso@gmail.com, is different, please excuse this.

My profile is a combination of hardened and desktop/gnome, so not sure if it influences this because I hit this error when recompiling everything. Firefox and Thunderbird are also affected, with the same fix.

Solution/Workaround was to add package.env/disable_packedsimd with content 'EXTRA_ECONF="--disable-rust-simd"' for Thunderbird, Firefox and Spidermonkey.

jesxpresso seems to refer to the following github repo: https://github.com/rust-lang/packed_simd, which states the version which seems to get shipped by Mozilla is outdated.

---
Relevant part of log:

error: expected one of `!` or `::`, found keyword `mod`
   --> /var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/firefox-91.11.0/third_party/rust/packed_simd/src/lib.rs:337:7
    |
337 | crate mod llvm {
    |       ^^^ expected one of `!` or `::`

The following warnings were emitted during compilation:

warning: Cannot set `RUSTC_BOOTSTRAP=1` from build script of `packed_simd v0.3.4 (https://github.com/hsivonen/packed_simd?rev=8b4bd7d8229660a749dbe419a57ea01df9de5453#8b4bd7d8)`.
note: Crates cannot set `RUSTC_BOOTSTRAP` themselves, as doing so would subvert the stability guarantees of Rust for your project.

error: could not compile `packed_simd` due to previous error

Caused by:
  process didn't exit successfully: `CARGO=/usr/lib/rust/1.63.0/bin/cargo-1.63.0 CARGO_CRATE_NAME=packed_simd CARGO_MANIFEST_DIR=/var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/firefox-91.11.0/third_party/rust/packed_simd CARGO_PKG_AUTHORS='Gonzalo Brito Gadeschi <gonzalobg88@gmail.com>' CARGO_PKG_DESCRIPTION='Portable Packed SIMD vectors' CARGO_PKG_HOMEPAGE='https://github.com/rust-lang-nursery/packed_simd' CARGO_PKG_LICENSE=MIT/Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=packed_simd CARGO_PKG_REPOSITORY='https://github.com/rust-lang-nursery/packed_simd' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.3.4 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=3 CARGO_PKG_VERSION_PATCH=4 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/build/release/deps:/usr/lib/rust/1.63.0/lib' OUT_DIR=/var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/build/x86_64-unknown-linux-gnu/release/build/packed_simd-5f94d3e9d18b02a6/out /usr/bin/rustc --crate-name packed_simd --edition=2018 /var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/firefox-91.11.0/third_party/rust/packed_simd/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C panic=abort -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="into_bits"' -C metadata=f4f1a99f07dc48a2 -C extra-filename=-f4f1a99f07dc48a2 --out-dir /var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/build/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C linker=/var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/firefox-91.11.0/build/cargo-linker -L dependency=/var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/build/x86_64-unknown-linux-gnu/release/deps -L dependency=/var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/build/release/deps --extern cfg_if=/var/tmp/portage/dev-lang/spidermonkey-91.11.0/work/build/x86_64-unknown-linux-gnu/release/deps/libcfg_if-6c142c2b3e1480df.rmeta --cap-lints warn -C debug-assertions=no -C debuginfo=2 -C force-frame-pointers=yes --cap-lints warn -Ctarget-cpu=native -Copt-level=2 -Clinker-plugin-lto -C codegen-units=1` (exit status: 1)
Comment 3 Frederik Pfautsch 2022-09-21 09:53:23 UTC
Created attachment 813298 [details]
spidermonkey-91.11.0 build.log
Comment 4 Frederik Pfautsch 2022-09-21 09:53:35 UTC
Created attachment 813301 [details]
emerge --info
Comment 5 Larry the Git Cow gentoo-dev 2022-09-22 08:06:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0996bae453067163e0c4111a95ccc6025d70f518

commit 0996bae453067163e0c4111a95ccc6025d70f518
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-09-22 08:00:53 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-09-22 08:06:42 +0000

    dev-lang/spidermonkey: disable rust-simd on 78
    
     - broken with newer rust versions, may cause performance issues but this
       branch is EOL.
    
    Closes: https://bugs.gentoo.org/871972
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-lang/spidermonkey/spidermonkey-78.15.0.ebuild | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)