divan / gotrace

Concurrency tracer and visualizer for Go (Golang) programming language
MIT License
1.97k stars 128 forks source link

Does not works use gb #7

Closed zchee closed 3 years ago

zchee commented 8 years ago

I tried gotrace's patch(runtime/go1.6.3-tracenew.patch) with gb. But when gb build, does not proceed(freeze).

Here is repro way.

curl https://storage.googleapis.com/golang/go1.6.3.src.tar.gz | tar -xz -C /usr/local/go163
patch -p1 -d /usr/local/go163 < runtime/go1.6.3-tracenew.patch
cd /usr/local/go163/src
export GOROOT_BOOTSTRAP=/path/to/go1.4.3
./make.bash
export PATH=/usr/local/go163/bin:$PATH

# gb use build.Default, re-build gb binary
go get -u -v -x github.com/constabulary/gb/...
cd /path/to/tmp
git clone https://github.com/constabulary/example-gsftp gsftp
cd gsftp

gb env
  GB_PROJECT_DIR="/Users/zchee/go/src/github.com/constabulary/gsftp"
  GB_SRC_PATH="/Users/zchee/go/src/github.com/constabulary/gsftp/src:/Users/zchee/go/src/github.com/constabulary/gsftp/vendor/src"
  GB_PKG_DIR="/Users/zchee/go/src/github.com/constabulary/gsftp/pkg/darwin-amd64"
  GB_BIN_SUFFIX="-darwin-amd64"
  GB_GOROOT="/usr/local/go-trace"

gb vendor restore
gb build

gb has not -v flag for build command. Now I'm trying another debug way.

Thanks.

divan commented 8 years ago

Just to clarify, you need to build a binary using the patched Go runtime. As I see you did patch the Go succesfully. From that point, the building process should be exactly the same is with original Go version. It should be as easy as redefining PATH variable.