Error while running make command using Fabric 1 0 6

0 votes

I am installing fabric in a custom path $HOME//gopath/src/github.com/hyperledger/fabric using the make command like this:

Step 15/15 : LABEL org.hyperledger.fabric.version=1.0.2       org.hyperledger.fabric.base.version=0.3.2
 ---> Running in ed05a67810db
Removing intermediate container ed05a67810db
 ---> 99b4b0b28957
Successfully built 99b4b0b28957
Successfully tagged hyperledger/fabric-javaenv:latest
docker tag hyperledger/fabric-javaenv hyperledger/fabric-javaenv:x86_64-1.0.2
build/bin/peer
CGO_CFLAGS=" " GOBIN=/root/gopath/src/github.com/hyperledger/fabric/build/bin go install -tags "" -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=1.0.2 -X github.com/hyperledger/fabric/common/metadata.BaseVersion=0.3.2 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric -X github.com/hyperledger/fabric/common/metadata.DockerNamespace=hyperledger -X github.com/hyperledger/fabric/common/metadata.BaseDockerNamespace=hyperledger" github.com/hyperledger/fabric/peer
go build github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11: invalid flag in #cgo LDFLAGS: -Wl,--no-as-needed
Makefile:227: recipe for target 'build/bin/peer' failed
make: *** [build/bin/peer] Error 1


Docker version 17.12.0-ce, build c97c6d6
docker-compose version 1.18.0, build 8dd22a9
go version go1.9.4 linux/amd64
OS : Ubuntu 16.04
I have set the following path also
$ mkdir $HOME/gopath
$ export GOPATH=$HOME/gopath
$ export GOROOT=$HOME/go
$ export PATH=$PATH:$GOROOT/bin

Jun 27, 2018 in Blockchain by Johnathon
• 9,090 points
1,064 views

1 answer to this question.

0 votes

It's a known issue in go 1.9.4: https://github.com/golang/go/issues/23739

While go people are fixing it, you can manually do it by whitelisting the flags before starting make:

$ export CGO_LDFLAGS_ALLOW='-Wl,--no-as-needed'
$ make

Alternatively you can just downgrade to go 1.9.3

Hope this helps.

answered Jun 27, 2018 by Perry
• 17,100 points

Related Questions In Blockchain

+1 vote
2 answers

Challenge while setting up Hyperledger Fabric 1.0 in Ubuntu 16.04

The rocksdb error you're seeing wouldn't be ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points

edited Jun 8, 2020 by Sirajul 1,153 views
0 votes
1 answer

Error while running curl command in Docker Quickstart Terminal

You can get the new version of ...READ MORE

answered Jul 12, 2018 in Blockchain by slayer
• 29,370 points
2,919 views
0 votes
1 answer
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,740 points
1,004 views
+1 vote
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP