Bug 1171414 - Build fails on server (but not locally) when LTO is enabled
Build fails on server (but not locally) when LTO is enabled
Status: RESOLVED WORKSFORME
Classification: openSUSE
Product: openSUSE.org
Classification: openSUSE
Component: BuildService
unspecified
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
Adrian Schröter
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-10 20:23 UTC by Tristan Miller
Modified: 2020-06-02 13:03 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Miller 2020-05-10 20:23:49 UTC
SeaMonkey is a C++ application which uses link time optimization (LTO) in the build, provided the compiler supports it.  LTO was therefore enabled by default for the build of our package at <https://build.opensuse.org/package/show/mozilla/seamonkey> for openSUSE Tumbleweed, which uses GCC 9.

Strangely, the Tumbleweed package builds fine when using osc on my local machine, but it fails on the OBS servers.  The failure happens during linking; the following error message is emitted:

lto1: fatal error: streaming subprocess was killed by signal

Disabling LTO in the project's .spec file, by adding the following line, allows the project to build properly on the server:

%define _lto_cflags %{nil}

The fact that the package builds fine with LTO on my local machine but not on the OBS server leads me to suspect that there is something wrong with the OBS server, hence this bug report.
Comment 1 Bernhard Wiedemann 2020-05-25 18:28:52 UTC
LTO linking uses a lot of memory, so maybe it is the OOM-killer
that hits in OBS, but not on your local machine where you have enough RAM?

If that is the reason, changing the _constraints should help.

Alternatively, you can do the local build with
--vm-type=kvm 
and vary the build-memory setting in ~/.oscrc
Comment 2 Tristan Miller 2020-06-02 13:03:23 UTC
(In reply to Bernhard Wiedemann from comment #1)
> LTO linking uses a lot of memory, so maybe it is the OOM-killer
> that hits in OBS, but not on your local machine where you have enough RAM?
> 
> If that is the reason, changing the _constraints should help.

OK, I've verified that adding more memory in _constraints allows the project to build for x86_64.  Wolfgang and I had tried this before without success, but it seems to be working now at any rate.