Project

General

Profile

Bug #2101

problem on cross compiling (some) large packages

freemor - over 5 years ago - . Updated over 5 years ago.

Status:
open
Priority:
bug
Category:
-
Assignee:
-
% Done:

0%


Description

recently on large cross compiles I've been running into:

/usr/bin/ld.gold: fatal error: lib/libwebkit2gtk-4.0.so.37.33.5: mmap: failed to allocate 1781955648 bytes for output file: Cannot allocate memory

At first I suspected it was some limit of my x200 But with 4GB ram and 7GB swap I couldn't see how.
Tried the same cross compile on Beefcake and it failed with the same error so clearly not a ram/swap issue

I searched online and this issue seems to come down to cross compiling with debug options turned on. Many people across many distros with the same error/issue (llvm seems to be implicated but I'll need to dig further to be sure).

I tried turning off 'debug' in makepkg.conf's global package options and the package built fine on my x200.

Not sure the best way to handle this. Clearly entering the librechroot and manually toggling the option seems a bit clunky.
Is there some option in PKGBUILDs to toggle this?
Anyone have an idea of what a real fix (as opposed to the disable debug workaround) would be.

History

#1

Updated by GNUtoo over 5 years ago

You could try with ld.bfd or to disable LTO if it's used in that part of the build that fails.
You could also try valgrind on beefcake.

Also available in: Atom PDF