Summary: | dev-lang/rust-1.28.0-r1 in a 3945MiB System memory VirtualBox VM - error: could not exec the linker `x86_64-pc-linux-gnu-gcc` = note: Cannot allocate memory (os error 12) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | Current packages | Assignee: | Gentoo Rust Project <rust> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jstein, phils |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Juergen Rose
2018-08-11 09:13:52 UTC
root@localhost:/root(6)# emerge --info '=dev-lang/rust-1.28.0-r1::gentoo' Portage 2.3.45 (python 3.6.6-final-0, default/linux/amd64/17.0/systemd, gcc-7.3.0, glibc-2.27-r6, 4.17.14-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.17.14-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.6 KiB Mem: 4040128 total, 1972488 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sat, 11 Aug 2018 06:00:01 +0000 Head commit of repository gentoo: 227d4726293ba943b6f3b13e037ac5d2e501b4f0 sh bash 4.4_p23 ld GNU ld (Gentoo 2.30 p3) 2.30.0 app-shells/bash: 4.4_p23::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.26.2::gentoo dev-lang/python: 2.7.15::gentoo, 3.6.6::gentoo dev-util/cmake: 3.12.1::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::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.16.1-r1::gentoo sys-devel/binutils: 2.30-r3::gentoo, 2.31.1::gentoo sys-devel/gcc: 7.3.0-r3::gentoo sys-devel/gcc-config: 1.9.1::gentoo sys-devel/libtool: 2.4.6-r5::gentoo sys-devel/make: 4.2.1-r3::gentoo sys-kernel/linux-headers: 4.17::gentoo (virtual/os-headers) sys-libs/glibc: 2.27-r6::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: no sync-rsync-verify-max-age: 24 x-portage location: /usr/local/portage masters: gentoo priority: 0 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 -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 strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j2" 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="R X Xaw3d acl alsa amd64 apache2 armadillo atlas bash-completion berkdb bluetooth boost bzip2 cairo cdda cddb clang cli client cmake crypt cups curl cxx dbus device-mapper dia dot dri dts dv dvb dvd eds egl elf emacs emf encode evdev evo excel exif expat faac faad ffmpeg fftw firefox flac fontconfig fortran fpx fuse gd gdal gdbm gimp git glib gml gnome gnome-keyring gnuplot gnutls gold gphoto2 gpm grammar graphics graphtft graphviz gsl gstreamer gtk gtk3 hdf hdf5 html http httpd iconv icu imagemagick introspection ipv6 jadetex jbig jpeg jpeg2k kerberos kpathsea lapack latex ldap lensfun libffi libnotify libtirpc lzma lzo math matroska mng modules mozilla mp3 mp4 mpeg mplayer mtp multilib mysql mysqli ncurses netpbm nfs nls nptl ntp numpy octave ogg opencv opengl openmp pam pango pcre pdf pdl2 perl png policykit postscript preview-latex pulseaudio python q32 qhull qt5 raw readline rrdtool samba science seccomp server smbclient sockets sound sqlite ssl sudo systemd szip tbb tcpd tex theora threads truetype udev udisks unicode vala xattr xetex xml xorg 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="alias auth_basic authz_groupfile dav dav_fs authn_file auth_digest" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="nss" 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="keyboard mouse evdev synaptics" KERNEL="linux" 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" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="virtualbox vboxvideo nouveau" 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, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS root@localhost:/root(7)# emerge -pqv '=dev-lang/rust-1.28.0-r1::gentoo' [ebuild U ] dev-lang/rust-1.28.0-r1 [1.27.1-r2] USE="jemalloc -cargo -debug -doc -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" Created attachment 543050 [details]
build.log
See also bug 626134 -- are you building with debug info? You can try without debug or just emerge rust-bin instead of rust. (In reply to Dirkjan Ochtman from comment #3) > See also bug 626134 -- are you building with debug info? You can try without > debug or just emerge rust-bin instead of rust. I tried to build every time without debug flags. Now I increased the memory of the VM to 5961MiB System memory and added an 8 GB swap partition. The subsequent 'MAKEOPTS=-j1 emerge -v1 virtual/rust rust' worked. I also just ran into memory issues building dev-lang/rust-1.28.0-r1. I'm currently rerunning with -j2 on a 6-core machine with 16GB RAM, but after reading this ticket, wondering whether I should have used -j1. This build is enormously memory-hungry. It finally compiled successfully with -j2, after about an hour and a half. I'm going to suggest here that this ebuild should probably override MAKEOPTS and force -j1 simply to avoid out-of-memory failures. I note it is suggested earlier in the thread that people having trouble compiling dev-lang/rust can and possibly should use dev-lang/rust-bin instead. And indeed, I do have dev-lang/rust-bin in my world file. virtual/rust pulled in dev-lang/rust ANYWAY, because dev-lang/rust updated to 1.28.0-r1 and dev-lang/rust-bin didn't. And then dev-lang/cargo-0.29.0 failed in dobin. If I *manually* update dev-lang/rust-bin, then re-emerge dev-lang/cargo-0.29.0, the cargo build succeeds. It looks to me like if you want to go the rust-bin route, you will need to actually mask dev-lang/rust to keep it from getting pulled in every time it gets a version bump ahead of dev-lang/rust-bin. > I also just ran into memory issues building dev-lang/rust-1.28.0-r1. I'm currently rerunning with -j2 on a 6-core machine with 16GB RAM, but after reading this ticket, wondering whether I should have used -j1. This build is enormously memory-hungry. It builds just fine with -j8 on my 8GB amd64, so I don't think the problem is as bad as you make it out to be. > I'm going to suggest here that this ebuild should probably override MAKEOPTS and force -j1 simply to avoid out-of-memory failures. I don't think that's generally how Gentoo is run. > I note it is suggested earlier in the thread that people having trouble compiling dev-lang/rust can and possibly should use dev-lang/rust-bin instead. And indeed, I do have dev-lang/rust-bin in my world file. virtual/rust pulled in dev-lang/rust ANYWAY, because dev-lang/rust updated to 1.28.0-r1 and dev-lang/rust-bin didn't. That is odd. Are you on x86? Was this while dev-lang/rust had 1.28.0-r1 while dev-lang/rust-bin was only at 1.27.x? I generally try to upgrade them at the same time. > It looks to me like if you want to go the rust-bin route, you will need to actually mask dev-lang/rust to keep it from getting pulled in every time it gets a version bump ahead of dev-lang/rust-bin. I think we can fix the problems that come up instead of cargo-culting workarounds. (In reply to Dirkjan Ochtman from comment #7) > > I note it is suggested earlier in the thread that people having trouble compiling dev-lang/rust can and possibly should use dev-lang/rust-bin instead. And indeed, I do have dev-lang/rust-bin in my world file. virtual/rust pulled in dev-lang/rust ANYWAY, because dev-lang/rust updated to 1.28.0-r1 and dev-lang/rust-bin didn't. > > That is odd. Are you on x86? Was this while dev-lang/rust had 1.28.0-r1 > while dev-lang/rust-bin was only at 1.27.x? I generally try to upgrade them > at the same time. This is on amd64, and as far as I cansee, dev-lang/rust just updated to 1.28.0-r1 while dev-lang/rust-bin updated to 1.28.0. dev-lang/rust-bin is in my world file, dev-lang/rust is not, but virtual/rust pulled in dev-lang/rust-1.28.0-r1 anyway instead of updating dev-lang/rust-bin to 1.28.0. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0718dbc84ed51edd184446fc0d9cde7195e25a0 commit c0718dbc84ed51edd184446fc0d9cde7195e25a0 Author: Dirkjan Ochtman <djc@gentoo.org> AuthorDate: 2018-11-19 16:41:47 +0000 Commit: Dirkjan Ochtman <djc@gentoo.org> CommitDate: 2018-11-19 16:42:01 +0000 dev-lang/rust: check reqs, ewarn about cargo symlink Fixes: https://bugs.gentoo.org/626134 Fixes: https://bugs.gentoo.org/626742 Fixes: https://bugs.gentoo.org/663354 Fixes: https://bugs.gentoo.org/671182 Signed-off-by: Dirkjan Ochtman <djc@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 dev-lang/rust/rust-1.30.1-r1.ebuild | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) |