hyperledger-archives / fabric

THIS IS A READ-ONLY historic repository. Current development is at https://gerrit.hyperledger.org/r/#/admin/projects/fabric . pull requests not accepted
https://gerrit.hyperledger.org/
Apache License 2.0
1.17k stars 1.01k forks source link

Unable to make peer #2218

Open nitesh7sid opened 8 years ago

nitesh7sid commented 8 years ago

I am facing an issue in running make peer command...the output of make peer command is :

Building docker src-image docker build -t hyperledger/fabric-src:latest build/image/src Sending build context to Docker daemon 21.04 MB Step 1 : FROM hyperledger/fabric-baseimage:latest ---> 98a31bf0c396 Step 2 : ADD gopath.tar.bz2 $GOPATH/src/github.com/hyperledger/fabric ---> Using cache ---> bf4e6c400629 Successfully built bf4e6c400629 Building docker ccenv-image docker build -t hyperledger/fabric-ccenv:latest build/image/ccenv Sending build context to Docker daemon 16.97 MB Step 1 : FROM hyperledger/fabric-src:latest ---> bf4e6c400629 Step 2 : COPY bin/* /usr/local/bin/ ---> Using cache ---> 373deaf4ec56 Successfully built 373deaf4ec56 build/bin/peer CGO_CFLAGS=" " CGO_LDFLAGS="-lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" GOBIN=/opt/gopath/src/github.com/hyperledger/fabric/build/bin go install _github.com/hyperledger/fabric/peer _# github.com/hyperledger/fabric/core/util core/util/utils.go:138:15: error: reference to undefined identifier \u2018strings.Compare\u2019 if strings.Compare(v1, v2) == 0 { ^

golang.org/x/net/http2/hpack

../../../golang.org/x/net/http2/hpack/huffman.go:14:20: error: reference to undefined identifier \u2018sync.Pool\u2019 var bufPool = sync.Pool{ ^ ../../../golang.org/x/net/http2/hpack/huffman.go:14:24: error: expected \u2018;\u2019 or newline after top level declaration var bufPool = sync.Pool{ ^ go tool: no such tool "cgo" make: * [build/bin/peer] Error 3**

ghaskins commented 8 years ago

Can you indicate whether this is within vagrant::devenv or not?

nitesh7sid commented 8 years ago

I am building this outside vagrant...

ghaskins commented 8 years ago

There seems to be possibly two issues:

  1. The undefined references should be handled with go vendoring. Can you confirm that you are either using go 1.6 OR you are using go 1.5 with the vendoring feature enabled.
  2. It looks like you don't have cgo tools in your environment.

FWIW, both of those issues would be handled for you if you operate within the devenv.

nitesh7sid commented 8 years ago

I am using1.6 version... Should I run make peer command inside devenv directory?

ghaskins commented 8 years ago

The directory won't help, no. Can you fire up a devenv and see if it works for you in there?

nitesh7sid commented 8 years ago

The go tool is not present in the environment...what is the command to set the GOTOOLDIR to cgo location?