Sorry, again, but my best guess is now that the reference is still FreeBSD 12 and I am just to far ahead with anything beyond FreeBSD 12…as we are at 14.1 and counting.
This is kind of mentioned in this issue: https://github.com/golang/go/issues/54355 „FreeBSD 12.4 reaches its EOL date on 31st December. Hopefully, switching the reference branch to stable/13 in the New Year will also pick up the constants for netlink which was merged into stable/13 and is present in FreeBSD 13.2 and later.“ > Am 06.09.2024 um 16:41 schrieb Martin Stiemerling <mstiemerl...@gmail.com>: > > Hi again, > > I just wanted to get back to this and probably ask somebody out of the go > core team, if you guys have recently used the mkall.sh script under > src/syscall for freebsd/amd64? > > I guess my problems start already there, as running this on a fresh master > already and building go it starts complaining :-) > > Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1. > /home/mls/goworks/src/syscall/ztypes_freebsd_amd64.go:285:15: undefined: > _cgopackage > /home/mls/goworks/src/syscall/syscall_freebsd_amd64.go:18:4: k.Ident > undefined (type *Kevent_t has no field or method Ident) > /home/mls/goworks/src/syscall/syscall_freebsd_amd64.go:19:4: k.Filter > undefined (type *Kevent_t has no field or method Filter) > /home/mls/goworks/src/syscall/syscall_freebsd_amd64.go:20:4: k.Flags > undefined (type *Kevent_t has no field or method Flags) > > This is due to > type Kevent_t C.struct_kevent_freebsd11 > > not having a counterpart, as it it should be > type Kevent_t C.struct_freebsd11_kevent > > As there is only > /usr/include/sys/event.h:struct freebsd11_kevent > > Anyhow, I am be completely wrong. > > However, after changing to type Kevent_t C.struct_freebsd11_kevent, the build > process stops after "Building Go toolchain2 using go_bootstrap and Go > toolchain1“. > > > Thanks in advance, > > Martin > >> Am 03.09.2024 um 16:39 schrieb Martin Stiemerling <mstiemerl...@gmail.com>: >> >> Hi all, >> >> FreeBSD has since a while also support for the netlink facility, similar to >> Linux. For Linux there is support in go via the syscall pkg for working with >> Linux's netlink, but not yet for FreeBSD >> >> I have started to add the FreeBSD part to go's syscall package and fixed >> some errors, but run into troubles when compiling go. Though my approach is >> by now copying a lot form syscall_linux, as a first naive approach. :-) >> >> When using make.bash these steps work: >> Building Go cmd/dist using /usr/local/go122. (go1.22.6 freebsd/amd64) >> Building Go toolchain1 using /usr/local/go122. >> Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1 >> >> However, after "Building Go toolchain2 using go_bootstrap and Go toolchain1" >> this error turns out:"go: cannot find GOROOT directory: /home/mls/goworks >> go tool dist: FAILED: /home/mls/goworks/pkg/tool/freebsd_amd64/go_bootstrap >> install -pgo=off cmd/asm cmd/cgo cmd/compile cmd/link cmd/preprofile: exit >> status 2" >> >> The changed go code is available here: >> https://code.fbi.h-da.de/m.stiemerling/go/-/tree/freebsd-netlink >> >> Compiling directly from go's git master branch succeeds, so I have managed >> to break something in my part. However, I have not found, other than >> make.bash -v, to get any further info or error message what is wrong. >> >> Does anybody have a hint to get more or better infos during the build >> process why it fails? >> >> go env below! >> >> Thanks, >> >> Martin >> >> GO111MODULE='on' >> GOARCH='amd64' >> GOBIN='' >> GOCACHE='/home/mls/.cache/go-build' >> GOENV='/home/mls/.config/go/env' >> GOEXE='' >> GOEXPERIMENT='' >> GOFLAGS='' >> GOHOSTARCH='amd64' >> GOHOSTOS='freebsd' >> GOINSECURE='' >> GOMODCACHE='/home/mls/go/pkg/mod' >> GONOPROXY='' >> GONOSUMDB='' >> GOOS='freebsd' >> GOPATH='/home/mls/go' >> GOPRIVATE='' >> GOPROXY='https://proxy.golang.org,direct' >> GOROOT='/usr/local/go122' >> GOSUMDB='sum.golang.org' >> GOTMPDIR='' >> GOTOOLCHAIN='auto' >> GOTOOLDIR='/usr/local/go122/pkg/tool/freebsd_amd64' >> GOVCS='' >> GOVERSION='go1.22.6' >> GCCGO='gccgo' >> GOAMD64='v1' >> AR='ar' >> CC='cc' >> CXX='clang++' >> CGO_ENABLED='1' >> GOMOD='/home/mls/goworks/src/go.mod' >> GOWORK='' >> CGO_CFLAGS='-O2 -g' >> CGO_CPPFLAGS='' >> CGO_CXXFLAGS='-O2 -g' >> CGO_FFLAGS='-O2 -g' >> CGO_LDFLAGS='-O2 -g' >> PKG_CONFIG='pkg-config' >> GOGCCFLAGS='-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments >> -Wl,--no-gc-sections -fmessage-length=0 >> -ffile-prefix-map=/tmp/go-build3067957388=/tmp/go-build >> -gno-record-gcc-switches' >> >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/E66CC0BC-F5A3-4FD8-8345-600424E7BA01%40gmail.com.