cavaliergopher / rpm

A Go implementation of the RPM file format
BSD 3-Clause "New" or "Revised" License
170 stars 44 forks source link

make go-rpm error: import cycle not allowed #1

Closed tjyang closed 8 years ago

tjyang commented 8 years ago

Hi there

Can you advise where I may have done wrong ?

'''

  1. git clone https://github.com/cavaliercoder/go-rpm.git
  2. cd go-rpm
  3. go environment [pi@centos7t02 go-rpm]$ go env GOARCH="amd64" GOBIN="" GOCHAR="6" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/pi/gocode" GORACE="" GOROOT="/home/pi/ws/go" GOTOOLDIR="/home/pi/ws/go/pkg/tool/linux_amd64" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0" CXX="g++" CGO_ENABLED="1"
  4. build error message [pi@centos7t02 go-rpm]$ make go build -x WORK=/tmp/go-build620429315 import cycle not allowed package . imports bytes imports errors imports runtime imports runtime/internal/atomic imports runtime make: *\ [build] Error 1 [pi@centos7t02 go-rpm]$

'''

cavaliercoder commented 8 years ago

Odd... which version of Go are you using?

Have you tried using go get instead of git clone/make?

cavaliercoder commented 8 years ago

It looks like your $GOROOT and $GOPATH are pointing to a library version that differs from your go binary version.

Please see:

tjyang commented 8 years ago

Thanks for the pointers.