diff options
author | Elias Naur <[email protected]> | 2024-01-30 19:25:54 -0500 |
---|---|---|
committer | Ayke <[email protected]> | 2024-01-31 14:56:16 +0100 |
commit | 7b8ae2d6b62bf2bc76b8529147d24137df6ff8ec (patch) | |
tree | 4549ba16b18f3e0eb1e5cc17867a6cd2ef95b9e9 | |
parent | 5b8127fd4ea3bd3134f93e07250d595dfbde14ba (diff) | |
download | tinygo-7b8ae2d6b62bf2bc76b8529147d24137df6ff8ec.tar.gz tinygo-7b8ae2d6b62bf2bc76b8529147d24137df6ff8ec.zip |
flake.nix: explicitly add libcxx as dependency
Without this change, my tinygo builds crash with
SIGSEGV: segmentation violation
PC=0x10884f87c m=16 sigcode=2
signal arrived during cgo execution
goroutine 378 [syscall]:
runtime.cgocall(0x100631e44, 0x1401755be88)
/nix/store/4hf287252ilsdf2w36mfm8fa0rvbf33w-go-1.21.4/share/go/src/runtime/cgocall.go:157 +0x44 fp=0x1401755be50 sp=0x1401755be10 pc=0x1002a5084
tinygo.org/x/go-llvm._Cfunc_LLVMGoWriteThinLTOBitcodeToMemoryBuffer(0x123614160)
_cgo_gotypes.go:6078 +0x34 fp=0x1401755be80 sp=0x1401755be50 pc=0x1004b66b4
...
and reports using LLVM 16:
$ tinygo version
tinygo version 0.31.0-dev darwin/arm64 (using go version go1.21.4 and LLVM version 16.0.6)
I don't know why libcxx-16 is being included, but explicitly specifying
llvmPackages_17.libcxx fixes the crash and version skew.
-rw-r--r-- | flake.nix | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -51,6 +51,7 @@ go llvmPackages_17.llvm llvmPackages_17.libclang + llvmPackages_17.libcxx # Additional dependencies needed at runtime, for building and/or # flashing. llvmPackages_17.lld |