system-pclub / GCatch

Statically Detecting Go Concurrency Bugs
GNU General Public License v2.0
436 stars 40 forks source link

GCatch installation is broken on Go 1.17.1 #38

Open disconnect3d opened 2 years ago

disconnect3d commented 2 years ago

Hey, TL;DR:

dc@ubuntu:~/go/src/github.com/system-pclub/GCatch/GCatch$ go version
go version go1.17.1 linux/amd64

dc@ubuntu:~/go/src/github.com/system-pclub/GCatch/GCatch$ ./install.sh 
Make sure you have run installZ3.sh
Step 1: setting GOPATH to install GCatch
GOPATH is set to /home/dc/go
Step 2: installing GCatch
../../tools/internal/gocommand/vendor.go:17:2: cannot find package "golang.org/x/mod/semver" in any of:
    /usr/local/go/src/golang.org/x/mod/semver (from $GOROOT)
    /home/dc/go/src/golang.org/x/mod/semver (from $GOPATH)
../../tools/go/internal/cgo/cgo.go:67:2: cannot find package "golang.org/x/sys/execabs" in any of:
    /usr/local/go/src/golang.org/x/sys/execabs (from $GOROOT)
    /home/dc/go/src/golang.org/x/sys/execabs (from $GOPATH)
../../tools/go/packages/golist.go:29:2: cannot find package "golang.org/x/xerrors" in any of:
    /usr/local/go/src/golang.org/x/xerrors (from $GOROOT)
    /home/dc/go/src/golang.org/x/xerrors (from $GOPATH)
GCatch is installed in /home/dc/go/bin/GCatch

For those who stumble upon the same issue, you can work around it by installing those packages with go modules off:

GO111MODULE=off go get golang.org/x/mod/semver golang.org/x/sys/execabs golang.org/x/xerrors

It would be great if GCatch could finally get a proper go modules support :(.

songlh commented 2 years ago

@charlesxsh can you take a look?