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

feat: support platforms other than Linux #26

Open
johnstcn opened this issue Aug 9, 2024 · 2 comments
Open

feat: support platforms other than Linux #26

johnstcn opened this issue Aug 9, 2024 · 2 comments

Comments

@johnstcn
Copy link
Member

johnstcn commented Aug 9, 2024

This provider currently only builds for GOOS=linux:

GOOS=darwin CGO_ENABLED=0 go build .
# github.com/docker/docker/volume/mounts
../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/volume/mounts/mounts.go:187:30: undefined: safepath.Join
# github.com/GoogleContainerTools/kaniko/pkg/snapshot
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/snapshot/snapshot.go:182:39: undefined: unix.SYS_SYNCFS
# github.com/docker/docker/libcontainerd/types
../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/libcontainerd/types/types.go:88:31: undefined: Stats
../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/libcontainerd/types/types.go:91:34: undefined: Summary
../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/libcontainerd/types/types.go:98:50: undefined: Resources
# github.com/coder/envbuilder/internal/ebutil
../../../go/pkg/mod/github.com/coder/[email protected]/internal/ebutil/remount.go:151:47: undefined: syscall.MS_BIND
../../../go/pkg/mod/github.com/coder/[email protected]/internal/ebutil/remount.go:189:17: undefined: syscall.Mount
$ GOOS=windows CGO_ENABLED=0 go build .
# github.com/coder/envbuilder/devcontainer
../../../go/pkg/mod/github.com/coder/[email protected]/devcontainer/script.go:88:4: unknown field Credential in struct literal of type syscall.SysProcAttr
../../../go/pkg/mod/github.com/coder/[email protected]/devcontainer/script.go:88:25: undefined: syscall.Credential
../../../go/pkg/mod/github.com/coder/[email protected]/devcontainer/script.go:100:24: undefined: syscall.ForkExec
../../../go/pkg/mod/github.com/coder/[email protected]/devcontainer/script.go:116:24: undefined: syscall.ForkExec
# github.com/GoogleContainerTools/kaniko/pkg/util
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/syscall_credentials.go:29:51: undefined: syscall.Credential
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/syscall_credentials.go:44:17: undefined: groupIDs
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/syscall_credentials.go:64:18: undefined: syscall.Credential
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/tar_util.go:241:46: undefined: syscall.Stat_t
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/fs_util.go:667:37: undefined: syscall.Stat_t
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/fs_util.go:767:34: undefined: syscall.Stat_t
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/fs_util.go:770:34: undefined: syscall.Stat_t
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/fs_util.go:1145:32: undefined: syscall.Stat_t
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/fs_util.go:1330:30: undefined: syscall.Stat_t
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/fs_util.go:1332:30: undefined: syscall.Stat_t
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/syscall_credentials.go:64:18: too many errors
# github.com/coder/envbuilder/internal/ebutil
../../../go/pkg/mod/github.com/coder/[email protected]/internal/ebutil/remount.go:151:47: undefined: syscall.MS_BIND
../../../go/pkg/mod/github.com/coder/[email protected]/internal/ebutil/remount.go:189:17: undefined: syscall.Mount
../../../go/pkg/mod/github.com/coder/[email protected]/internal/ebutil/remount.go:193:17: undefined: syscall.Unmount
$ GOOS=freebsd CGO_ENABLED=0 go build .
# github.com/docker/docker/volume/mounts
../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/volume/mounts/mounts.go:187:30: undefined: safepath.Join
# github.com/docker/docker/libcontainerd/types
../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/libcontainerd/types/types.go:88:31: undefined: Stats
../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/libcontainerd/types/types.go:91:34: undefined: Summary
../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/libcontainerd/types/types.go:98:50: undefined: Resources
# github.com/docker/docker/daemon/graphdriver
../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/daemon/graphdriver/driver_freebsd.go:15:38: cannot use &buf (value of type *"golang.org/x/sys/unix".Statfs_t) as *syscall.Statfs_t value in argument to syscall.Statfs
# github.com/GoogleContainerTools/kaniko/pkg/util
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/syscall_credentials.go:44:17: undefined: groupIDs
../../../go/pkg/mod/github.com/coder/[email protected]/pkg/util/util.go:255:29: undefined: unix.ENODATA
# github.com/coder/envbuilder/internal/ebutil
../../../go/pkg/mod/github.com/coder/[email protected]/internal/ebutil/remount.go:151:47: undefined: syscall.MS_BIND
../../../go/pkg/mod/github.com/coder/[email protected]/internal/ebutil/remount.go:189:17: undefined: syscall.Mount
@matifali
Copy link
Member

Does it mean it can't be used if Terraform runs on a macOS or Windows provider?

@johnstcn
Copy link
Member Author

johnstcn commented Aug 16, 2024

Yes, the provider binary currently cannot be compiled on macOS or Windows so it will not be usable on those platforms unless Terraform is run in a VM.

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