Skip to content

[Bug]: Linux / ARM64 broken #289

@kolloch

Description

@kolloch

What happened?

I tried to build on Linux ARM64 on a virtual machine on mac.

I got this error:

ERROR: /home/peterkolloch/.cache/bazel/_bazel_peterkolloch/824dcaf761632cbc9a32ed7cf6ce3b6a/external/aspect_rules_swc+/swc/repositories.bzl:114:43: An error occurred during the fetch of repository 'aspect_rules_swc++swc+swc_linux-arm64-gnu':
   Traceback (most recent call last):
	File "/home/peterkolloch/.cache/bazel/_bazel_peterkolloch/824dcaf761632cbc9a32ed7cf6ce3b6a/external/aspect_rules_swc+/swc/repositories.bzl", line 114, column 43, in _swc_repo_impl
		integrity = TOOL_VERSIONS[version][repository_ctx.attr.platform]
Error: key "linux-arm64-gnu" not found in dictionary

Version

Development (host) and target OS/architectures:

Linux ubuntu 6.11.9-orbstack-00279-g4cf512143f2e #60 SMP Mon Nov 18 05:48:29 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Output of bazel --version:

bazel 8.0.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

bazel_dep(name = "aspect_rules_swc", version = "2.1.0")

Language(s) and/or frameworks involved:

How to reproduce

Easiest for you is to run

bazel build //examples/simple:test

on rules_swc on Linux ARM64.

I tried on this commit

commit 72d22ebb06da1f40ba69e96ead27c4661fd3b1f0 (HEAD -> main, origin/main, origin/HEAD)
Author: davidaghassi <[email protected]>
Date:   Sat Nov 16 08:26:34 2024 -0700

    feat: add default_ext
    
    Close #252

and got

$ bazel build //examples/simple:test
INFO: Repository _main~swc~swc_linux-arm64-gnu instantiated at:
  <builtin>: in <toplevel>
Repository rule swc_repositories defined at:
  /home/peterkolloch/rules_swc/swc/repositories.bzl:133:35: in <toplevel>
ERROR: An error occurred during the fetch of repository '_main~swc~swc_linux-arm64-gnu':
   Traceback (most recent call last):
	File "/home/peterkolloch/rules_swc/swc/repositories.bzl", line 114, column 43, in _swc_repo_impl
		integrity = TOOL_VERSIONS[version][repository_ctx.attr.platform]
Error: key "linux-arm64-gnu" not found in dictionary
ERROR: <builtin>: fetching swc_repositories rule //:_main~swc~swc_linux-arm64-gnu: Traceback (most recent call last):
	File "/home/peterkolloch/rules_swc/swc/repositories.bzl", line 114, column 43, in _swc_repo_impl
		integrity = TOOL_VERSIONS[version][repository_ctx.attr.platform]
Error: key "linux-arm64-gnu" not found in dictionary
ERROR: no such package '@@_main~swc~swc_linux-arm64-gnu//': key "linux-arm64-gnu" not found in dictionary
ERROR: /home/peterkolloch/rules_swc/examples/simple/BUILD.bazel:12:4: //examples/simple:compile depends on @@_main~swc~swc_linux-arm64-gnu//:swc_toolchain in repository @@_main~swc~swc_linux-arm64-gnu which failed to fetch. no such package '@@_main~swc~swc_linux-arm64-gnu//': key "linux-arm64-gnu" not found in dictionary
INFO: Analyzed target //examples/simple:test (88 packages loaded, 434 targets configured).
WARNING: errors encountered while analyzing target '//examples/simple:test', it will not be built.
Analysis failed
INFO: Found 0 targets...
ERROR: command succeeded, but there were loading phase errors
INFO: Elapsed time: 5.714s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
$ uname -a
Linux ubuntu 6.11.9-orbstack-00279-g4cf512143f2e #60 SMP Mon Nov 18 05:48:29 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

(note that this uses an older bazel but the error is the same)

Any other information?

The platform string in

"linux-arm-gnueabihf": "sha384-g6yFrvp0xsyScv+TukxmS0kaWVIOoics8eDM7/I/HJQhT5UWsLues80I73QWe3ql",
:

"Mirror of release info"

# Versions should be descending order so TOOL_VERSIONS[0] is the latest version.
TOOL_VERSIONS = {
    "v1.7.40": {
        "darwin-arm64": "sha384-PBeXRSawmqzPP/mGgDSb8HIb51inHFDJmEuVzrUVpDCA6nBqzT9tALrEbZ4Jxjc6",
        "darwin-x64": "sha384-lNZavqaP6K8TLXmmcp+qsSdKCYqr3beABHfkwE3oHAeVyNDVokK6oVMQPLShjrX2",
        "linux-arm-gnueabihf": "sha384-g6yFrvp0xsyScv+TukxmS0kaWVIOoics8eDM7/I/HJQhT5UWsLues80I73QWe3ql",

Doesn't match the platform string in

"linux-arm64-gnu": struct(
compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
),
:

PLATFORMS = {
    # ...
    "linux-arm64-gnu": struct(
        compatible_with = [
            "@platforms//os:linux",
            "@platforms//cpu:aarch64",
        ],
    ),

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions