Skip to content

bug: purego arm64 linker error — need same asmcgocall fix as zerfoo#115 #3

@dndungu

Description

@dndungu

Problem

zerfoo/zerfoo#115 fixed the arm64 purego trampoline issue in zerfoo/internal/cuda using asmcgocall-based trampolines. But ztensor/internal/cuda still has the old purego trampolines, causing the same linker error:

github.com/zerfoo/ztensor/internal/cuda.libc_dlerror_trampoline: unhandled relocation for libc_dlerror (type 65 (SDYNIMPORT) rtype 9 (R_CALLARM64))

Building with -tags tabular on linux/arm64 (DGX Spark) still fails because ztensor pulls in the unfixed code path.

Fix

Apply the same asmcgocall-based trampoline fix from zerfoo commit 07c50f09 to ztensor's internal/cuda/purego_linux_arm64.go and purego_linux_arm64.s.

Environment

  • Go 1.26.1 linux/arm64
  • DGX Spark (NVIDIA GB10, CUDA 13.0)
  • ztensor v0.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions