Comments (4)
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.
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.
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.
#165 should fix this
from kubectl-trace.
Related Issues (20)
- bug: building with `go get` results in invalid binary HOT 4
- Problem when specifying pod/container/pid arguments but not when specifying host/pid arguments HOT 4
- NodeSelector kubernetes.io/hostname not reliable
- FindPidByPodContainer unreliable HOT 3
- Unable to setup kubectl-trace on azure kubernetes cluster
- Kernel headers not found in `/usr/src` HOT 1
- No bpf execution result displayed HOT 3
- Provide builds for M series Apple Silicon Macs (darwin_arm64) HOT 1
- Error: (POD | TYPE/NAME) is a required argument for the run command HOT 1
- /bpftrace/include/clang_workarounds.h:14:10: fatal error: 'linux/types.h' file not found HOT 3
- Support ability to pass `--unsafe` to bpftrace
- `/lib/modules/.installed` should include kernel version - right?
- New release needed to keep Krew up to date
- kubectl-trace job create fails
- Error generating headers
- About patching pod spec with additional volumes and volumeMounts
- Reporting a vulnerability
- update bpftrace to 0.18.0
- Add debug info about failures in CI system using the kubernetes-namespace-report action
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubectl-trace.