Summary: | dev-util/cargo-0.29.0 Failes to emerge | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | hfk22 <gentoo> |
Component: | Current packages | Assignee: | Gentoo Rust Project <rust> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bertrand, gentoo, gentoo, jstein, Manfred.Knick |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
hfk22
2018-08-24 15:37:02 UTC
I have the same problem, but I have two machines with very similar setup, and this failure to emerge only appears on one of them. But I do not know where to begin to look for relevant differences. If someone wants to suggest logs or anything in trying to get to the bottom of this, I'm happy to help. This indeed seems to be because the rust compiler is too old for compiling the cargo version. IIRC cargo was a rustc PDEPEND exactly to make sure it gets compiled with the new rustc version, not the old one. Can you show me the currently active version of rustc (rustc --version) as well as the build order for rust and cargo from emerge -p or similar? Yeah, rustc had different versions on my two machines, unmasking 1.28.0 and upgrading: # emerge -avuDNt @world These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild U ~] dev-util/cargo-0.29.0::gentoo [0.28.0::gentoo] USE="-debug -doc -libressl" 0 KiB [ebuild U ~] virtual/rust-1.28.0::gentoo [1.25.0::gentoo] 0 KiB [ebuild U ~] dev-lang/rust-1.28.0-r1:stable/1.28::gentoo [1.25.0:stable/1.25::gentoo] USE="jemalloc -cargo% -debug -doc -libressl% -rls% -rustfmt% -wasm% (-extended%)" ABI_X86="32%* (64%*) (-x32)" LLVM_TARGETS="(X86%*) -AArch64% -AMDGPU% -ARM% -BPF% -Hexagon% -Lanai% -MSP430% -Mips% -NVPTX% -PowerPC% -Sparc% -SystemZ% -XCore%" 195,370 KiB Total: 3 packages (3 upgrades), Size of downloads: 195,370 KiB fixed it for me. (In reply to Dirkjan Ochtman from comment #2) > This indeed seems to be because the rust compiler is too old for compiling > the cargo version. IIRC cargo was a rustc PDEPEND exactly to make sure it > gets compiled with the new rustc version, not the old one. Can you show me > the currently active version of rustc (rustc --version) as well as the build > order for rust and cargo from emerge -p or similar? $ rustc --version rustc 1.25.0 (84203cac6 2018-03-25) $ emerge -p -t rust These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild U ~] dev-lang/rust-1.28.0-r1 [1.25.0] USE="-cargo% -libressl% -rls% -rustfmt% -wasm%" ABI_X86="(64%*) -32% (-x32)" LLVM_TARGETS="NVPTX%* (X86%*) -AArch64% -AMDGPU% -ARM% -BPF% -Hexagon% -Lanai% -MSP430% -Mips% -PowerPC% -Sparc% -SystemZ% -XCore%" [ebuild U ~] dev-util/cargo-0.29.0 [0.27.0] $ eselect rust list Available Rust versions: [1] rust-1.25.0 [2] rust-bin-1.25.0 * Now, originally, I did not have rust-bin. Going back through my logs, I see: *** emerge --ask --update rust >>> emerge (1 of 3) dev-lang/rust-bin-1.25.0 to / >>> emerge (2 of 3) dev-util/cargo-0.29.0 to / This last one failed. The third package was rust-1.28.0-r1. Mostly, I'm including this to note that rust-bin was pulled in by the original update of rust in case it matters. I don't think that this has been fixed, but the following worked for me: emerge --ask --update =rust-1.27.1-r2 eselect rust set (number for 1.27.1) emerge --ask --update rust Basically, I upgraded to rust-1.27.1-r2, which allowed cargo-0.29.0 to compile properly. Then, I could compile rust-1.28.0. (In reply to hfk22 from comment #5) Because of dev-util/cargo-0.29.0:0 having been stabilized, I had to unmask and explicitly emerge =dev-util/cargo-0.28.0 =rust-1.27.1-r2 =rust-bin-1.27.1-r1 =virtual/rust-1.27.1:0 first. Afterwards, dev-lang/rust-1.28.0-r1 virtual/rust-1.28.0 dev-util/cargo-0.29.0 were pulled; manually I emerged dev-lang/rust-bin-1.28.0-r1 to bring down to a round figure. Finally, only enabling =virtual/rust-1.28.0:0 ~amd64 was needed as a 'left-over' which should have been stabilized together with it's friends. HTH Thanks! (In reply to hfk22 from comment #5) > I don't think that this has been fixed, but the following worked for me: > > emerge --ask --update =rust-1.27.1-r2 > eselect rust set (number for 1.27.1) > emerge --ask --update rust How can this solve the issue, if an update of rust requires an update of cargo first? $> emerge --ask --update =rust-1.27.1-r2 Calculating dependencies... done! [ebuild N ] dev-util/cargo-0.29.0 USE="-debug -doc -libressl" [ebuild N ~] dev-lang/rust-1.27.1-r2 USE="jemalloc -cargo -debug -doc -rls -rustfmt -wasm" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc -SystemZ -XCore" (In reply to onkobu from comment #7) > (In reply to hfk22 from comment #5) > How can this solve the issue, if an update of rust requires an update of > cargo first? :: Step By Step ! Because a quick look into the ebuilds reveals that the corresponding CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0" (In reply to onkobu from comment #7) > (In reply to hfk22 from comment #5) > > I don't think that this has been fixed, but the following worked for me: > > > > emerge --ask --update =rust-1.27.1-r2 > > eselect rust set (number for 1.27.1) > > emerge --ask --update rust > > How can this solve the issue, if an update of rust requires an update of > cargo first? > > > $> emerge --ask --update =rust-1.27.1-r2 > > Calculating dependencies... done! > [ebuild N ] dev-util/cargo-0.29.0 USE="-debug -doc -libressl" > [ebuild N ~] dev-lang/rust-1.27.1-r2 USE="jemalloc -cargo -debug -doc > -rls -rustfmt -wasm" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="(X86) -AArch64 > -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc > -SystemZ -XCore" In order to change the order, I think that you should also unmask virtual/cargo-1.27.* and upgrate it too. That worked for me in order to change the merge order. However, changing the merge order didn't solve the issue for me. With the following versions: dev-lang/rust-1.28.0-r1 (compiled) virtual/rust-1.28.0 (compiled) dev-util/cargo-0.29.0 (failed) Those are the errors that I got: error[E0658]: `impl Trait` in return position is experimental (see issue #34511) --> src/cargo/core/resolver/types.rs:209:37 | 209 | pub fn flatten<'s>(&'s self) -> impl Iterator<Item=(&PackageId, Dependency)> + 's { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead --> src/cargo/lib.rs:172:30 | 172 | for err in cargo_err.causes().skip(1) { | ^^^^^^ | = note: #[warn(deprecated)] on by default warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead --> src/cargo/lib.rs:178:30 | 178 | for err in cargo_err.causes().skip(1) { | ^^^^^^ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/core/compiler/build_plan.rs:87:17 | 87 | Some(s) => s, | ^^^^^^^ help: consider using a reference: `&Some(s)` error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/core/compiler/build_plan.rs:88:17 | 88 | None => continue, | ^^^^ help: consider using a reference: `&None` warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead --> src/cargo/core/compiler/fingerprint.rs:682:21 | 682 | for cause in ce.causes().skip(1) { | ^^^^^^ error[E0658]: use of unstable library feature 'box_leak': needs an FCP to stabilize (see issue #46179) --> src/cargo/core/interning.rs:13:5 | 13 | Box::leak(s.into_boxed_str()) | ^^^^^^^^^ error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/core/resolver/context.rs:406:13 | 406 | FeatureValue::Feature(feat) => self.require_feature(feat.as_str()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&FeatureValue::Feature(feat)` error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/core/resolver/context.rs:407:13 | 407 | FeatureValue::Crate(dep) => Ok(self.require_dependency(dep.as_str())), | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&FeatureValue::Crate(dep)` error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/core/resolver/context.rs:408:13 | 408 | FeatureValue::CrateFeature(dep, dep_feat) => { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&FeatureValue::CrateFeature(dep, dep_feat)` error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/ops/cargo_test.rs:158:13 | 158 | let Doctest { | _____________^ 159 | | package, 160 | | target, 161 | | deps, 162 | | } = doctest_info; | |_________^ help: consider using a reference | 158 | let &Doctest { 159 | package, 160 | target, 161 | deps, 162 | } = doctest_info; | error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/util/config.rs:805:13 | 805 | ConfigKeyPart::Part(s) => s.replace("-", "_").to_uppercase(), | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&ConfigKeyPart::Part(s)` error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/util/config.rs:806:13 | 806 | ConfigKeyPart::CasePart(s) => s.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&ConfigKeyPart::CasePart(s)` error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/util/config.rs:812:13 | 812 | ConfigKeyPart::Part(s) => s.clone(), | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&ConfigKeyPart::Part(s)` error[E0658]: non-reference pattern used to match a reference (see issue #42640) --> src/cargo/util/config.rs:813:13 | 813 | ConfigKeyPart::CasePart(s) => s.clone(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a reference: `&ConfigKeyPart::CasePart(s)` warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead --> src/cargo/util/config.rs:924:14 | 924 | .causes() | ^^^^^^ warning: use of deprecated item 'failure::Error::cause': please use 'as_fail()' method instead --> src/cargo/util/errors.rs:59:20 | 59 | self.inner.cause().cause() | ^^^^^ warning: use of deprecated item 'failure::Error::causes': please use the 'iter_chain()' method instead --> src/cargo/util/network.rs:10:18 | 10 | for e in err.causes() { | ^^^^^^ error: aborting due to 12 previous errors error: Could not compile `cargo`. (In reply to Armitage from comment #9) > (In reply to onkobu from comment #7) > > (In reply to hfk22 from comment #5) > > > I don't think that this has been fixed, but the following worked for me: > > > > > > emerge --ask --update =rust-1.27.1-r2 > > > eselect rust set (number for 1.27.1) > > > emerge --ask --update rust > > > > How can this solve the issue, if an update of rust requires an update of > > cargo first? > > > > > > $> emerge --ask --update =rust-1.27.1-r2 > > > > Calculating dependencies... done! > > [ebuild N ] dev-util/cargo-0.29.0 USE="-debug -doc -libressl" > > [ebuild N ~] dev-lang/rust-1.27.1-r2 USE="jemalloc -cargo -debug -doc > > -rls -rustfmt -wasm" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="(X86) -AArch64 > > -AMDGPU -ARM -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -Sparc > > -SystemZ -XCore" > > In order to change the order, I think that you should also unmask > virtual/cargo-1.27.* and upgrate it too. That worked for me in order to > change the merge order. > > However, changing the merge order didn't solve the issue for me. With the > following versions: > > dev-lang/rust-1.28.0-r1 (compiled) > virtual/rust-1.28.0 (compiled) > dev-util/cargo-0.29.0 (failed) > Ok, my bad. Upgrading rust before cargo SOLVED the problem in my case, but I had to manually change the rust with eselect. So, in my case the steps to solve the problems would be: 1.- Be sure that virtual/rust will also be updated (my test was done using the same version that I used on dev-lang/rust). 2.- Upgrade only dev-lang/rust and virtual/rust. 3.- Change the rust version with eselect and check that the new version is active. 4.- Upgrade dev-util/cargo. Hope it helps. I just found this (very current ;-) thread when the new firefox did not emerge. Reason: virtual/rust-1.28 must be stabilized. Afterwards, emerge suggests to install rust-1.28 first (no other rust preinstalled) and cargo next. So the more specific bug report should be: make cargo depend on a reasonably recent virtual/rust. (In reply to Thomas from comment #12) > So the more specific bug report should be: make cargo depend on a reasonably > recent virtual/rust. If it does not build with an older rust, this is the only solution. I succeeded with https://bugs.gentoo.org/664484#c6: # added --oneshot to keep it out of world file, where it wasn't recorded before # also necessary to do the unmasking for ~amd64 # $> emerge --ask --oneshot =dev-util/cargo-0.28.0 =rust-1.27.1-r2 # afterwards change rust environment, select version 1.27 in favor of 1.25 # $> eselect rust list $> eselect rust set <your-version> # pull in most recent versions, including firefox 60 # $> emerge --ask --update @world In case there is no rust installed yet, you can simply add =virtual/rust-1.28* ~amd64 to package.keywords. Then emerge builds rust first (the proper version) and cargo next. No step wise update of rust required. (In reply to onkobu from comment #13) > (In reply to Thomas from comment #12) > > So the more specific bug report should be: make cargo depend on a reasonably > > recent virtual/rust. > > If it does not build with an older rust, this is the only solution. I > succeeded with https://bugs.gentoo.org/664484#c6: > The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35df61400f902c057036be8d0a716512d95800cc commit 35df61400f902c057036be8d0a716512d95800cc Author: Dirkjan Ochtman <djc@gentoo.org> AuthorDate: 2018-09-10 07:35:19 +0000 Commit: Dirkjan Ochtman <djc@gentoo.org> CommitDate: 2018-09-10 07:35:19 +0000 dev-util/cargo: depend on recent rust This hopefully prevents compilation failures to a too old compiler. Closes: https://bugs.gentoo.org/664484 Package-Manager: Portage-2.3.40, Repoman-2.3.9 dev-util/cargo/cargo-0.29.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Humble question: Cleanup needed? Some packages depend upon { rust | rust-bin | cargo } directly, instead of their corresponding virtual: # equery depends dev-util/cargo dev-lang/rust dev-lang/rust-bin virtual/rust virtual/cargo * These packages depend on dev-util/cargo: dev-lang/rust-1.28.0-r1 (!cargo ? >=dev-util/cargo-0.29.0) dev-lang/rust-bin-1.28.0-r1 (!cargo ? >=dev-util/cargo-0.29.0) www-client/firefox-62.0-r1 (elibc_glibc ? >=dev-util/cargo-0.25.0) (>=dev-util/cargo-0.25.0) (elibc_musl ? >=dev-util/cargo-0.25.0) * These packages depend on dev-lang/rust: mail-client/thunderbird-52.9.1 (rust ? dev-lang/rust) virtual/rust-1.28.0 (=dev-lang/rust-1.28.0*) www-client/firefox-62.0-r1 (elibc_glibc ? >=dev-lang/rust-1.24.0[-extended(-)]) (>=dev-lang/rust-1.24.0[extended]) (elibc_musl ? >=dev-lang/rust-1.24.0) * These packages depend on dev-lang/rust-bin: virtual/rust-1.28.0 (=dev-lang/rust-bin-1.28.0*) www-client/firefox-62.0-r1 (>=dev-lang/rust-bin-1.24.0) * These packages depend on virtual/rust: dev-util/cargo-0.29.0 (>=virtual/rust-1.27.0) * These packages depend on virtual/cargo: # I filed follow-up bug 665620 for the Mozilla project. |