Open mwm5945 opened 1 year ago
Hi @mwm5945,
Thanks for the suggestion. This is something we have been meaning to do (supporting the CLI on more architectures), so good to have community engagement on this too!
I assume this is related to this?
Seems like it—I updated the package locally and the binary built/tested fine, though I haven’t done very much with it (really only doing the basic tutorials at the moment)On Jan 18, 2023, at 4:04 AM, cliveseldon @.***> wrote: I assume this is related to this?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
if in the meantime you want to install it on m1, use this
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 make build-seldon
I got a similar issue also on Mac (M2)
I followed the same instructions as the user above:
git clone https://github.com/SeldonIO/seldon-core --branch=v2
cd seldon-core/operator
make build-seldon-arm
Cloning into 'seldon-core'...
remote: Enumerating objects: 158395, done.
remote: Counting objects: 100% (800/800), done.
remote: Compressing objects: 100% (502/502), done.
remote: Total 158395 (delta 355), reused 653 (delta 268), pack-reused 157595
Receiving objects: 100% (158395/158395), 233.82 MiB | 37.61 MiB/s, done.
Resolving deltas: 100% (98502/98502), done.
go: creating new go.mod: module tmp
Downloading sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2
/Users/francisco/dev/seldon-core/operator/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=0x2 addr=0x0 pc=0x1048b4b54]
goroutine 173 [running]:
go/types.(*Checker).handleBailout(0x14000587600, 0x14000421d18)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/check.go:367 +0x9c
panic({0x104b7fa60?, 0x10510ff30?})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/runtime/panic.go:770 +0x124
go/types.(*StdSizes).Sizeof(0x0, {0x104c48c70, 0x1051187c0})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/sizes.go:228 +0x314
go/types.(*Config).sizeof(...)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/sizes.go:333
go/types.representableConst.func1({0x104c48c70?, 0x1051187c0?})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/const.go:76 +0x9c
go/types.representableConst({0x104c4ee58, 0x1050e4848}, 0x14000587600, 0x1051187c0, 0x14000421468)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/const.go:92 +0x138
go/types.(*Checker).representation(0x14000587600, 0x140011164c0, 0x1051187c0)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/const.go:256 +0x68
go/types.(*Checker).implicitTypeAndValue(0x14000587600, 0x140011164c0, {0x104c48c98, 0x140014fa150})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/expr.go:375 +0x304
go/types.(*Checker).assignment(0x14000587600, 0x140011164c0, {0x104c48c98, 0x140014fa150}, {0x1049c6aa3, 0x14})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/assignments.go:52 +0x23c
go/types.(*Checker).initConst(0x14000587600, 0x14000c7a660, 0x140011164c0)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/assignments.go:126 +0x274
go/types.(*Checker).constDecl(0x14000587600, 0x14000c7a660, {0x104c4b7f0, 0x140001ea840}, {0x104c4ccf0, 0x140012c61e0}, 0x0)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/decl.go:490 +0x250
go/types.(*Checker).objDecl(0x14000587600, {0x104c53ee0, 0x14000c7a660}, 0x0)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/decl.go:191 +0x84c
go/types.(*Checker).packageObjects(0x14000587600)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/resolver.go:693 +0x468
go/types.(*Checker).checkFiles(0x14000587600, {0x14001617bc8, 0x1, 0x1})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/check.go:408 +0x164
go/types.(*Checker).Files(...)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0x140003e3080, 0x140003fc740)
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:286 +0x2d8
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0x140003fc740)
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:99 +0x44
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0x140018d00f0, 0x140003fc740)
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:268 +0x304
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x50?)
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:262 +0x58
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 29
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:260 +0x230
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=0x2 addr=0x0 pc=0x1048b4b54]
goroutine 275 [running]:
go/types.(*Checker).handleBailout(0x1400066ac00, 0x140017e1d18)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/check.go:367 +0x9c
panic({0x104b7fa60?, 0x10510ff30?})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/runtime/panic.go:770 +0x124
go/types.(*StdSizes).Sizeof(0x0, {0x104c48c70, 0x1051187c0})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/sizes.go:228 +0x314
go/types.(*Config).sizeof(...)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/sizes.go:333
go/types.representableConst.func1({0x104c48c70?, 0x1051187c0?})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/const.go:76 +0x9c
go/types.representableConst({0x104c4ee58, 0x1050e4840}, 0x1400066ac00, 0x1051187c0, 0x0)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/const.go:92 +0x138
go/types.(*Checker).arrayLength(0x1400066ac00, {0x104c4d200, 0x140000ffb00?})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/typexpr.go:510 +0x238
go/types.(*Checker).typInternal(0x1400066ac00, {0x104c4b850, 0x1400069a7b0}, 0x0)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/typexpr.go:299 +0x3bc
go/types.(*Checker).definedType(0x1400066ac00, {0x104c4b850, 0x1400069a7b0}, 0x104338a5c?)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/typexpr.go:180 +0x2c
go/types.(*Checker).varType(0x1400066ac00, {0x104c4b850, 0x1400069a7b0})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/typexpr.go:145 +0x2c
go/types.(*Checker).structType(0x1400066ac00, 0x14001010090, 0x14001010090?)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/struct.go:113 +0x128
go/types.(*Checker).typInternal(0x1400066ac00, {0x104c4b7c0, 0x140000e0e88}, 0x140006c6dc0)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/typexpr.go:316 +0xed0
go/types.(*Checker).definedType(0x1400066ac00, {0x104c4b7c0, 0x140000e0e88}, 0x1049c30bc?)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/typexpr.go:180 +0x2c
go/types.(*Checker).typeDecl(0x1400066ac00, 0x140006c6dc0, 0x140000f77c0, 0x0)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/decl.go:615 +0x39c
go/types.(*Checker).objDecl(0x1400066ac00, {0x104c53d00, 0x140006c6dc0}, 0x0)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/decl.go:197 +0x880
go/types.(*Checker).packageObjects(0x1400066ac00)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/resolver.go:681 +0x3c0
go/types.(*Checker).checkFiles(0x1400066ac00, {0x140016369c0, 0x3, 0x3})
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/check.go:408 +0x164
go/types.(*Checker).Files(...)
/opt/homebrew/Cellar/go/1.22.4/libexec/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0x140003e3080, 0x140019e0c00)
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:286 +0x2d8
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0x140019e0c00)
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/loader.go:99 +0x44
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0x140018d00f0, 0x140019e0c00)
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:268 +0x304
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x14001592aa0?)
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:262 +0x58
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 30
/Users/francisco/go/pkg/mod/sigs.k8s.io/controller-tools@v0.9.2/pkg/loader/refs.go:260 +0x230
make: *** [generate] Error 2
Any help would be appreciated!
Alright, I got it. One must be very careful with the golang version that is being used. For kafka updating to the latest version has been enough for me.
To fix
go.mod
file in the operator
subdirectory (1.21)goenv install 1.21
(make sure you delete other golang version from your system)goen shell 1.21
to activate it in the terminalmake build-seldon-arm
command within the operator
dir/.../operator/bin
to your PATHseldon
Looks okay so far:
$ seldon
Usage:
seldon [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
config manage configs
experiment manage experiments
help Help about any command
load load resources
model manage models
pipeline manage pipelines
server manage servers
status status of a pipeline
unload unload resources
Flags:
-h, --help help for seldon
Describe the bug
Currently the V2 CLI isn't produced for ARM architectures, and therefore needs to be built locally (inlcuding for new M1 based Macs).
To reproduce
Follow the instructions to build the CLI locally here: https://docs.seldon.io/projects/seldon-core/en/v2.0.0/contents/getting-started/cli.html
Expected behaviour
The CLI should be buildable on M1 Macs. To accomplish this, upgrade the Kafka libs to 1.9.1 or higher: https://github.com/SeldonIO/seldon-core/blob/afb8678f31b1f0d734b9c2c49f9903fbd6a4aebc/operator/go.mod#L6
Environment