Skip to content

Panic: reached unreachable code under aarch64 Ampere A1 cpu (Oracle Linux 8) #20038

Description

@hashfall

Zig Version

0.13.0-dev.242+6635360db

Steps to Reproduce and Observed Behavior

Zig doesn't support Ampere A1 cpu from OCI cloud machines, trying to run a pre-built binary results in the errors below.
Trying to either bootstrap or to build from source without LLVM support, results in the missing "id_aa64mmfr2_el1" cpu instruction error.

Result of zig env command (using a pre-built aarch64 binary)

{
 "zig_exe": "/home/opc/bin/zig/zig",
 "lib_dir": "bin/zig/lib",
 "std_dir": "bin/zig/lib/std",
 "global_cache_dir": "/home/opc/.cache/zig",
 "version": "0.13.0-dev.242+6635360db",
 "target": "aarch64-linux.5.4.17...5.4.17-gnu.2.28",
 "env": {
  "ZIG_GLOBAL_CACHE_DIR": null,
  "ZIG_LOCAL_CACHE_DIR": null,
  "ZIG_LIB_DIR": null,
  "ZIG_LIBC": null,
  "ZIG_BUILD_RUNNER": null,
  "ZIG_VERBOSE_LINK": null,
  "ZIG_VERBOSE_CC": null,
  "ZIG_BTRFS_WORKAROUND": null,
  "ZIG_DEBUG_CMD": null,
  "CC": null,
  "NO_COLOR": null,
  "XDG_CACHE_HOME": null,
  "HOME": "/home/opc"
 }
}

Trying to run zls

info : ( main ): Starting ZLS 0.12.0 @ 'zls'
thread 140051 panic: reached unreachable code
Panicked during a panic. Aborting.
[1]    140051 abort (core dumped)  zls

Trying to build the ziglings.org exercises (using a pre-built aarch64 binary). But doing "zig run" individual .zig files works ok

thread 141737 panic: reached unreachable code
Panicked during a panic. Aborting.
error: the following build command crashed:
/home/opc/code-server/config/workspace/ziglings.org/zig-cache/o/639179193b9afe87500327e8ffcdee86/build /home/opc/bin/zig/zig /home/opc/code-server/config/workspace/ziglings.org /home/opc/code-server/config/workspace/ziglings.org/zig-cache /home/opc/.cache/zig --seed 0xf276afdb -Z0a11a10068cb4e45

Expected Behavior

Be able to build projects using zig language under an Arm Ampere based machine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-aarch6464-bit ArmbugObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions