Reputation: 474
I am very close to set up dev environment for hyperledger fabric and following this link https://github.com/IBM-Blockchain/learn-chaincode/blob/master/docs/setup.md
When I run this command git clone -b v0.6 http://gerrit.hyperledger.org/r/fabric and run go build. I get following error:
can't load package: package github.com/hyperledger/fabric: no buildable Go source files in /Users/test/work/src/github.com/hyperledger/fabric
However when I run step 4 from the link, the build success. cd $GOPATH/src/github.com//learn-chaincode/start
go build ./
Here build is not succeed only for http://gerrit.hyperledger.org/r/fabric.
Any thoughts?
Please suggest!
Upvotes: 0
Views: 380
Reputation: 6129
Assuming you are setting up the dev environment you want to build things for that after cloning the repo. This is done with make, thus e.g. make all
to build and test all.
To build chaincode later on you use go build
in the folder where you have the chaincode source file.
Upvotes: 0
Reputation:
I think the manual is not precisely written here. You are not supposed to run go build .
on the cloned fabric repository. The manual just states here, that if you are getting build errors later, the clone into your go sources did not work. I is not asking you to build the fabric repository. If your build
command is executed in step 4, everything should be set up correctly.
Upvotes: 0