Coder Social home page Coder Social logo

Comments (5)

lujiajing1126 avatar lujiajing1126 commented on August 23, 2024

I also have this issue

from godebug.

meowssir avatar meowssir commented on August 23, 2024

Try running $ go get . in the main project folder as a workaround.

➜  github.com tree | grep meowssir -A2
├── meowssir
│   └── main
│       └── main.go

from godebug.

athirn avatar athirn commented on August 23, 2024

I've opened issue #88 for a related (but different) item. Unfortunately, @meowssir suggestion does not work for #88.

from godebug.

athirn avatar athirn commented on August 23, 2024

Believe the issue is that the file loader.go (_workspace/src/golang.org/x/tools/loader/loagergo) does not support vendoring. it needs to be enhanced add the vendored directories to ImportPath

from godebug.

scher200 avatar scher200 commented on August 23, 2024

I have the same issue:

cgo failed: [go tool cgo -objdir /tmp/net_C303750830 -- -I /tmp/net_C303750830 cgo_linux.go cgo_resnew.go cgo_socknew.go cgo_unix.go]: exit status 1
/usr/local/go/src/net/lookup_unix.go:58:24: undeclared name: cgoLookupHost
/usr/local/go/src/net/lookup_unix.go:70:24: undeclared name: cgoLookupIP
/usr/local/go/src/net/lookup_unix.go:86:23: undeclared name: cgoLookupPort
/usr/local/go/src/net/lookup_unix.go:95:24: undeclared name: cgoLookupCNAME
/usr/local/go/src/net/lookup_unix.go:162:23: undeclared name: cgoLookupPTR
/usr/local/go/src/net/http/h2_bundle.go:45:2: could not import golang_org/x/net/http2/hpack (cannot find package "golang_org/x/net/http2/hpack" in any of:
	/usr/local/go/src/golang_org/x/net/http2/hpack (from $GOROOT)
	/go/vendor/src/golang_org/x/net/http2/hpack (from $GOPATH)
	/go/src/golang_org/x/net/http2/hpack)
/usr/local/go/src/net/http/h2_bundle.go:46:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/http.go:10:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/server.go:31:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/transfer.go:21:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/transport.go:30:2: could not import golang_org/x/net/lex/httplex (cannot find package "golang_org/x/net/lex/httplex" in any of:
	/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
	/go/vendor/src/golang_org/x/net/lex/httplex (from $GOPATH)
	/go/src/golang_org/x/net/lex/httplex)
/usr/local/go/src/net/http/h2_bundle.go:848:19: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1827:11: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1851:52: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1862:51: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:5020:11: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6722:20: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:3131:18: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:3187:46: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6821:22: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6913:30: undeclared name: hpack
/usr/local/go/src/net/http/transport.go:323:8: undeclared name: httplex
/usr/local/go/src/net/http/transport.go:327:9: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:5287:26: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:5290:12: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6646:4: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:1920:2: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitEnabled
/usr/local/go/src/net/http/h2_bundle.go:1921:2: invalid operation: hdec (variable of type *invalid type) has no field or method SetMaxStringLength
/usr/local/go/src/net/http/h2_bundle.go:1922:2: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitFunc
/usr/local/go/src/net/http/h2_bundle.go:1922:27: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1926:7: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:1942:4: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitEnabled
/usr/local/go/src/net/http/h2_bundle.go:1948:4: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitEnabled
/usr/local/go/src/net/http/h2_bundle.go:1957:8: invalid operation: hdec (variable of type *invalid type) has no field or method SetEmitFunc
/usr/local/go/src/net/http/h2_bundle.go:1957:33: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:1962:16: invalid operation: hdec (variable of type *invalid type) has no field or method Write
/usr/local/go/src/net/http/h2_bundle.go:1979:12: invalid operation: hdec (variable of type *invalid type) has no field or method Close
/usr/local/go/src/net/http/h2_bundle.go:5784:7: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:5788:8: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:5879:2: invalid operation: cc.henc (variable of type *invalid type) has no field or method WriteField
/usr/local/go/src/net/http/h2_bundle.go:5879:21: undeclared name: hpack
/usr/local/go/src/net/http/server.go:789:25: undeclared name: httplex
/usr/local/go/src/net/http/server.go:793:7: undeclared name: httplex
/usr/local/go/src/net/http/server.go:797:8: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:2517:7: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:3042:20: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:3045:23: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:3899:3: invalid operation: sc.hpackEncoder (variable of type *invalid type) has no field or method SetMaxDynamicTableSize
/usr/local/go/src/net/http/h2_bundle.go:6698:22: undeclared name: httplex
/usr/local/go/src/net/http/h2_bundle.go:6825:2: invalid operation: enc (variable of type *invalid type) has no field or method WriteField
/usr/local/go/src/net/http/h2_bundle.go:6825:17: undeclared name: hpack
/usr/local/go/src/net/http/h2_bundle.go:6929:8: undeclared name: httplex
/usr/local/go/src/net/http/http.go:42:10: undeclared name: httplex
/usr/local/go/src/net/http/transfer.go:566:14: undeclared name: httplex
/usr/local/go/src/net/http/transfer.go:568:23: undeclared name: httplex
couldn't load packages due to errors: net, net/http

after the workaround: "go get ."

godebug run

runs but does not debug my go files

from godebug.

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.