Describe the bug
I have a compilation error on my aarch64 machine.
To Reproduce
Try to build it, you will have the following error:
error: failed to run custom build command for `skia-bindings v0.39.1`
Caused by:
process didn't exit successfully: `/home/shatur/.cache/paru/clone/neovide-git/src/neovide-git/target/release/build/skia-bindings-caba516915705bd9/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=SKIA_DEBUG
HOST: aarch64-unknown-linux-gnu
cargo:rerun-if-env-changed=OPT_LEVEL
cargo:rerun-if-env-changed=CC
cargo:rerun-if-env-changed=CXX
cargo:rerun-if-env-changed=SKIA_SOURCE_DIR
cargo:rerun-if-env-changed=FORCE_SKIA_BUILD
cargo:rerun-if-env-changed=FORCE_SKIA_BINARIES_DOWNLOAD
TRYING TO DOWNLOAD AND INSTALL SKIA BINARIES: 0.39.1/750688025ba50471efe8-aarch64-unknown-linux-gnu-gl
cargo:rerun-if-env-changed=SKIA_BINARIES_URL
FROM: https://github.com/rust-skia/skia-binaries/releases/download/0.39.1/skia-binaries-750688025ba50471efe8-aarch64-unknown-linux-gnu-gl.tar.gz
DOWNLOAD AND INSTALL FAILED: https://github.com/rust-skia/skia-binaries/releases/download/0.39.1/skia-binaries-750688025ba50471efe8-aarch64-unknown-linux-gnu-gl.tar.gz: status code 404
STARTING A FULL BUILD
cargo:rerun-if-env-changed=SKIA_USE_SYSTEM_LIBRARIES
cargo:rerun-if-env-changed=SDKROOT
cargo:rerun-if-env-changed=SKIA_NINJA_COMMAND
cargo:rerun-if-env-changed=SKIA_GN_COMMAND
Probing 'python'
Probing 'python2'
Python 2 found: "python2"
Synchronizing Skia dependencies
DOWNLOADING: https://codeload.github.com/rust-skia/skia/tar.gz/m90-0.38.3
DOWNLOADING: https://codeload.github.com/rust-skia/depot_tools/tar.gz/a110bf6
Skipping "../src".
skia/third_party/externals/libgif... > fd59fa92a0c86788dcdd84d091e1ce81eda06a77
skia/third_party/externals/piex > bb217acdca1cc0c16b704669dd6f91a1b509c406
skia/third_party/externals/d3d12a... > 169895d529dfce00390a20e69c2f516066fe7a3b
skia/third_party/externals/zlib > c876c8f87101c5a75f6014b0f832499afeb65b73
skia/third_party/externals/libjpe... > 64fc43d52351ed52143208ce6a656c03db56462b
skia/third_party/externals/libwebp > fedac6cc69cda3e9e04b780d324cf03921fb3ff4
skia/third_party/externals/expat > e976867fb57a0cd87e3b0fe05d59e0ed63c6febb
skia/third_party/externals/spirv-... > bdbef7b1f3982fe99a62d076043036abe6dd6d80
skia/third_party/externals/harfbuzz > 3a74ee528255cc027d84b204a87b5c25e47bff79
skia/third_party/externals/freetype > dfa7cca5f3b4f494aae785891ab4a42e66db77ef
skia/third_party/externals/libpng > 386707c6d19b974ca2e3db7f5c61873813c6fe44
skia/third_party/externals/icu > dbd3825b31041d782c5b504c59dcfb5ac7dda08c
--- stderr
Traceback (most recent call last):
File "skia/bin/fetch-gn", line 26, in <module>
cpu = {'amd64': 'amd64', 'arm64': 'arm64', 'x86_64': 'amd64'}[platform.machine().lower()]
KeyError: 'aarch64'
Traceback (most recent call last):
File "skia/tools/git-sync-deps", line 266, in <module>
exit(main(sys.argv[1:]))
File "skia/tools/git-sync-deps", line 261, in main
os.path.join(os.path.dirname(deps_file_path), 'bin', 'fetch-gn')])
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python2', 'skia/bin/fetch-gn']' returned non-zero exit status 1
thread 'main' panicked at '`skia/tools/git-sync-deps` failed', /home/shatur/.cache/paru/clone/neovide-git/src/neovide-git/CARGO/registry/src/github.com-1ecc6299db9ec823/skia-bindings-0.39.1/build_support/skia.rs:630:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Desktop (please complete the following information):
do you have python2 installed?
Yes:
python2 --version
Python 2.7.18
I think it fails to detect CPU in cpu = {'amd64': 'amd64', 'arm64': 'arm64', 'x86_64': 'amd64'}[platform.machine().lower()]. Should be aarch64 instead of the arm64.
I believe arm64 is there for apple silicon machines. I think adding aarch64 to that list is fine though
Sounds like an upstream issue in skia-safe then?
Sounds like an upstream issue in skia-safe then?
Should I report it in https://github.com/rust-skia/rust-skia?
I think so? Worst that can happen is that they will punt it back over the line :P
Weird, this works fine with the M1 mac, what's your cargo toolchain? Scratch that, it's strictly in skia.
Weird, this works fine with the M1 mac, what's your cargo toolchain?
It's not a Mac. I am building on my PinePhone. As @shaunsingh pointed out, Mac can just have amd64 while my phone use aarch64.
building neovide on a phone. Thats wild
I do wish you luck, but this is decidedly not a supported platform as I'm pretty sure none of the contributors have any way to test it or help you out. You'd be pretty on your own
@Shatur for now you could try setting FORCE_SKIA_BUILD to true so that you build the skia libraries locally.
I think the build already fell back to an attempted local build and failed :(
Does it fallback by default?

I think so? idk really
I do wish you luck, but this is decidedly not a supported platform as I'm pretty sure none of the contributors have any way to test it or help you out. You'd be pretty on your own
It's not a super-weird hardware :D This is exactly the same architecture as in the Raspberry Pi / all modern Android phones, and is even officially supported by all ARM-enabled distros. So I have a good chance :)
By the way, I was surprised that Apple Sillicon defines itself differently (as arm64).
Reported to the rust-skia. Thanks for the response!
@Kethku, was fixed in upstream. Could you bump the version?
Yes I'll do this soon
I tested it on a local branch. Builds fine on a spare aarch64 chromebook I have lying around.
Most helpful comment
I tested it on a local branch. Builds fine on a spare aarch64 chromebook I have lying around.