# Error when compiling Anki in fedora (arm64) docker image on arm64 host (drone ci)

**URL:** <https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279>\
**Category:** Development\
**Created:** [May 26, 2021, 5:41pm UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279 "2021-05-26T17:41:24Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [May 26, 2021, 5:41pm UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/1 "2021-05-26T17:41:24Z")

</div>

I am getting the following error :

```auto
1745	2021/05/26 17:18:07 Downloading https://releases.bazel.build/4.0.0/release/bazel-4.0.0-linux-arm64...
166s
1746	Extracting Bazel installation...
168s
1747	Starting local Bazel server and connecting to it...
177s
1748	Loading: (1 packages loaded)
185s
1749	Loading: 1 packages loaded
185s
1750	Analyzing: target //:dist (2 packages loaded, 0 targets configured)
185s
1751	Analyzing: target //:dist (39 packages loaded, 79 targets configured)
186s
1752	Analyzing: target //:dist (73 packages loaded, 602 targets configured)
187s
1753	Analyzing: target //:dist (85 packages loaded, 1007 targets configured)
189s
1754	Analyzing: target //:dist (93 packages loaded, 1330 targets configured)
190s
1755	Analyzing: target //:dist (94 packages loaded, 1435 targets configured)
192s
1756	Analyzing: target //:dist (94 packages loaded, 1435 targets configured)
194s
1757	Analyzing: target //:dist (94 packages loaded, 1435 targets configured)
196s
1758	Analyzing: target //:dist (94 packages loaded, 1435 targets configured)
198s
1759	Analyzing: target //:dist (94 packages loaded, 1435 targets configured)
203s
1760	Analyzing: target //:dist (94 packages loaded, 1435 targets configured)
208s
1761	Analyzing: target //:dist (94 packages loaded, 1435 targets configured)
214s
1762	Analyzing: target //:dist (94 packages loaded, 1435 targets configured)
219s
1763	INFO: Repository protoc_bin_linux_arm64 instantiated at:
223s
1764 /drone/src/anki/WORKSPACE:14:11: in <toplevel>
223s
1765 /drone/src/anki/defs.bzl:30:26: in setup_deps
223s
1766 /drone/src/anki/protobuf.bzl:51:10: in setup_protobuf_binary
223s
1767 /root/.cache/bazel/_bazel_root/427733825c6d4fe4ec1bea5e464b135b/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
223s
1768	Repository rule http_archive defined at:
223s
1769 /root/.cache/bazel/_bazel_root/427733825c6d4fe4ec1bea5e464b135b/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
223s
1770	ERROR: While resolving toolchains for target //ts/reviewer:reviewer_extras: no matching toolchains found for types @esbuild_toolchain//:toolchain_type
225s
1771	ERROR: Analysis of target '//:dist' failed; build aborted: no matching toolchains found for types @esbuild_toolchain//:toolchain_type
225s
1772	INFO: Elapsed time: 56.559s
225s
1773	INFO: 0 processes.
225s
1774	FAILED: Build did NOT complete successfully (126 packages loaded, 1485 targets configured)
225s
1775	FAILED: Build did NOT complete successfully (126 packages loaded, 1485 targets configured)
225s

```

The build takes place in drone ci using fedora 34 docker image.

Github repository : [qubist-pixel-ux/anki-arm64-builder (github.com)](https://github.com/qubist-pixel-ux/anki-arm64-builder)  
Build log : [Build #8.1.2 - qubist-pixel-ux/anki-arm64-builder - Drone CI](https://cloud.drone.io/qubist-pixel-ux/anki-arm64-builder/8/1/2)

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [May 27, 2021, 3:35am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/2 "2021-05-27T03:35:58Z")

</div>

[esbuild\_toolchain/esbuild\_repo.bzl at toolchain · ankitects/esbuild\_toolchain · GitHub](https://github.com/ankitects/esbuild_toolchain/blob/toolchain/esbuild_repo.bzl) will need to be updated with a link to the arm64 binary. To avoid it getting lost when I update esbuild again in the future, if you’d like to submit a PR, please include a small python or shell script that automatically sets the shas from a provided version number.

There may be other arm64 issues that need resolving as well - it’s not tested as part of Anki’s CI.

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [May 27, 2021, 12:59pm UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/3 "2021-05-27T12:59:05Z")

</div>

I opened a pull request. Are the changes sufficient to add arm64 toolchain ?

[Add arm64 binary and script to update sha256sum by qubist-pixel-ux · Pull Request #1 · ankitects/esbuild\_toolchain (github.com)](https://github.com/ankitects/esbuild_toolchain/pull/1)

Thanks for support.

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [May 29, 2021, 5:14am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/4 "2021-05-29T05:14:09Z")

</div>

The pr did not fix it.

Build log : [Build #31.1.2 - qubist-pixel-ux/anki-arm64-builder - Drone CI](https://cloud.drone.io/qubist-pixel-ux/anki-arm64-builder/31/1/2)

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [May 31, 2021, 7:06am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/5 "2021-05-31T07:06:52Z")

</div>

what does this show?

bazel build --toolchain\_resolution\_debug=true …

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [May 31, 2021, 8:50am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/6 "2021-05-31T08:50:19Z")

</div>

`1869	INFO: ToolchainResolution: Type @esbuild_toolchain//:toolchain_type: execution platform @local_config_platform//:host: Rejected toolchain @esbuild_toolchain//:esbuild_linux_arm64; mismatching values: arm64`

[Build #32.1.2 - qubist-pixel-ux/anki-arm64-builder - Drone CI](https://cloud.drone.io/qubist-pixel-ux/anki-arm64-builder/32/1/2)

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [May 31, 2021, 8:57am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/7 "2021-05-31T08:57:39Z")

</div>

Nodej uses aarch64

> <https://github.com/bazelbuild/rules_nodejs/blob/807b07ba19ae438b7b8abdbd63e7773b66694c8c/toolchains/node/BUILD.bazel#L48>

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [May 31, 2021, 9:06am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/8 "2021-05-31T09:06:13Z")

</div>

Created PR : [Pull requests · ankitects/esbuild\_toolchain (github.com)](https://github.com/ankitects/esbuild_toolchain/pulls)

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [May 31, 2021, 6:06pm UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/9 "2021-05-31T18:06:10Z")

</div>

[Build #33.1.2 - qubist-pixel-ux/anki-arm64-builder - Drone CI](https://cloud.drone.io/qubist-pixel-ux/anki-arm64-builder/33/1/2)

The esbuild url for arm64 binary was incorrect. I created another pr.

[Fix esbuild url for arm64 by qubist-pixel-ux · Pull Request #3 · ankitects/esbuild\_toolchain (github.com)](https://github.com/ankitects/esbuild_toolchain/pull/3)

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [June 1, 2021, 5:08am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/10 "2021-06-01T05:08:30Z")

</div>

New logs :

- Running `./scripts/build` :  
[Build #36.1.2 - qubist-pixel-ux/anki-arm64-builder - Drone CI](https://cloud.drone.io/qubist-pixel-ux/anki-arm64-builder/36/1/2)  
[Build #35.1.2 - qubist-pixel-ux/anki-arm64-builder - Drone CI](https://cloud.drone.io/qubist-pixel-ux/anki-arm64-builder/35/1/2)  
Both the errors are different.

- Running `bazel build --toolchain_resolution_debug=true --config opt dist`  
[Build #34.1.2 - qubist-pixel-ux/anki-arm64-builder - Drone CI](https://cloud.drone.io/qubist-pixel-ux/anki-arm64-builder/34/1/2)  
Build completed sucessfully

Thankfully the esbuild toolchain has been resolved 🙂

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 1, 2021, 6:39am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/11 "2021-06-01T06:39:27Z")

</div>

You could try building with -k, and running the build a couple of times to rule out race conditions. No solution jumps out at me though I’m afraid.

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [June 1, 2021, 10:46am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/12 "2021-06-01T10:46:25Z")

</div>

It works with -k but some builds still fail due to different errors related to compiling rust libraries.

[qubist-pixel-ux/anki-arm64-builder - Drone CI](https://cloud.drone.io/qubist-pixel-ux/anki-arm64-builder)

See builds 43-55. Many builds succeed though.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 2, 2021, 8:40am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/13 "2021-06-02T08:40:01Z")

</div>

Unfortunately the Bazel JS rules are flaky. You might want to invoke bazel build a few times in a loop; it should pick up where it left off.

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [June 2, 2021, 10:21am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/14 "2021-06-02T10:21:59Z")

</div>

hmm ok 🙂

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [June 2, 2021, 11:04am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/15 "2021-06-02T11:04:57Z")

</div>

I built Anki against qt and pyqt installed by system package. If I install the built python wheels on different system will it require qt and pyqt installed ? How are the standalone tar.gz anki releases on GitHub built ?

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 3, 2021, 1:02am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/16 "2021-06-03T01:02:26Z")

</div>

The wheels will use whichever PyQt is installed in the Python environment, which is probably what you want if you are building a distro package. The packaged builds are built with pyinstaller, but I have no idea if that works on arm64 or not.

---

<div class="post-metadata">

**Author:** ![qubist-pixel](https://avatars.discourse-cdn.com/v4/letter/q/58956e/32.png) [@qubist-pixel](https://forums.ankiweb.net/u/qubist-pixel)\
**Post date:** [June 3, 2021, 4:06pm UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/17 "2021-06-03T16:06:11Z")

</div>

Ok thanks. Right now I’ll leave it at compiling anki for aarch64. Maybe I’ll look into creating flatpak. Thank you very much.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 3:18am UTC](https://forums.ankiweb.net/t/error-when-compiling-anki-in-fedora-arm64-docker-image-on-arm64-host-drone-ci/10279/18 "2023-05-01T03:18:21Z")

</div>


