mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
The evm plugin turns cgo on for blst. Doing so also pulled in two optional native backends keyed on bare cgo, neither of which a build host carries by default, so `go build ./evm` needed a luxcpp and a luxgpu install or it did not compile: # github.com/luxfi/chains/evm/cevm # [pkg-config --cflags -- lux-cevm lux-crypto-secp256k1] Package lux-cevm was not found in the pkg-config search path. # github.com/luxfi/accel/ops/code code_cpu.go:102:10: fatal error: lux/gpu/hqc.h: No such file or directory Both are the same conflation: "a C compiler exists" is being written where "this C library is installed" is meant. evm/cevm gets the second predicate it was missing, lux_cevm_native, and accel v1.3.2 restores lux_hqc_native on its side. cevm_nocgo.go and cevm_secp256k1_nocgo.go already mirrored the full API for exactly this case, so the default build takes them and reports CPUSequential; -tags=lux_cevm_native links libevm/libevm-gpu unchanged. The tests move with the predicate they actually need. TestABIVersion locks the linked library's ABI constant, so it belongs beside TestLibraryABIVersion in the native file rather than in the untagged one, where it asserted 6 against the stub's documented 0 and failed every CGO_ENABLED=0 run. Verified: all twelve VMs build at their images.json cgo setting; go build ./... and go test ./evm/cevm/... green at CGO=0 and CGO=1; -tags=lux_cevm_native still selects cevm_cgo.go + cevm_secp256k1.go.