You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried to cross-compile for GOARCH=arm64 but the resulting build fails to execute on arm64 when using dynamic CGO linking due to GLIBC version mismatches of my build host and the target host.
And with static CC compiler flags, the resulting binary segfaults with
usql: dl-call-libc-early-init.c:37: _dl_call_libc_early_init: Assertion `sym != NULL' failed.
SIGABRT: abort
PC=0xa60894 m=0 sigcode=18446744073709551610
signal arrived during cgo execution
Is there a supported cross-compile procedure?
NOTE: The target platform is Ubuntu 20.04 on arm64 (Neoverse / Graviton)
The text was updated successfully, but these errors were encountered:
Great to know you were able to build it. While Go is pretty good at cross-compilation, one of the main drivers that are enabled by default (sqlite3) requires CGO. As such, cross-compilation is probably non-trivial if building the default set of drivers.
However, this was able to work:
ken@ken-desktop:~/src/go/src/github.com/xo/usql$ GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -tags 'most no_sqlite3 no_adodb'
ken@ken-desktop:~/src/go/src/github.com/xo/usql$ file usql
usql: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=aUHBc2_VPTSSDPrtiy9X/qE4C7u031VTFQmW6gyLF/FN56j3I978g4cr_78aMY/rkoEMBaBIhyGPHFT7PQd, not stripped
ken@ken-desktop:~/src/go/src/github.com/xo/usql$
I've tried to cross-compile for
GOARCH=arm64
but the resulting build fails to execute on arm64 when using dynamic CGO linking due to GLIBC version mismatches of my build host and the target host.And with static CC compiler flags, the resulting binary segfaults with
Is there a supported cross-compile procedure?
NOTE: The target platform is Ubuntu 20.04 on arm64 (Neoverse / Graviton)
The text was updated successfully, but these errors were encountered: