collect2: fatal error: ld terminated with signal 9 [Killed] clang

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

collect2: fatal error: ld terminated with signal 9 [Killed] clang

Manuel Klimek via cfe-dev
I was building clang on Ubuntu 18.04

and got the error message
collect2: fatal error: ld terminated with signal 9 [Killed] clang

I have 8 GB ram
and increased the Linux swap to 40 GB but still same problem.

Full error message
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
tools/lto/CMakeFiles/LTO.dir/build.make:270: recipe for target 'lib/libLTO.so.11git' failed
make[2]: *** [lib/libLTO.so.11git] Error 1
make[2]: *** Deleting file 'lib/libLTO.so.11git'
CMakeFiles/Makefile2:23538: recipe for target 'tools/lto/CMakeFiles/LTO.dir/all' failed
make[1]: *** [tools/lto/CMakeFiles/LTO.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: collect2: fatal error: ld terminated with signal 9 [Killed] clang

Manuel Klimek via cfe-dev

The error message is typical of the ran-out-of-memory condition.

It appears you are using ld as your linker? (it is the default on Ubuntu) Our usual next suggestion is to use gold or lld instead, as they consume less memory.  There are instructions on the web for making gold your default linker.

If that is not practical, the other suggestion is to reduce the number of threads (the -j option to make or ninja).  If you are doing a Debug build, likely you would need to use -j1.

Best regards,

--paulr

 

From: cfe-dev <[hidden email]> On Behalf Of suyash singh via cfe-dev
Sent: Wednesday, March 25, 2020 2:07 PM
To: [hidden email]
Subject: [cfe-dev] collect2: fatal error: ld terminated with signal 9 [Killed] clang

 

I was building clang on Ubuntu 18.04

 

and got the error message

collect2: fatal error: ld terminated with signal 9 [Killed] clang

 

I have 8 GB ram

and increased the Linux swap to 40 GB but still same problem.

 

Full error message

collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
tools/lto/CMakeFiles/LTO.dir/build.make:270: recipe for target 'lib/libLTO.so.11git' failed
make[2]: *** [lib/libLTO.so.11git] Error 1
make[2]: *** Deleting file 'lib/libLTO.so.11git'
CMakeFiles/Makefile2:23538: recipe for target 'tools/lto/CMakeFiles/LTO.dir/all' failed
make[1]: *** [tools/lto/CMakeFiles/LTO.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: collect2: fatal error: ld terminated with signal 9 [Killed] clang

Manuel Klimek via cfe-dev
There is currently a review going on to add mitigations to the
documentation: https://reviews.llvm.org/D75425

I asked the author to make one more simple change before I'd
accept/commit the change myself.

Michael

Am Mi., 25. März 2020 um 14:36 Uhr schrieb Robinson, Paul via cfe-dev
<[hidden email]>:

>
> The error message is typical of the ran-out-of-memory condition.
>
> It appears you are using ld as your linker? (it is the default on Ubuntu) Our usual next suggestion is to use gold or lld instead, as they consume less memory.  There are instructions on the web for making gold your default linker.
>
> If that is not practical, the other suggestion is to reduce the number of threads (the -j option to make or ninja).  If you are doing a Debug build, likely you would need to use -j1.
>
> Best regards,
>
> --paulr
>
>
>
> From: cfe-dev <[hidden email]> On Behalf Of suyash singh via cfe-dev
> Sent: Wednesday, March 25, 2020 2:07 PM
> To: [hidden email]
> Subject: [cfe-dev] collect2: fatal error: ld terminated with signal 9 [Killed] clang
>
>
>
> I was building clang on Ubuntu 18.04
>
> https://clang.llvm.org/get_started.html#build
>
>
>
> and got the error message
>
> collect2: fatal error: ld terminated with signal 9 [Killed] clang
>
>
>
> I have 8 GB ram
>
> and increased the Linux swap to 40 GB but still same problem.
>
>
>
> Full error message
>
> collect2: fatal error: ld terminated with signal 9 [Killed]
> compilation terminated.
> tools/lto/CMakeFiles/LTO.dir/build.make:270: recipe for target 'lib/libLTO.so.11git' failed
> make[2]: *** [lib/libLTO.so.11git] Error 1
> make[2]: *** Deleting file 'lib/libLTO.so.11git'
> CMakeFiles/Makefile2:23538: recipe for target 'tools/lto/CMakeFiles/LTO.dir/all' failed
> make[1]: *** [tools/lto/CMakeFiles/LTO.dir/all] Error 2
> Makefile:151: recipe for target 'all' failed
> make: *** [all] Error 2
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: collect2: fatal error: ld terminated with signal 9 [Killed] clang

Manuel Klimek via cfe-dev
In reply to this post by Manuel Klimek via cfe-dev
Thankyou,

I changed my linker to lld and it worked.

I have written the steps here if anyone wants

On Thu, Mar 26, 2020 at 1:05 AM Robinson, Paul <[hidden email]> wrote:

The error message is typical of the ran-out-of-memory condition.

It appears you are using ld as your linker? (it is the default on Ubuntu) Our usual next suggestion is to use gold or lld instead, as they consume less memory.  There are instructions on the web for making gold your default linker.

If that is not practical, the other suggestion is to reduce the number of threads (the -j option to make or ninja).  If you are doing a Debug build, likely you would need to use -j1.

Best regards,

--paulr

 

From: cfe-dev <[hidden email]> On Behalf Of suyash singh via cfe-dev
Sent: Wednesday, March 25, 2020 2:07 PM
To: [hidden email]
Subject: [cfe-dev] collect2: fatal error: ld terminated with signal 9 [Killed] clang

 

I was building clang on Ubuntu 18.04

 

and got the error message

collect2: fatal error: ld terminated with signal 9 [Killed] clang

 

I have 8 GB ram

and increased the Linux swap to 40 GB but still same problem.

 

Full error message

collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
tools/lto/CMakeFiles/LTO.dir/build.make:270: recipe for target 'lib/libLTO.so.11git' failed
make[2]: *** [lib/libLTO.so.11git] Error 1
make[2]: *** Deleting file 'lib/libLTO.so.11git'
CMakeFiles/Makefile2:23538: recipe for target 'tools/lto/CMakeFiles/LTO.dir/all' failed
make[1]: *** [tools/lto/CMakeFiles/LTO.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev