Using SDK via qemu emulation

There are cases where SB2 environment maybe too restrictive or unaware in some details. Right now, I am trying to compile qt webengine for aarch64 and it fails to run ./mksnapshot in SDK. Which is no wonder, as it is rather complicated code: src/snapshot/mksnapshot.cc - v8/v8 - Git at Google . Code is compiled during a build process and then executed in it as a part of the build process.

In this particular case, it fails with

/usr/bin/python2 ../../3rdparty/chromium/v8/tools/run.py ./mksnapshot --turbo_instruction_scheduling --target_os=linux --target_arch=arm64 --embedded_src gen/v8/embedded.S --embedded_variant Default --random-seed 314159265 --startup_src gen/v8/snapshot.cc --no-native-code-counters


#
# Fatal error in , line 0
# Fatal process out of memory: Failed to reserve memory for new V8 Isolate
#
#
#
#FailureMessage Object: 0x423b9d88
==== C stack trace ===============================

    ./mksnapshot(+0xac2d28) [0x40ac2d28] 
qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
Return code is -5

Other notable case is trying to run Python multiprocessing Pool in SB2 - that fails as well on creation of multiprocessing.Pool.

Hence the question: is there any way I could try to make a build environment without SB2? Or run some commands out of it and use some generic (and very slow) QEMU ARM64 environment?

1 Like

Just tested on device, and this program ( mksnapshot) runs perfectly on device. Will have to look into it further and see where SB2 fails

Managed to isolate the case and submitted a bug report: SB2 fails to mmap 8GB in Aarch64

2 Likes