Are you trying to compile IPFS from git? From the released source code? What steps did you take up to this point (where/how did you get the source etc.)?
It looks like some of your gx packages may have been modified accidentally. Try removing everything in $GOPATH/src/gx/ipfs/ and rebuilding.
Are you trying to compile IPFS from git?
Yes
What steps did you take up to this point (where/how did you get the source etc.)
go get -u github.com/ipfs/go-ipfs
Then I use “git pull”, remove $GOPATH/src/gx/ipfs/,and rebuild it use “make install” or “make build”, then it works!