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

[BUG] Failed to build this project #49

Open
qzylalala opened this issue May 10, 2024 · 0 comments
Open

[BUG] Failed to build this project #49

qzylalala opened this issue May 10, 2024 · 0 comments
Assignees

Comments

@qzylalala
Copy link

What steps did you take and what happened:
[A clear and concise description of what the bug is.]

When I follow steps here to build this project. I got

go get sigs.k8s.io/controller-tools/cmd/[email protected]
^CMakefile:75: recipe for target 'controller-gen' failed
make: *** [controller-gen] Interrupt

And I use go get sigs.k8s.io/controller-tools/cmd/[email protected], but still failed. I can't find controller-gen in my GOBIN, I use go install instead which sovled this problem finally. But I still get an error when I type make manager.

/home/user/go/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9ed5af]

goroutine 62 [running]:
go/types.(*Checker).handleBailout(0xc001d30800, 0xc0021b5d40)
        /usr/local/go/src/go/types/check.go:367 +0x88
panic({0xb9a3a0?, 0x125bab0?})
        /usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xd85068, 0x12642e0})
        /usr/local/go/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
        /usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0xd85068?, 0x12642e0?})
        /usr/local/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xd8b4c0, 0x1230440}, 0xc001d30800, 0x12642e0, 0x0)
        /usr/local/go/src/go/types/const.go:92 +0x192
go/types.(*Checker).arrayLength(0xc001d30800, {0xd89720, 0xc0024bdae0?})
        /usr/local/go/src/go/types/typexpr.go:510 +0x2d3
go/types.(*Checker).typInternal(0xc001d30800, {0xd87dd0, 0xc001d0fef0}, 0x0)
        /usr/local/go/src/go/types/typexpr.go:299 +0x49d
go/types.(*Checker).definedType(0xc001d30800, {0xd87dd0, 0xc001d0fef0}, 0xc0021b5328?)
        /usr/local/go/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).varType(0xc001d30800, {0xd87dd0, 0xc001d0fef0})
        /usr/local/go/src/go/types/typexpr.go:145 +0x25
go/types.(*Checker).structType(0xc001d30800, 0xc002789d40, 0xc002789d40?)
        /usr/local/go/src/go/types/struct.go:113 +0x19f
go/types.(*Checker).typInternal(0xc001d30800, {0xd87d40, 0xc0019b4918}, 0xc002731220)
        /usr/local/go/src/go/types/typexpr.go:316 +0x1345
go/types.(*Checker).definedType(0xc001d30800, {0xd87d40, 0xc0019b4918}, 0xc607af?)
        /usr/local/go/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).typeDecl(0xc001d30800, 0xc002731220, 0xc0022994c0, 0x0)
        /usr/local/go/src/go/types/decl.go:615 +0x44d
go/types.(*Checker).objDecl(0xc001d30800, {0xd90900, 0xc002731220}, 0x0)
        /usr/local/go/src/go/types/decl.go:197 +0xa7f
go/types.(*Checker).packageObjects(0xc001d30800)
        /usr/local/go/src/go/types/resolver.go:681 +0x425
go/types.(*Checker).checkFiles(0xc001d30800, {0xc001a92000, 0x3, 0x3})
        /usr/local/go/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
        /usr/local/go/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000340f30, 0xc001869a00)
        /home/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:283 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc001869a00)
        /home/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/loader.go:96 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc0010d8390, 0xc001869a00)
        /home/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:263 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x54?)
        /home/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:257 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 258
        /home/user/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/loader/refs.go:255 +0x1c5
Makefile:61: recipe for target 'generate' failed
make: *** [generate] Error 2

What did you expect to happen:

I should build this project successfully following the steps provided here https://kubedl.io/docs/contribution/contributing/.

Anything else we need to know?:

Environment:

  • Morphling version: latest
  • Minikube version (minikube version): v1.33.0
  • Kubernetes version (use kubectl version): v1.30.0
  • OS (e.g: cat /etc/os-release): Ubuntu 18.04.6 LTS
  • Kernel (e.g. uname -a): Linux gpu04 5.4.0-150-generic
  • Install tools: make
  • Others:
@qzylalala qzylalala changed the title [BUG] [BUG] Failed to build this project May 10, 2024
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

2 participants