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?