Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628122 - dev-lang/rust-1.19.0 - collect2: fatal error: ld terminated with signal 9 [Killed]
Summary: dev-lang/rust-1.19.0 - collect2: fatal error: ld terminated with signal 9 [Ki...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-17 16:53 UTC by Roman
Modified: 2017-10-18 08:35 UTC (History)
2 users (show)

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


Attachments
rust-1.19.0-linkfail.tar.gz (rust-1.19.0-linkfail.tar.gz,84.11 KB, application/x-gzip-compressed-tar)
2017-08-17 16:53 UTC, Roman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman 2017-08-17 16:53:32 UTC
Created attachment 489454 [details]
rust-1.19.0-linkfail.tar.gz

I am unable to emerge dev-lang/rust-1.19.0 - it fails while linking

file:///var/tmp/portage/dev-lang/rust-1.19.0/work/rustc-1.19.0-src/src/libsyntax

Reverting to gcc-5.4.0 does not help (I am using 6.3.0). Trying to enable 'clang' or 'clang libcxx' USE flags does not help either. See attachment for logs.

Unfortunately, switching to rust-bin is not an option for me, as it does not allow to compile FireFox (see bug #621832).
Comment 1 Jory A. Pratt gentoo-dev 2017-08-18 00:07:03 UTC
(In reply to Roman S. from comment #0)
> Created attachment 489454 [details]
> build log & system info
> 
> I am unable to emerge dev-lang/rust-1.19.0 - it fails while linking
> 
> file:///var/tmp/portage/dev-lang/rust-1.19.0/work/rustc-1.19.0-src/src/
> libsyntax
> 
> Reverting to gcc-5.4.0 does not help (I am using 6.3.0). Trying to enable
> 'clang' or 'clang libcxx' USE flags does not help either. See attachment for
> logs.
> 
> Unfortunately, switching to rust-bin is not an option for me, as it does not
> allow to compile FireFox (see bug #621832).

Firefox-55.0.1 does support using rust-bin the virtual has been used for 2 releases already.
Comment 2 Roman 2017-08-19 06:06:21 UTC
> Firefox-55.0.1 does support using rust-bin the virtual has been used
> for 2 releases already

It supports, but the support doesn't work correctly. At least not for all the users.
Comment 3 Laurent Morretton 2017-08-19 19:41:23 UTC
I had got the same issue. The following attempt had failed linking rustc_errors.
As far as I am concerned, the problem was due to my PORTAGE_TMPDIR that was running out of space.
I noticed that we need at least 4Go of free space in PORTAGE_TMPDIR to compile rust.
Never know, perhaps it can help.
Comment 4 Roman 2017-08-19 20:35:54 UTC
I have well above 40 GB free space on portage TMP directory (it is in tmpfs - I have 32GB RAM + same swap).
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2017-08-26 12:09:24 UTC
Looks like you ran out of memory. If not, it's up to you to figure out why the process got killed like that and determine if the build system is at fault after all.
Comment 6 Roman 2017-09-07 17:36:00 UTC
If you have any idea how to check it within, let's say, 2 hours of work, I might try. My build system seems to be working correctly - all the other packages build without strange problems (there are some gcc 6.3 related breakages, but all of them are well known problems, already reported here).

I have already resolved my initial problem by fixing other faulty ebuilds in my local overlay, so I'm not willing to spend too much time on this (busy with other things) - just reported the problem, so you know something is not working correctly.

BTW. If building the package requires over 40GB of space, I suggest to add some space check to the build, like the LibreOffice support team did.
Comment 7 Julien Sanchez archtester 2017-10-18 08:35:45 UTC
> I am unable to emerge dev-lang/rust-1.19.0 - it fails while linking

I have just had the same issue (16 GB of memory and more than 200 GB of free space). 

Removing -ggdb from CFLAGS solves it (you have it enabled in your CFLAGS). You could do it per-package by adding the following line into /etc/portage/package.env file:

------
dev-lang/rust rust.conf
------

then, based on your current settings, create a /etc/portage/env/rust.conf file containing:

------
CFLAGS="-O2 -march=native -pipe"
CXXFLAGS="${CFLAGS}"
------

What I don't known is how much memory is needed to be able to keep -ggdb in CFLAGS.