Building error when cros_sdk -- ./build_packages --board=samus

2,103 views
Skip to first unread message

Paco GB

unread,
Mar 14, 2017, 7:50:23 AM3/14/17
to Chromium OS dev
Hi,

Im trying to build a chromium os image. The release I'm using is 
cros_sdk -- ./build_packages --board=samus

Im getting the following error: 

>>> Compiling source in /build/samus/tmp/portage/chromeos-base/chromeos-chrome-57.0.2987.105_rc-r1/work/chromeos-chrome-57.0.2987.105_rc ...
ninja: Entering directory `c/Release'
[1/1] LINK ./chrome
FAILED: chrome
x86_64-cros-linux-gnu-g++ -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51-gold -pie -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--no-as-needed -lpthread -Wl,--as-needed -fuse-ld=gold -B../../../../../chromeos-cache/distfiles/target/chrome-src/src/third_party/binutils/Linux_x64/Release/bin -Wl,--icf=all -m64 -pthread -Werror -Wl,-O1 -Wl,--gc-sections --sysroot=../../../../../../../build/samus -L/build/samus/lib64 -Wl,-rpath-link=/build/samus/lib64 -L/build/samus/usr/lib64 -Wl,-rpath-link=/build/samus/usr/lib64 -L/build/samus/usr/local/lib64 -Wl,-rpath-link=/build/samus/usr/local/lib64 -L/build/samus/lib -Wl,-rpath-link=/build/samus/lib -L/build/samus/usr/lib -Wl,-rpath-link=/build/samus/usr/lib -L/build/samus/usr/local/lib -Wl,-rpath-link=/build/samus/usr/local/lib -L/build/samus/usr/x86_64-cros-linux-gnu/lib -Wl,-rpath-link=/build/samus/usr/x86_64-cros-linux-gnu/lib -Wl,-rpath-link=. -Wl,--disable-new-dtags -L/build/samus/usr/lib -Wl,-O1 -Wl,-O2 -Wl,--as-needed -o "./chrome" -Wl,--start-group @"./chrome.rsp"  -Wl,--end-group  -ldl -lrt -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -ldbus-1 -lcups -lz -lpthread -lm -lcrypt -lexpat -lfontconfig -lresolv -lharfbuzz -lfreetype -lxkbcommon -lgestures -levdev -ldrm -lgbm -lasound -lcras -lEGL -lGLESv2 -lffi
collect2: error: ld terminated with signal 9 [Killed]
ninja: build stopped: subcommand failed.
 * ERROR: chromeos-base/chromeos-chrome-57.0.2987.105_rc-r1::chromiumos failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 3703:  Called chrome_make 'chrome_sandbox' 'libosmesa.so' 'chrome' 'jpeg_decode_accelerator_unittest' 'media_unittests' 'sandbox_linux_unittests' 'video_decode_accelerator_unittest' 'video_encode_accelerator_unittest' 'ppapi/examples/video_decode' 'bitmaptools' 'clear_system_cache' 'minidump_stackwalk' 'chromedriver' 'nacl_helper_bootstrap' 'nacl_helper'
 *   environment, line 1012:  Called die
 * The specific snippet of code:
 *       PATH=${PATH}:/home/$(whoami)/depot_tools ${ENINJA} ${MAKEOPTS} -C "${BUILD_OUT_SYM}/${BUILDTYPE}" $(usex verbose -v "") "$@" || die
 *


I thought it may be a path problem, but i have looked into the chroot and everything seems ok, any ideas?

Daniel Erat

unread,
Mar 14, 2017, 10:59:53 AM3/14/17
to Paco GB, Chromium OS dev
I did a search for your error; the top results all say that ld terminating with signal 9 indicates that the system didn't have enough memory to link the binary.

http://dev.chromium.org/chromium-os/developer-guide#TOC-Prerequisites says that at least 4 GB of RAM is needed to link Chromium, but I don't know if that's still accurate or the requirements have increased.

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en


Caroline Tice

unread,
Mar 14, 2017, 2:40:21 PM3/14/17
to Paco GB, Chromium OS dev, Daniel Erat
It would help if you could get more information about the actual error.  I would recommend:

1). cd to the 'c/Release' directory inside your chroot:

$ cd /var/cache/distfiles/target/chrome-src/c/Release

2). Try to repeat the link command above, but add the '-Wl,-v' option, which will give you more information about the exact link command used.   Hopefully it will also give you a more detailed error message, which would help us figure out what's going wrong:

$ x86_64-cros-linux-gnu-g++ -B/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51-gold -pie -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--no-as-needed -lpthread -Wl,--as-needed -fuse-ld=gold -B../../../../../chromeos-cache/distfiles/target/chrome-src/src/third_party/binutils/Linux_x64/Release/bin -Wl,--icf=all -m64 -pthread -Werror -Wl,-O1 -Wl,--gc-sections --sysroot=../../../../../../../build/samus -L/build/samus/lib64 -Wl,-rpath-link=/build/samus/lib64 -L/build/samus/usr/lib64 -Wl,-rpath-link=/build/samus/usr/lib64 -L/build/samus/usr/local/lib64 -Wl,-rpath-link=/build/samus/usr/local/lib64 -L/build/samus/lib -Wl,-rpath-link=/build/samus/lib -L/build/samus/usr/lib -Wl,-rpath-link=/build/samus/usr/lib -L/build/samus/usr/local/lib -Wl,-rpath-link=/build/samus/usr/local/lib -L/build/samus/usr/x86_64-cros-linux-gnu/lib -Wl,-rpath-link=/build/samus/usr/x86_64-cros-linux-gnu/lib -Wl,-rpath-link=. -Wl,--disable-new-dtags -L/build/samus/usr/lib -Wl,-O1 -Wl,-O2 -Wl,--as-needed -o "./chrome" -Wl,--start-group @"./chrome.rsp"  -Wl,--end-group  -ldl -lrt -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -ldbus-1 -lcups -lz -lpthread -lm -lcrypt -lexpat -lfontconfig -lresolv -lharfbuzz -lfreetype -lxkbcommon -lgestures -levdev -ldrm -lgbm -lasound -lcras -lEGL -lGLESv2 -lffi -Wl,-v

---
You received this message because you are subscribed to the Google Groups "Chromium OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.

Giri

unread,
Mar 15, 2017, 10:04:18 AM3/15/17
to Chromium OS dev, fbl...@gmail.com, de...@chromium.org, cmt...@chromium.org
Hi,

It' s definitely a memory related error as I have hit to this issue recently. To build the browser, I think a minimum of 16GB is required. After the memory was increased to 16GB from 8GB, the linker worked perfectly fine.

Regards,
Giri
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Daniel Erat

unread,
Mar 15, 2017, 8:10:08 PM3/15/17
to Giri, Chromium OS dev, Paco GB, Caroline Tice
Thanks for the additional info. It sounds like the 4 GB requirement is outdated.

Caroline, do you (or does someone else from the toolchain team) know how much RAM is currently needed to link Chrome in the chroot so we can update the docs? It sounds like it may be somewhere between 8 GB and 16 GB now. Is the current usage tracked anywhere?

Nathan

unread,
Mar 16, 2017, 2:29:09 PM3/16/17
to Chromium OS dev, gi...@flintos.io, fbl...@gmail.com, cmt...@chromium.org
I was doing a build anyway, so I figured I might as well check out what the linker used on my box (32G RAM) via the extremely scientific method of running htop and looking at the stats for the ld process. I noticed it max out at a VM size of 44GB and a resident size of 17GB (!!).

It's possible it could have gotten by with less if less was available, or maybe Giri's machine was just swapping and that's how the bulid proceeded with 16GB of RAM. Or maybe my less-than-rigorous methodology is letting me down. Anyway, hope that's a useful data point.

Caroline Tice

unread,
Mar 16, 2017, 5:29:50 PM3/16/17
to Nathan, Chromium OS dev, gi...@flintos.io, Paco GB, Daniel Erat
According to our data,  the linker needs ~41GB with gcc and ~28GB with clang.

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dev+unsubscribe@chromium.org.

Daniel Erat

unread,
Mar 16, 2017, 6:10:09 PM3/16/17
to Caroline Tice, Nathan, Chromium OS dev, Giri, Paco GB
Thanks! I've updated the RAM requirements in the developer guide to be more vague but hopefully also less incorrect.

Francisco Gonzalez-Blanch

unread,
Mar 17, 2017, 1:10:03 PM3/17/17
to Daniel Erat, Caroline Tice, Nathan, Chromium OS dev, Giri

Thanks for the answers. I did update the cloud machine with a bigger instance with 60gb of ram and it ran without problems. Also it took me around 150gb of  hd space (for the whole process) and around 4 and a half hours using 8 cores instance


To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.


Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages