ds20021205 2018-03-02 04:16
浏览 1390
已采纳

无效标志#cgo LDFLAGS使用go lang中断了构建

I'm new to the go-lang. I want to use go command to build a binary named cryptogen (hyperledger/fabric tool). I download the source code from github and type the following command accroding to readme:

CGO_CFLAGS=" " GOBIN=/hyperledger/src/github.com/hyperledger/fabric/build/bin go install -tags "" -ldflags "-X github.com/hyperledger/fabric/common/tools/cryptogen/metadata.Version=1.0.7" github.com/hyperledger/fabric/common/tools/cryptogen

On my Mac OS (OS version is 10.13, go-lang version is 1.10) I'm getting the following error:

go build github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11: invalid flag in #cgo LDFLAGS: -I/usr/local/share/libtool

I thought I missing libtool, after installed it, I'm still getting the same error.

What can I do next?

  • 写回答

3条回答 默认 最新

  • douyi1944 2018-03-03 12:36
    关注

    Just as an FYI, PKCS11 is not really required to use cryptogen. You can actually use -tags "nopkcs11"

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 SPSS分类模型实训题步骤
  • ¥15 求解决扩散模型代码问题
  • ¥15 工创大赛太阳能电动车项目零基础要学什么
  • ¥20 limma多组间分析最终p值只有一个
  • ¥15 nopCommerce开发问题
  • ¥15 torch.multiprocessing.spawn.ProcessExitedException: process 1 terminated with signal SIGKILL
  • ¥15 QuartusⅡ15.0编译项目后,output_files中的.jdi、.sld、.sof不更新怎么解决
  • ¥15 pycharm输出和导师的一样,但是标红
  • ¥15 想问问富文本拿到的html怎么转成docx的
  • ¥15 我看了您的文章,遇到了个问题。