Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 865713

Summary: dev-lang/spidermonkey-102.1.0: ERROR: Rust compiler 1.58.1 is too old.
Product: Gentoo Linux Reporter: Roman Gruber <roman.gruber>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Roman Gruber 2022-08-18 19:31:23 UTC
Wrong dependencies

To compile Rust language sources please install at least
version 1.59.0 of the 'rustc' toolchain (or, if using nightly,
at least one version newer than 1.59.0) and make sure it is
first in your path.

checking whether the C++ compiler supports -Wthread-safety... yes
checking whether the C++ compiler supports -fno-sized-deallocation... yes
checking whether the C++ compiler supports -fno-aligned-new... yes
checking for llvm_profdata... /usr/lib/llvm/13/bin/llvm-profdata
checking for nspr >= 4.10... yes
checking NSPR_CFLAGS... -I/usr/include/nspr
checking NSPR_LIBS... -lplds4 -lplc4 -lnspr4
checking for rustc... /usr/bin/rustc
checking for cargo... /usr/bin/cargo
checking rustc version... 1.58.1
checking cargo version... 1.58.0
ERROR: Rust compiler 1.58.1 is too old.

To compile Rust language sources please install at least
version 1.59.0 of the 'rustc' toolchain (or, if using nightly,
at least one version newer than 1.59.0) and make sure it is
first in your path.

You can verify this by typing 'rustc --version'.

If you have the 'rustup' tool installed you can upgrade
to the latest release by typing 'rustup update'. The
installer is available from https://rustup.rs/


!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-lang/spidermonkey-102.1.0/work/build/config.log
 * ERROR: dev-lang/spidermonkey-102.1.0::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  122:  Called src_configure
 *             environment, line 3645:  Called econf '--host=x86_64-pc-linux-gnu' '--target=x86_64-pc-linux-gnu' '--disable-ctype' '--disable-jemalloc' '--disable-optimize' '--disable-smoosh' '--disable-strip' '--enable-readline' '--enable-release' '--enable-shared-js' '--with-intl-api' '--with-system-icu' '--with-system-nspr' '--with-system-zlib' '--with-toolchain-prefix=x86_64-pc-linux-gnu-' '--disable-debug' '--enable-jit' '--disable-tests' '--enable-rust-simd' 'XARGS=/usr/bin/xargs'
 *        phase-helpers.sh, line  711:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/spidermonkey-102.1.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/spidermonkey-102.1.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-lang/spidermonkey-102.1.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/spidermonkey-102.1.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/spidermonkey-102.1.0/work/build'
 * S: '/var/tmp/portage/dev-lang/spidermonkey-102.1.0/work/firefox-102.1.0/js/src'


Dimgrey Cavefish /home/roman # qlist -Iv rust
app-eselect/eselect-rust-20210703
dev-lang/rust-1.58.1
virtual/rust-1.58.1


Reproducible: Always



Expected Results:  
Correct Dependencies
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-18 19:31:59 UTC
Please attach the full build.log and emerge --info.
Comment 2 Joonas Niilola gentoo-dev 2022-08-18 19:52:22 UTC
Please update your system. We don't have rust-1.58 in tree anymore.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-18 19:56:05 UTC
(In reply to Joonas Niilola from comment #2)
> Please update your system. We don't have rust-1.58 in tree anymore.

Upgrading an older system will fail because there's no obligation for newer Rust to be emerged before SpiderMonkey. The dep in SpiderMonkey must be fixed.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-18 19:56:22 UTC
(In reply to Sam James from comment #3)
> (In reply to Joonas Niilola from comment #2)
> > Please update your system. We don't have rust-1.58 in tree anymore.
> 
> Upgrading an older system will fail because there's no obligation for newer
> Rust to be emerged before SpiderMonkey. The dep in SpiderMonkey must be
> fixed.

(it already has >=rust-1.51.0, it just needs to be bumped to 1.59.0).
Comment 5 Joonas Niilola gentoo-dev 2022-08-18 20:04:10 UTC
(In reply to Sam James from comment #3)
> 
> Upgrading an older system will fail because there's no obligation for newer
> Rust to be emerged before SpiderMonkey. The dep in SpiderMonkey must be
> fixed.

But --with-bdeps=y is the default now right?


(In reply to Sam James from comment #4)
> 
> (it already has >=rust-1.51.0, it just needs to be bumped to 1.59.0).

It should've been plain virtual/rust and no version restrictions since the current tree state satisfies the dep.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-18 20:09:48 UTC
(In reply to Joonas Niilola from comment #5)
> (In reply to Sam James from comment #3)
> > 
> > Upgrading an older system will fail because there's no obligation for newer
> > Rust to be emerged before SpiderMonkey. The dep in SpiderMonkey must be
> > fixed.
> 
> But --with-bdeps=y is the default now right?
> 

That doesn't make any difference.

> 
> (In reply to Sam James from comment #4)
> > 
> > (it already has >=rust-1.51.0, it just needs to be bumped to 1.59.0).
> 
> It should've been plain virtual/rust and no version restrictions since the
> current tree state satisfies the dep.

That's not how dep restrictions work. That would mean that you expect everyone to be fully up to date by the time any old deps are removed.

We tend to keep dep bounds for ~2 years. Portage does not aggressively update everything in *DEPEND before merging a package (hence merge order might not be what you expect).
Comment 7 Joonas Niilola gentoo-dev 2022-08-18 20:15:04 UTC
(In reply to Sam James from comment #6)
> 
> That doesn't make any difference.
> 

It should when you update your system normally, "-uavDU world".

But indeed I thought spidermonkey:102 will be pulled by an update, but currently no package depends on it. So I can see how "emerge --sync ; emerge spidermonkey" can happen for developers with gentoo installed.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-18 20:18:34 UTC
(In reply to Joonas Niilola from comment #7)
> (In reply to Sam James from comment #6)
> > 
> > That doesn't make any difference.
> > 
> 
> It should when you update your system normally, "-uavDU world".
> 

It's not about "will Rust get updated", it's about "will Rust be scheduled for an update *before* SpiderMonkey", that's why --with-bdeps isn't relevant here.

A simpler hypothetical example:
- A new libxslt (1.1.36) needs a newish version of libxml2 (1.1.35).
- There is no version <1.1.35 in tree for about 3 months now if I remember right.
- Portage is free, on a world upgrade (say, for a system which went 4 months without updates system), to upgrade libxslt *then* libxml2, which will result in a build failure for libxslt if I don't make the dependency in libxslt correct.
Comment 9 Joonas Niilola gentoo-dev 2022-08-18 20:28:08 UTC
(In reply to Sam James from comment #8)
> 
> It's not about "will Rust get updated", it's about "will Rust be scheduled
> for an update *before* SpiderMonkey", that's why --with-bdeps isn't relevant
> here.
> 
> A simpler hypothetical example:
> - A new libxslt (1.1.36) needs a newish version of libxml2 (1.1.35).
> - There is no version <1.1.35 in tree for about 3 months now if I remember
> right.
> - Portage is free, on a world upgrade (say, for a system which went 4 months
> without updates system), to upgrade libxslt *then* libxml2, which will
> result in a build failure for libxslt if I don't make the dependency in
> libxslt correct.

Yes, that makes sense. In my eyes though rust-1.58 was dropped in May (~3 months ago) so I expected everyone to have updated systems. Anyway I can understand how it may not happen.

Gonna fix this and #865665 and do other minor from-firefox-esr ebuild updates tomorrow.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-18 20:45:14 UTC
Sounds good! Frustratingly, some things like this are often kind of catastrophic if someone has a pending Python upgrade due, as things can be upgraded in an order such that e.g. emerge doesn't work anymore if a build fails in between say, python-exec & portage.
Comment 11 Larry the Git Cow gentoo-dev 2022-08-19 08:15:50 UTC
The bug has been closed via the following commit(s):

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

commit bd1391f06d632e35af2050caf7de942a9cf61748
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-08-19 08:08:56 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-08-19 08:15:47 +0000

    dev-lang/spidermonkey: 102 fixes
    
     - bump minimum required rust version,
     - install ProfilingCategoryList.h,
     - minor updates (CHECKREQS, mach exports...).
    
    Bug: https://bugs.gentoo.org/865665
    Closes: https://bugs.gentoo.org/865713
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-lang/spidermonkey/Manifest                     |   1 +
 .../spidermonkey/spidermonkey-102.1.0-r1.ebuild    | 404 +++++++++++++++++++++
 2 files changed, 405 insertions(+)