Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linux/arm/v7 & linux/arm64 to architectures #97

Open
abemedia opened this issue Mar 28, 2021 · 3 comments
Open

Add linux/arm/v7 & linux/arm64 to architectures #97

abemedia opened this issue Mar 28, 2021 · 3 comments

Comments

@abemedia
Copy link

abemedia commented Mar 28, 2021

ARM is a growing trend in server architecture and both can be built using standard github actions.

I opened a PR for arm64, but I'm having issues with armhf: see logs (PR: abemedia#1)

I'm a bit confused as clang is set to false but the commands that fail are running clang...

@cleiner
Copy link
Contributor

cleiner commented Apr 5, 2021

Having spent some time with the V8 build lately, I learned that it first builds some tools to generate code which is needed for the actual V8 build. These tools must run on the build host, so multiple compiler toolchains are required for a cross-compile.

From v8/gni/snapshot_toolchain.gni (line 70+) it looks like the build defaults to clang for this, unless v8_snapshot_toolchain is explicitly set in GN args. But it seems there's no predefined gcc toolchain (e.g. something like //build/toolchain/linux:gcc_x86_v8_arm) that could be used here (see v8/build/toolchain/linux/BUILD.gn).

However, I was able to successfully build with clang (+gcc) by setting use_sysroot=true and adding the following to the
end of v8_deps() in build.py (importlib must be imported as well):

    install_sysroot = importlib.import_module("v8.build.linux.sysroot_scripts.install-sysroot")
    install_sysroot.main(["install-sysroot", "--arch", "arm"])

Although I'm also a bit confused why the clang_x64_v8_arm64 configuration works without these extra steps.

@matthewmueller
Copy link

matthewmueller commented May 30, 2022

Should this have been fixed by: #223?

We're seeing a couple errors:

# rogchap.com/v8go                          

ld.lld: error: ../../go/pkg/mod/rogchap.com/v8go@v0.7.0/deps/linux_x86_64/libv8.a(api.o) is incompatible with aarch64linux          

ld.lld: error: ../../go/pkg/mod/rogchap.com/v8go@v0.7.0/deps/linux_x86_64/libv8.a(v8threads.o) is incompatible with aarch64linux
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)

@mateuszmlc
Copy link

Should this have been fixed by: #223?

We're seeing a couple errors:

# rogchap.com/v8go                          

ld.lld: error: ../../go/pkg/mod/rogchap.com/v8go@v0.7.0/deps/linux_x86_64/libv8.a(api.o) is incompatible with aarch64linux          

ld.lld: error: ../../go/pkg/mod/rogchap.com/v8go@v0.7.0/deps/linux_x86_64/libv8.a(v8threads.o) is incompatible with aarch64linux
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)

v0.7.0 was released before the PR was merged, try the latest commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants