Code Monkey home page Code Monkey logo

Comments (4)

dalehamel avatar dalehamel commented on June 2, 2024

I also get an error (though a different one) when I try to build with go1.15.7, on linux:

$ go get -u github.com/iovisor/kubectl-trace/cmd/kubectl-trace
package io/fs: unrecognized import path "io/fs": import path does not begin with hostname
cannot find package "github.com/pierrec/lz4/v4" in any of:
        /usr/lib/go/src/github.com/pierrec/lz4/v4 (from $GOROOT)
        /home/dale.hamel/workspace/go/src/github.com/pierrec/lz4/v4 (from $GOPATH)

However, when building via the Makefile, the build works. The command it ends up running is (by simply running make, and letting it build the default target):

CGO_ENABLED=1 go build -ldflags '-X github.com/iovisor/kubectl-trace/pkg/version.buildTime=1627520106 -X github.com/iovisor/kubectl-trace/pkg/version.gitCommit=568a278fe4110c151b2feabbe03aa2f1dd907482 -X github.com/iovisor/kubectl-trace/pkg/cmd.ImageName=quay.io/iovisor/kubectl-trace-runner -X github.com/iovisor/kubectl-trace/pkg/cmd.ImageTag=568a278fe4110c151b2feabbe03aa2f1dd907482 -X github.com/iovisor/kubectl-trace/pkg/cmd.InitImageName=quay.io/iovisor/kubectl-trace-init -X github.com/iovisor/kubectl-trace/pkg/cmd.InitImageTag=568a278fe4110c151b2feabbe03aa2f1dd907482' -o _output/bin/kubectl-trace ./cmd/kubectl-trace

I think the issue likely has something to do with go modules.

Can you try cloning the repo and building with Make as a workaround?

If you are able to submit a patch so that building via go get works, that would be great. Otherwise, we should probably remove it from the readme.

from kubectl-trace.

jallirs avatar jallirs commented on June 2, 2024

I think the issue likely has something to do with go modules.
Agreed :)

Can you try cloning the repo and building with Make as a workaround?

Literally just did, works :) .

Output:

go: downloading github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 go: downloading google.golang.org/grpc v1.38.0 go: downloading go.opencensus.io v0.23.0 go: downloading github.com/go-openapi/jsonpointer v0.19.3 go: downloading github.com/go-openapi/jsonreference v0.19.3 go: downloading github.com/go-openapi/swag v0.19.5 go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e go: downloading github.com/mattn/go-isatty v0.0.12 go: downloading github.com/BurntSushi/toml v0.3.1 go: downloading github.com/evanphx/json-patch/v5 v5.1.0 go: downloading github.com/pelletier/go-toml v1.8.0 go: downloading github.com/PuerkitoBio/purell v1.1.1 go: downloading github.com/mailru/easyjson v0.7.0 go: downloading github.com/ghodss/yaml v1.0.0 go: downloading github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 go: downloading github.com/emicklei/go-restful v2.9.5+incompatible rm -f -R _output rm -f -R dist CGO_ENABLED=1 go build -ldflags '-X github.com/iovisor/kubectl-trace/pkg/version.buildTime=1627520967 -X github.com/iovisor/kubectl-trace/pkg/version.gitCommit= -X github.com/iovisor/kubectl-trace/pkg/cmd.ImageName=quay.io/iovisor/kubectl-trace-runner -X github.com/iovisor/kubectl-trace/pkg/cmd.ImageTag= -X github.com/iovisor/kubectl-trace/pkg/cmd.InitImageName=quay.io/iovisor/kubectl-trace-init -X github.com/iovisor/kubectl-trace/pkg/cmd.InitImageTag=' -o _output/bin/kubectl-trace ./cmd/kubectl-trace ~/kubectl-trace # cd _output/ ~/kubectl-trace/_output # ls bin ~/kubectl-trace/_output # cd bin/ ~/kubectl-trace/_output/bin # ls kubectl-trace

Doing this also works:

docker run -it --rm golang:1.16.6-alpine3.14 /bin/sh /go # go get -u github.com/docker/[email protected] go: downloading github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96

All around strange :(

But as long as there's a workaround, I'm cool with this :) .

from kubectl-trace.

dalehamel avatar dalehamel commented on June 2, 2024

Ok I think I've figured it out, the following succeeds:

GO111MODULE=on go get github.com/iovisor/kubectl-trace/cmd/kubectl-trace@latest

The following fails, with the same error you posted:

$ GO111MODULE=on go get -u github.com/iovisor/kubectl-trace/cmd/kubectl-trace@latest
...
go get: github.com/docker/[email protected] updating to
        github.com/docker/[email protected]: parsing go.mod:
        module declares its path as: github.com/moby/spdystream
                but was required as: github.com/docker/spdystream

I think this is because it is trying to bump the modules, and one of the things we depend on (probably client-go) is having issues because of this repo being renamed (though, that was a long time ago, so that's odd).

I'll update the README to reflect at least a working command, the former.

from kubectl-trace.

dalehamel avatar dalehamel commented on June 2, 2024

#165 should fix this

from kubectl-trace.

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.