On 2017/10/19 14:35, Sebastien Marie wrote:
> On Thu, Oct 19, 2017 at 01:05:12PM +0100, Stuart Henderson wrote:
> > On 2017/10/19 13:49, Sebastien Marie wrote:
> > 
> > Building with 2 dpb cores on a 2-cpu-core machine so there wouldn't have
> > been many other processes running - but if a build is very tight on memory,
> > it fails randomly (presumably due to PIE?) - I've seen that often with
> > chromium before I started using -Wl,--no-keep-memory.
> > 
> 
> For passing -Wl,--no-keep-memory to the linker, something like that is
> possible:
> 
> diff --git a/lang/rust/Makefile b/lang/rust/Makefile
> index a1709be..9349b9f 100644
> --- a/lang/rust/Makefile
> +++ b/lang/rust/Makefile
> @@ -89,7 +89,7 @@ LIBESTDC_VERSION =    17.1
> 
>  # note: RUSTFLAGS extra flags passed to rust
>  #              -L modgcc-libs : disambiguate libestdc++.so
> -MAKE_ENV =             RUSTFLAGS="-L ${WRKDIR}/modgcc-libs" \
> +MAKE_ENV =             RUSTFLAGS="-L ${WRKDIR}/modgcc-libs -C 
> link-arg=-Wl,--no-keep-memory" \
>                         LIBGIT2_SYS_USE_PKG_CONFIG=1
> 
>  # build/configuration variables
> 
> So if the problem comes back, please tell me and I will provide a proper
> patch for i386.

I hit the problem again, so I'm going to try --no-keep-memory now.

$ ls -lh ./build-i386/rustc.bin.core
-rw-------  1 _pbuild  _pbuild   1.3G Oct 22 03:57 ./build-i386/rustc.bin.core

The core doesn't seem useful, gdb says "warning: Couldn't find
general-purpose registers in core file."

Reply via email to