It appears as though cargo-0.29.0 fails to emerge. This occurs when attempting to emerge dev-lang/rust-1.28.0-r1. Specifically, I get Compiling cargo v0.29.0 (file:///var/tmp/portage/dev-util/cargo-0.29.0/work/cargo-0.29.0) 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 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: add #![feature(conservative_impl_trait)] to the crate attributes to enable 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)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable 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` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable 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()) | ^^^^^^^^^ | = help: add #![feature(box_leak)] to the crate attributes to enable 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)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable 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)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable 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)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable 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: add #![feature(match_default_bindings)] to the crate attributes to enable 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)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable 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)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable 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)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable 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)` | = help: add #![feature(match_default_bindings)] to the crate attributes to enable 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`. As a note, it looks like dev-util/cargo-0.29.0 pulled in dev-lang/rust-bin-1.25.0. At the moment, I have dev-lang/rust-1.25.0 and dev-lang/rust-bin-1.25.0 on my system and both fail to compile dev-util/cargo-0.29.0. It looks like the dependencies are pulling in too old a version of rust or rust-bin to compile cargo, but I don't know for sure. For reference: # emerge --info Portage 2.3.40 (python 2.7.14-final-0, default/linux/amd64/17.0/hardened, gcc-7.3.0, glibc-2.26-r7, 4.12.5-gentoo x86_64) ================================================================= System uname: Linux-4.12.5-gentoo-x86_64-Intel-R-_Core-TM-_i7-4910MQ_CPU_@_2.90GHz-with-gentoo-2.4.1 KiB Mem: 16321256 total, 13340272 free KiB Swap: 8388604 total, 8388604 free Timestamp of repository gentoo: Sun, 19 Aug 2018 05:00:01 +0000 Head commit of repository gentoo: 50ce6d045451abbd8a1fcbe5bdfaddd4943018a3 sh bash 4.4_p12 ld GNU ld (Gentoo 2.30 p2) 2.30.0 ccache version 3.3.4 [disabled] app-shells/bash: 4.4_p12::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.24.3-r1::gentoo dev-lang/python: 2.7.14-r1::gentoo, 3.4.8::gentoo, 3.5.5::gentoo, 3.6.5::gentoo dev-util/ccache: 3.3.4-r1::gentoo dev-util/cmake: 3.9.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.34.11::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.15.1-r2::gentoo sys-devel/binutils: 2.30-r2::gentoo sys-devel/gcc: 4.9.4::gentoo, 7.3.0-r3::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r3::gentoo sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers) sys-libs/glibc: 2.26-r7::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 local location: /home/myusername/usr/portage masters: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=native -pipe" DISTDIR="/usr/portage/distfiles" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://mirrors.rit.edu/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en no nb" MAKEOPTS="-j10" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="a52 aac acl acpi alsa amd64 apm bash-completion bzip2 cdda cddb crypt css cxx dbus djvu dri dvd dvdr ffmpeg flac fortran gcj gif gnuplot gnutls hardened hdf5 iconv ipv6 jpeg jpeg2k libtirpc mmx mono mozilla mp3 mp4 mpeg mpi mplayer multilib ncurses nls nptl ocaml ocamlopt offensive ogg opengl openmp pcre pdf pie png readline seccomp sse sse2 ssl ssp svg theora threads tiff truetype unicode usb vim-syntax vorbis x264 xattr xtpax xv zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" CAMERAS="canon ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="en no nb" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="NVPTX X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="intel nvidia modesetting" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
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.