Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
issue
issue
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • chainmaker
  • issueissue
  • Issues
  • #652

Closed
Open
Opened Apr 20, 2023 by v v@vv

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
Edited Apr 20, 2023 by v v
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: chainmaker/issue#652

Copyright © 2021 ChainMaker Org. All Rights Reserved. 长安链 版权所有。