Can't install stork on Openbsd
Hello,
Last year I participated on this topic #193 (closed)
I'm reinstalling my DNS server on Openbsd and can't build the stork agent
# rake32 build:agent --trace
ERROR: Unknown/unsupported architecture: amd64
rake aborted!
/home/mikael/stork/rakelib/00_init.rake:509:in `<top (required)>'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/rake_module.rb:29:in `load_rakefile'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/default_loader.rb:11:in `load'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/application.rb:788:in `load_imports'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/application.rb:718:in `raw_load_rakefile'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/application.rb:104:in `block in load_rakefile'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/application.rb:103:in `load_rakefile'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/application.rb:82:in `block in run'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/usr/local/lib/ruby/gems/3.2/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake32:25:in `load'
/usr/local/bin/rake32:25:in `<main>'
My system is like this
# uname -a
OpenBSD machinename.domain.org 7.4 GENERIC.MP#0 amd64
So I when to rakelib/00_init.rake line 501 and added a switch for "when "amd64"
uname_arch=`uname -m`
case uname_arch.rstrip
when "x86_64"
ARCH="amd64"
when "amd64"
ARCH="amd64"
when "aarch64_be", "aarch64", "armv8b", "armv8l"
ARCH="arm64"
else
puts "ERROR: Unknown/unsupported architecture: #{uname_arch}"
fail
end
Then it works
Also, why is it trying to download protoc or protobug although it's already installed on my system
# pkg_info | grep protobuf
protobuf-3.21.12p0 c++ protocol buffers
# rake32 build:agent
/usr/local/bin/go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0
/usr/local/bin/protoc-gen-go --version
protoc-gen-go v1.31.0
/usr/local/bin/go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
go: downloading google.golang.org/grpc v1.3.0
go: downloading google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
go: downloading google.golang.org/protobuf v1.28.1
/usr/local/bin/protoc-gen-go-grpc --version
protoc-gen-go-grpc 1.3.0
/usr/local/bin/protoc --proto_path=. --go_out=. --go-grpc_out=. agent.proto
/usr/local/bin/go build -ldflags=-X 'isc.org/stork.BuildDate=2023-11-26 14:25'
go: downloading github.com/urfave/cli/v2 v2.25.7
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/russross/blackfriday/v2 v2.1.0
Stork Code Gen build date: 2023-11-26 14:25 (timestamp: 231126142545)
backend/cmd/stork-code-gen/stork-code-gen std-option-defs --input codegen/std_dhcpv4_option_def.json --output backend/appcfg/kea/stdoptiondef4.go --template backend/appcfg/kea/stdoptiondef4.go.template
/usr/local/bin/go fmt ./appcfg/kea/...
go: downloading muzzammil.xyz/jsonc v1.0.0
go: downloading github.com/apparentlymart/go-cidr v1.1.0
go: downloading github.com/sirupsen/logrus v1.9.3
go: downloading golang.org/x/term v0.12.0
go: downloading golang.org/x/sys v0.12.0
appcfg/kea/stdoptiondef4.go
backend/cmd/stork-code-gen/stork-code-gen std-option-defs --input codegen/std_dhcpv6_option_def.json --output backend/appcfg/kea/stdoptiondef6.go --template backend/appcfg/kea/stdoptiondef6.go.template
/usr/local/bin/go fmt ./appcfg/kea/...
appcfg/kea/stdoptiondef6.go
/usr/local/bin/go build -ldflags=-X 'isc.org/stork.BuildDate=2023-11-26 14:25'
go: downloading github.com/Showmax/go-fqdn v1.0.0
go: downloading github.com/prometheus/client_golang v1.16.0
go: downloading github.com/prometheus/common v0.44.0
go: downloading github.com/shirou/gopsutil v3.21.11+incompatible
go: downloading google.golang.org/grpc v1.58.2
go: downloading google.golang.org/grpc/security/advancedtls v0.0.0-20230925230705-147bd8591213
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.2.0
go: downloading github.com/prometheus/client_model v0.4.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading golang.org/x/net v0.15.0
go: downloading golang.org/x/crypto v0.13.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.4
go: downloading github.com/tklauser/go-sysconf v0.3.12
go: downloading github.com/golang/protobuf v1.5.3
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13
go: downloading golang.org/x/text v0.13.0
touch -c backend/cmd/stork-agent/stork-agent
Stork Agent build date: 2023-11-26 14:25 (timestamp: 231126142545)
Thank you