Error while running make command using Fabric 1 0 6

0 votes

I am installing fabric in a custom path $HOME//gopath/src/ 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
CGO_CFLAGS=" " GOBIN=/root/gopath/src/ go install -tags "" -ldflags "-X -X -X -X -X"
go build 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 answer to this question.

0 votes

It's a known issue in go 1.9.4:

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 684 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,330 points
0 votes
1 answer
0 votes
1 answer
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 vote
1 answer
0 votes
1 answer
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP