Hyperledger fabric 如何解决这个问题';配置txgen';错误?

Hyperledger fabric 如何解决这个问题';配置txgen';错误?,hyperledger-fabric,hyperledger,Hyperledger Fabric,Hyperledger,我尝试在路径“/d/Go/Go/src/github.com/hyperledger/fabric(master)”中编译configtxgen时遇到错误 消息如下所示: # github.com/hyperledger/fabric/cmd/configtxgen D:\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 C:\Users\dell\AppData\Local\Temp\go-lin

我尝试在路径“/d/Go/Go/src/github.com/hyperledger/fabric(master)”中编译configtxgen时遇到错误

消息如下所示:

# github.com/hyperledger/fabric/cmd/configtxgen


D:\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1  
C:\Users\dell\AppData\Local\Temp\go-link-520369751\000004.o: In function `COVER_buildDictionary':
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/cover.c:714: undefined reference to '__getreent'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/cover.c:714: undefined reference to '__getreent'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/cover.c:710: undefined reference to '__getreent'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/cover.c:710: undefined reference to '__getreent'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/cover.c:678: undefined reference to '__getreent'  
C:\Users\dell\AppData\Local\Temp\go-link-520369751\000004.o:/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/cover.c:678: more undefined references to '__getreent' follow  
C:\Users\dell\AppData\Local\Temp\go-link-520369751\000006.o: In function 'ss_mintrosort':
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/divsufsort.c:509: undefined reference to '__assert_func'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/divsufsort.c:513: undefined reference to '__assert_func'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/divsufsort.c:512: undefined reference to '__assert_func'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/divsufsort.c:508: undefined reference to '__assert_func'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/divsufsort.c:517: undefined reference to '__assert_func'  
C:\Users\dell\AppData\Local\Temp\go-link-520369751\000006.o:/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/divsufsort.c:516: more undefined references to '__assert_func' follow  
C:\Users\dell\AppData\Local\Temp\go-link-520369751\000009.o: In function 'FASTCOVER_ctx_init':
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/fastcover.c:324: undefined reference to '__getreent'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/fastcover.c:324: undefined reference to '__getreent'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/fastcover.c:311: undefined reference to '__getreent'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/fastcover.c:311: undefined reference to '__getreent'  
/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/fastcover.c:318: undefined reference to '__getreent'  
C:\Users\dell\AppData\Local\Temp\go-link-520369751\000009.o:/cygdrive/d/Go/go/src/github.com/hyperledger/fabric/vendor/github.com/DataDog/zstd/fastcover.c:318: more undefined references to '__getreent' follow  
collect2.exe: error: ld returned 1 exit status  

make: *** [Makefile:209: build/bin/configtxgen] Error 2  
谷歌上的一些答案表明,这可能是因为go版本是32位的,因此它们不兼容。但我确实安装了64位go而不是32位go,这是最新版本。我发现的其他答案似乎与我的问题无关

更多信息:

go版本:

go版本go1.14.4 windows/amd64

我在Windows10上使用GitBash

go环境:

set GO111MODULE=  
set GOARCH=amd64  
set GOBIN=  
set GOCACHE=C:\Users\dell\AppData\Local\go-build  
set GOENV=C:\Users\dell\AppData\Roaming\go\env  
set GOEXE=.exe  
set GOFLAGS=  
set GOHOSTARCH=amd64  
set GOHOSTOS=windows  
set GOINSECURE=  
set GONOPROXY=  
set GONOSUMDB=  
set GOOS=windows  
set GOPATH=D:\Go\go  
set GOPRIVATE=  
set GOPROXY=https://proxy.golang.org,direct  
set GOROOT=D:\Go  
set GOSUMDB=sum.golang.org  
set GOTMPDIR=  
set GOTOOLDIR=D:\Go\pkg\tool\windows_amd64  
set GCCGO=gccgo  
set AR=ar  
set CC=gcc  
set CXX=g++  
set CGO_ENABLED=1  
set GOMOD=D:\Go\src\go.mod  
set CGO_CFLAGS=-g -O2  
set CGO_CPPFLAGS=  
set CGO_CXXFLAGS=-g -O2  
set CGO_FFLAGS=-g -O2  
set CGO_LDFLAGS=-g -O2  
set PKG_CONFIG=pkg-config  
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\dell\AppData\Local\Temp\go-build678055862=/tmp/go-build -gno-record-gcc-switches  

我不确定它是否能解决您的问题,但您能否尝试使用
go版本go1.12
,因为正如官方文档中所建议的那样,它适用于Hyperledger结构:看起来您是对的!非常感谢你!很抱歉打扰您,但是…我刚刚遇到另一个问题,它真的很混乱。我只是使用了./network\u setup.sh up顺序,但它向我显示了信息:“错误:构建结构需要1.14.4,而您使用的是1.12.17。”。请更新go。我很困惑。我尝试了最新的go版本,但我无法执行“make configtxgen”命令。现在它告诉我我的go版本太旧了……那么有人能告诉我应该怎么做吗?我很感激。我不确定它是否能解决您的问题,但您能尝试使用
go版本go1.12
,正如官方文档中所建议的,它是针对Hyperledger结构的:看起来你是对的!非常感谢你!很抱歉打扰您,但是…我刚刚遇到另一个问题,它真的很混乱。我只是使用了./network\u setup.sh up顺序,但它向我显示了信息:“错误:构建结构需要1.14.4,而您使用的是1.12.17。”。请更新go。我很困惑。我尝试了最新的go版本,但我无法执行“make configtxgen”命令。现在它告诉我,我的go版本太旧了……那么有人能告诉我该怎么做吗?我将不胜感激。