Giter Club home page Giter Club logo

Comments (11)

ondrajz avatar ondrajz commented on August 17, 2024

Try putting the target package argument github.com/hashicorp/raft after all the flags, like this:

go-callvis -focus github.com/hashicorp/raft -limit github.com/hashicorp/raft -nostd github.com/hashicorp/raft

from go-callvis.

smallnest avatar smallnest commented on August 17, 2024

Thanks @TrueFurby , but it still has some errors:

go-callvis -focus github.com/hashicorp/raft -limit github.com/hashicorp/raft github.com/hashicorp/raft
.......
Users/yuepan/go/src/github.com/hashicorp/raft/util.go:23:47: undeclared name: math
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:25:9: undeclared name: fmt
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:35:12: undeclared name: time
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:35:26: undeclared name: rand
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:36:9: undeclared name: time
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:58:15: undeclared name: crand
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:59:9: undeclared name: fmt
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:62:9: undeclared name: fmt
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:129:9: undeclared name: fmt
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:132:9: invalid operation: buf (variable of type *invalid type) has no field or method Bytes
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:140:9: undeclared name: fmt
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:154:7: undeclared name: bytes
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:162:9: undeclared name: bytes
go-callvis: couldn't load packages due to errors: github.com/hashicorp/raft, github.com/hashicorp/go-msgpack/codec, github.com/armon/go-metrics and 2 more

from go-callvis.

ondrajz avatar ondrajz commented on August 17, 2024

This seems like issue with compiling the package github.com/hashicorp/raft itself.

Try running: go install github.com/hashicorp/raft

I tried downloading it and compiling with go 1.8.3 successfully. What Go version do you use?

from go-callvis.

smallnest avatar smallnest commented on August 17, 2024

Go 1.9.

I have updated "raft" : go get -u github.com/hashicorp/raft

from go-callvis.

ondrajz avatar ondrajz commented on August 17, 2024

So, it works now?

from go-callvis.

smallnest avatar smallnest commented on August 17, 2024

No, same problems to the above. It looks it can't find stdlib:

/Users/yuepan/go/src/github.com/hashicorp/go-msgpack/codec/binc.go:7:2: could not import math (cannot find package "math" in any of:
	/usr/local/Cellar/go/1.7.4/libexec/src/math (from $GOROOT)
	/Users/yuepan/go/src/math (from $GOPATH))
/Users/yuepan/go/src/github.com/hashicorp/go-msgpack/codec/binc.go:10:2: could not import time (cannot find package "time" in any of:
	/usr/local/Cellar/go/1.7.4/libexec/src/time (from $GOROOT)
	/Users/yuepan/go/src/time (from $GOPATH))
/Users/yuepan/go/src/github.com/hashicorp/go-msgpack/codec/decode.go:7:2: could not import io (cannot find package "io" in any of:
	/usr/local/Cellar/go/1.7.4/libexec/src/io (from $GOROOT)
	/Users/yuepan/go/src/io (from $GOPATH))
/Users/yuepan/go/src/github.com/hashicorp/go-msgpack/codec/decode.go:8:2: could not import reflect (cannot find package "reflect" in any of:
	/usr/local/Cellar/go/1.7.4/libexec/src/reflect (from $GOROOT)
	/Users/yuepan/go/src/reflect (from $GOPATH))
/Users/yuepan/go/src/github.com/hashicorp/go-msgpack/codec/encode.go:7:2: could not import io (cannot find package "io" in any of:
	/usr/local/Cellar/go/1.7.4/libexec/src/io (from $GOROOT)
	/Users/yuepan/go/src/io (from $GOPATH))
/Users/yuepan/go/src/github.com/hashicorp/go-msgpack/codec/encode.go:8:2: could not import reflect (cannot find package "reflect" in any of:
	/usr/local/Cellar/go/1.7.4/libexec/src/reflect (from $GOROOT)

from go-callvis.

smallnest avatar smallnest commented on August 17, 2024

But I installed go1.9

from go-callvis.

smallnest avatar smallnest commented on August 17, 2024
➜  raft git:(master) ✗ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/yuepan/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gq/jd9v5dd95p570hkztblb8ht40000gn/T/go-build725023326=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

from go-callvis.

ondrajz avatar ondrajz commented on August 17, 2024

You have GOROOT set to /usr/local/go, but for some reason during the compilation it seems to using /usr/local/Cellar/go/1.7.4/libexec/ to look for stdlib.

from go-callvis.

smallnest avatar smallnest commented on August 17, 2024

It should be caused by this. I have ever installed go by brew but I have uninstalled it then. Now I install go manually. It is not an issue of go-callvis.

I will investigate how to fix it .

Thanks @TrueFurby

from go-callvis.

yanjinbin avatar yanjinbin commented on August 17, 2024

I use the below command"

go-callvis -focus github.com/hashicorp/raft github.com/hashicorp/raft -limit github.com/hashicorp/raft -nostd

but there are many errors:

/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:58:15: undeclared name: crand
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:59:9: undeclared name: fmt
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:62:9: undeclared name: fmt
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:129:9: undeclared name: fmt
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:132:9: invalid operation: buf (variable of type *invalid type) has no field or method Bytes
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:140:9: undeclared name: fmt
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:154:7: undeclared name: bytes
/Users/yuepan/go/src/github.com/hashicorp/raft/util.go:162:9: undeclared name: bytes
cannot find package "-limit" in any of:
	/usr/local/Cellar/go/1.7.4/libexec/src/-limit (from $GOROOT)
	/Users/yuepan/go/src/-limit (from $GOPATH)
cannot find package "-nostd" in any of:

Maybe I have made a mistake to use it.

My question is how to use it for github.com/hashicorp/raft github.com/hashicorp/raft

have you fix it ?

from go-callvis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.