Meets issue while cross compile arm64

69 views
Skip to first unread message

Eric Guo

unread,
Nov 20, 2024, 5:24:50 AM11/20/24
to angleproject
Hi,
I'm trying to build angle for arm64 linux system
is_component_build = true
target_os="linux"
target_cpu = "arm64"
is_debug = false
angle_assert_always_on = false
is_clang = false
sysroot = "xxx"
custom_toolchain="//build/toolchain/linux/unbundle:default"
host_toolchain="//build/toolchain/linux/unbundle:default"

Set up my cross-compiler through environment variable CC CXX CFLAGS and so on. This config help me complete compile  3000+ files until I meet below error.
I know this issue occured because my x86 server trying to execute an aarch64 executable. Could anyone told me how should I modify gn args to fix this issue? Thanks.

[3616/6341] ACTION //third_party/catapult/tracing/tracing/proto:histogram_proto_gen(//build/toolchain/linux/unbundle:default)
FAILED: gen/tracing/tracing/proto/histogram.pb.h gen/tracing/tracing/proto/histogram.pb.cc pyproto/tracing/tracing/proto/histogram_pb2.py
python3 ../../tools/protoc_wrapper/protoc_wrapper.py histogram.proto --protoc ./protoc --proto-in-dir ../../third_party/catapult/tracing/tracing/proto --cc-out-dir gen/tracing/tracing/proto --py-out-dir pyproto/tracing/tracing/proto
Traceback (most recent call last):
  File "/opt/angle/out/Debug/../../tools/protoc_wrapper/protoc_wrapper.py", line 216, in <module>
    main(sys.argv[1:])
  File "/opt/angle/out/Debug/../../tools/protoc_wrapper/protoc_wrapper.py", line 194, in main
    ret = subprocess.call(protoc_cmd)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/fsl-imx-internal-xwayland/6.12-styhead/sysroots/x86_64-pokysdk-linux/usr/lib/python3.12/subprocess.py", line 389, in call
    with Popen(*popenargs, **kwargs) as p:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/fsl-imx-internal-xwayland/6.12-styhead/sysroots/x86_64-pokysdk-linux/usr/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/fsl-imx-internal-xwayland/6.12-styhead/sysroots/x86_64-pokysdk-linux/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/opt/angle/out/Debug/protoc'

Yuly Novikov

unread,
Nov 20, 2024, 5:43:12 AM11/20/24
to guof...@gmail.com, angleproject
linux arm64 builds aren't officially supported.
non-clang builds aren't officially supported either.

One thing you could try is to add
target_cpu = ['arm64']
in your .gclient file and then run 'gclient sync'.
Not sure how much it would help, though.

The failure you see is in 'third_party/catapult', which is used only in tests, so the failure can be avoided by not building it.
If all you want to build is libEGL.so, libGLESv2.so, then you should run `autoninja -C out/Debug angle'.
Or "out/Release", since you set "is_debug = false"?

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/angleproject/a645fd40-568d-4a50-8133-7b4a797a872an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages