CGO_ENABLED=0时引入的sdk无法编译
源码
package main
import (
"fmt"
sdk "chainmaker.org/chainmaker/sdk-go/v2"
)
func main() {
node := sdk.NewNodeConfig()
fmt.Println(node)
}
go.mod
require chainmaker.org/chainmaker/sdk-go/v2 v2.3.2
编译指令: CGO_ENABLED=0 go build m.go
报错如下:
package command-line-arguments
imports chainmaker.org/chainmaker/sdk-go/v2
imports chainmaker.org/chainmaker/common/v2/crypto/hibe
imports chainmaker.org/chainmaker/common/v2/crypto/hibe/hibe_amd64
imports chainmaker.org/chainmaker/common/v2/crypto/sym
imports chainmaker.org/chainmaker/common/v2/opencrypto/tencentsm/sm4
imports chainmaker.org/chainmaker/common/v2/opencrypto/tencentsm/tencentsm: build constraints exclude all Go files in /home/vava/go/pkg/mod/chainmaker.org/chainmaker/common/v2@v2.3.1/opencrypto/tencentsm/tencentsm
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information