[ bug ] Fails to build on FreeBSD: undefined: OpenDevice
gmake build-static
Building bin/static/spire-server…
Building bin/static/spire-agent…
# github.com/google/go-tdx-guest/client
/home/yonas/go/pkg/mod/github.com/google/[email protected]/client/client.go:147:17: undefined: OpenDevice
gmake: *** [Makefile:291: bin/static/spire-agent] Error 1
OS: FreeBSD 14
go: 1.25.4 freebsd/amd64
commit: 9e5e3ab
Thank you @yonas for raising this. Unfortunately, we haven't done a good job at documenting what are the supported platforms of the project. We officially support linux-amd64, linux-arm64 and windows-amd64 platforms, not FreeBSD.
github.com/google/go-tdx-guest is an indirect dependency for the tpmdevid agent node attestor plugin. If you don't need this plugin, we could likely make SPIRE support building on FreeBSD. We will be happy to take a contribution that makes SPIRE build on FreeBSD, probably acknowledging that the tpmdevid agent node attestor plugin will not be available.
Thanks @amartinezfayo , I don't know if github.com/google/go-tdx-guest is required.
Unfortunately I don't know enough about these components to be suggesting to remove it, although my guess would be it isn't needed.
Looks like go-tdx-guest already has some support for building on platforms that it doesn't already support. Would it be possible for you to add something similar there for FreeBSD or make that macOS implementation be something that applies to any non-linux system. That project might be open to this since they already do something similar for Mac and Windows.
As long as you're not using the TPM plugin this shouldn't affect you in any way. We don't officially support FreeBSD, so we can't guarantee that it works there. If there are any other fixes needed on our side, we'd be open to fixing them if they don't involve too many OS specific changes.
Thanks, I'll let you know how it goes.