orijtech / staticmajor-action

Public GitHub Action for staticmajor
Apache License 2.0
7 stars 0 forks source link

How to analyze with CGO ? #1

Open tomtau opened 2 years ago

tomtau commented 2 years ago

when run on https://github.com/evmos/ethermint it'll fail with these errors:

/go/pkg/mod/github.com/evmos/ethermint@v0.6.1-0.20220923160625-35850e620d28/app/ante/eip712.go:236:36: RecoverPubkey not declared by package secp256k1
/go/pkg/mod/github.com/evmos/ethermint@v0.6.1-0.20220923160625-35850e620d28/app/ante/eip712.go:262:17: VerifySignature not declared by package secp256k1
tomtau commented 2 years ago

@elias-orijtech

elias-orijtech commented 2 years ago

In general, it's not possible to analyze with CGO_ENABLED=1 from CI, unless a custom image is prepared for you that contains the necessary requirements (C toolkit, development headers and so on).

An easier way is to make your code buildable with CGO_ENABLED=0. Verify locally with CGO_ENABLED=0 go build ./....