maticnetwork / bor

Official repository for the Polygon Blockchain
https://polygon.technology/
GNU Lesser General Public License v3.0
986 stars 476 forks source link

Error when compiling #1248

Closed lat1992 closed 1 month ago

lat1992 commented 1 month ago

System information

Bor client version: v1.3.2

Go version: 1.22.3

OS & Version: Linux arm

Overview of the problem

I cannot compile bor.

Reproduction Steps

clone the repo, then compile it, it shows an error.

Logs / Traces / Output / Error Messages

go build -o /home/lat/Projects/bor/build/bin/bor ./cmd/cli/main.go
# github.com/maticnetwork/heimdall/auth/types
../../go/pkg/mod/github.com/maticnetwork/heimdall@v1.0.4/auth/types/txbuilder.go:312:19: undefined: ethCrypto.Sign
../../go/pkg/mod/github.com/maticnetwork/heimdall@v1.0.4/auth/types/txbuilder.go:318:19: undefined: ethCrypto.RecoverPubkey
cffls commented 1 month ago

Could you please show the full command you used and the full log output?

Asking for this because the go build ... command doesn't seem to have required -ldflags flags (which is added automatically if make bor is used).

cffls commented 1 month ago

Can you try CGO_ENABLED=1 go build -o build/bin/bor ./cmd/cli/main.go?

lat1992 commented 1 month ago

Can you try CGO_ENABLED=1 go build -o build/bin/bor ./cmd/cli/main.go?

It solve the problem, thank you !