M62 build failure with 32-bit Linux cross-compile

476 views
Skip to first unread message

Marshall Greenblatt

unread,
Oct 24, 2017, 6:25:11 PM10/24/17
to chromium-...@chromium.org
Hi All,

I'm trying to create a 32-bit build of Chromium version 62.0.3202.62 using the below 32-bit cross-compile setup on an Ubuntu 14.04 64-bit host machine. The build is failing with:

[30950/31617] ACTION //tools/v8_context_snapshot:generate_v8_context_snapshot(//build/toolchain/linux:clang_x86)
FAILED: v8_context_snapshot.bin 
python ../../tools/v8_context_snapshot/run.py ./v8_context_snapshot_generator --output_file=v8_context_snapshot.bin
ERROR: ld.so: object '/usr/lib/libeatmydata/libeatmydata.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
/var/lib/chromium/src/out/Build/v8_context_snapshot_generator: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory

This same 32-bit configuration succeeds with version 61.0.3163.91 and the 64-bit build of version 62.0.3202.62 is also succeeding. Any idea what might be going on here?

Thanks,
Marshall

Package configuration:

dpkg --add-architecture i386
apt-get install aptitude
aptitude -y update
DEBIAN_FRONTEND=noninteractive aptitude -y install bison build-essential cdbs curl devscripts dpkg-dev elfutils fakeroot flex g++ git-core git-svn gperf libapache2-mod-php5 libasound2-dev libav-tools libbrlapi-dev libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev libdrm-dev libelf-dev libexif-dev libffi-dev libgconf2-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev mesa-common-dev openbox patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto python-dev python-psutil python-numpy python-opencv python-openssl python-yaml rpm ruby subversion ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho fonts-thai-tlwg wdiff wget zip lib32gcc1 lib32stdc++6 libc6-i386 linux-libc-dev:i386

args.gn contents:

dcheck_always_on=true
enable_nacl=false
is_component_build=false
is_debug=false
is_official_build=true
symbol_level=1
target_cpu="x86"
use_allocator="none"
use_sysroot=true

Tom Anderson

unread,
Oct 24, 2017, 7:34:54 PM10/24/17
to Marshall Greenblatt, chromium-packagers
The error says your system can't find libgobject-2.0.so.0.  Do you have libglib2.0-0 installed?  If so, do you have a /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0?  If you do, you could try setting LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu during the build.

--
You received this message because you are subscribed to the Google Groups "chromium-packagers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-packagers+unsub...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-packagers/CAFW9UJ-vVYXR_fuEZmUBY2xwokGohq-392HnJ-YVYKJ9coTv4Q%40mail.gmail.com.

Olivier Tilloy

unread,
Oct 25, 2017, 1:25:20 AM10/25/17
to Marshall Greenblatt, chromium-...@chromium.org
On Wed, Oct 25, 2017 at 12:24 AM, Marshall Greenblatt
<magree...@gmail.com> wrote:
> Hi All,
>
> I'm trying to create a 32-bit build of Chromium version 62.0.3202.62 using
> the below 32-bit cross-compile setup on an Ubuntu 14.04 64-bit host machine.

Please note that chromium 62.0.3202.62 is available in the official
ubuntu repositories for ubuntu 14.04, as of yesterday:
https://launchpad.net/ubuntu/+source/chromium-browser/62.0.3202.62-0ubuntu0.14.04.1204.
> --
> You received this message because you are subscribed to the Google Groups
> "chromium-packagers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to chromium-packag...@chromium.org.

Raphael Kubo da Costa

unread,
Oct 25, 2017, 4:37:07 AM10/25/17
to chromium-...@chromium.org
Marshall Greenblatt <magree...@gmail.com> writes:

> Hi All,
>
> I'm trying to create a 32-bit build of Chromium version 62.0.3202.62 using the below 32-bit cross-compile setup
> on an Ubuntu 14.04 64-bit host machine. The build is failing with:
>
> [30950/31617] ACTION //tools/v8_context_snapshot:generate_v8_context_snapshot(//build/toolchain/linux:clang_x86)
> FAILED: v8_context_snapshot.bin
> python ../../tools/v8_context_snapshot/run.py ./v8_context_snapshot_generator --output_file=
> v8_context_snapshot.bin
> ERROR: ld.so: object '/usr/lib/libeatmydata/libeatmydata.so' from LD_PRELOAD cannot be preloaded (wrong ELF
> class: ELFCLASS64): ignored.
> /var/lib/chromium/src/out/Build/v8_context_snapshot_generator: error while loading shared libraries:
> libgobject-2.0.so.0: cannot open shared object file: No such file or directory
>
> This same 32-bit configuration succeeds with version 61.0.3163.91 and the 64-bit build of version 62.0.3202.62
> is also succeeding. Any idea what might be going on here?

The difference between M61 and M62 here is that
//tools/v8_context_snapshot didn't exist in M61 (see
https://groups.google.com/a/chromium.org/d/msg/blink-dev/d8LMrlnba8o/bCl4daiUBgAJ).

That code is similar to what V8's done for ages with its own snapshot
files, which also means it has the same annoying intricacies: the
v8_context_snapshot_generator executable must have the same "bit-width"
as your target architecture; in this case, it means it must build and
run a 32-bit x86 binary as part of the build process, and it's failing
to run it. The libeatmydata.so warning is related to that, and I suspect
the "no such file or directory" error you're getting for libgobject is
actually an architecture mismatch error, just like when you try to run
an ELF binary with a different ld.so path.

With that said, it's surprising that you're getting this error only now
and the regular V8 snapshot builds (which produce snapshot_blob.bin and
friends) have worked before. Did you apply any workarounds for those
that you might need to apply to the context snapshot generator code as
well?

Tom Anderson

unread,
Oct 25, 2017, 12:58:41 PM10/25/17
to Raphael Kubo da Costa, chromium-packagers
You are correct!
There's a special case for x86_64 -> x86 cross compiling because x86_64 can actually run x86 code.  So you should just need to install the libglib2.0-0:i386 package, which is in our install-build-deps.sh script already: https://cs.chromium.org/chromium/src/build/install-build-deps.sh?l=385
Please run this script if you haven't already.  It's required to install the necessary packages for the build.
 
With that said, it's surprising that you're getting this error only now
and the regular V8 snapshot builds (which produce snapshot_blob.bin and
friends) have worked before. Did you apply any workarounds for those
that you might need to apply to the context snapshot generator code as
well?
--
You received this message because you are subscribed to the Google Groups "chromium-packagers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-packagers+unsub...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-packagers/87o9ovtyha.fsf%40rkubodac-desk.ger.corp.intel.com.

Marshall Greenblatt

unread,
Oct 26, 2017, 10:16:15 AM10/26/17
to Tom Anderson, Raphael Kubo da Costa, chromium-packagers
On Wed, Oct 25, 2017 at 12:58 PM, 'Tom Anderson' via chromium-packagers <chromium-packagers@chromium.org> wrote:
Thanks for the feedback everyone! Adding all of the :i386 packages from install-build-deps.sh resolved the problem. Those deps were added a long time ago so I guess I just got lucky that the build only started failing with M62 :)
 
 
With that said, it's surprising that you're getting this error only now
and the regular V8 snapshot builds (which produce snapshot_blob.bin and
friends) have worked before. Did you apply any workarounds for those
that you might need to apply to the context snapshot generator code as
well?

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

--
You received this message because you are subscribed to the Google Groups "chromium-packagers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-packagers+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-packagers/CAN2uRqqVcdGoqb-ZS3gUm4PMV5eMJ5jmVMCLWE9%3D%3DZAMqEB%2Bmg%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages