Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go get github.com/derekparker/delve/cmd/dlv returned a non-zero code: 2 #3

Open
rpfister51 opened this issue Aug 25, 2017 · 3 comments

Comments

@rpfister51
Copy link

Docker build:

$ docker build -t webapp-go .

Fails with following:

Step 2/10 : RUN go get -u -v github.com/derekparker/delve/cmd/dlv
 ---> Running in 021b01f8ca84
github.com/derekparker/delve (download)
github.com/derekparker/delve/vendor/gopkg.in/yaml.v2
github.com/derekparker/delve/pkg/goversion
github.com/derekparker/delve/pkg/dwarf/util
github.com/derekparker/delve/pkg/dwarf/op
github.com/derekparker/delve/pkg/dwarf/godwarf
github.com/derekparker/delve/pkg/dwarf/frame
github.com/derekparker/delve/pkg/dwarf/line
github.com/derekparker/delve/pkg/dwarf/reader
# github.com/derekparker/delve/pkg/dwarf/reader
src/github.com/derekparker/delve/pkg/dwarf/reader/variables.go:78: vrdr.dwarf.Ranges undefined (type *dwarf.Data has no field or method Ranges, but does have dwarf.ranges)
github.com/derekparker/delve/vendor/golang.org/x/arch/x86/x86asm
github.com/derekparker/delve/pkg/config
github.com/derekparker/delve/vendor/golang.org/x/sys/unix
github.com/derekparker/delve/vendor/github.com/peterh/liner
github.com/derekparker/delve/pkg/version
github.com/derekparker/delve/vendor/github.com/spf13/pflag
github.com/derekparker/delve/vendor/github.com/spf13/cobra
The command '/bin/sh -c go get -u -v github.com/derekparker/delve/cmd/dlv' returned a non-zero code: 2

Noticed the line above which includes "vrdr.dwarf.Ranges undefined".

Traced to this problem https://github.com/derekparker/delve/issues/936

Resolution is that golang version 1.7 or greater is required. I will create a pull request.

@montera82
Copy link

try upgrading the docker image to latest tag in your docker file

@rpfister51
Copy link
Author

"FROM golang:latest" certainly works. The point I was trying to make is that the previous version, "FROM golang:1.6" fails; anyone who tries to run this project with golang:1.6 will see an error. I would agree golang:latest is probably preferable, though some might argue that a project author should specify a version that is known to work.

@tbrownio
Copy link

thanks for the tip. I was stuck until I changed to FROM golang:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants