-
Notifications
You must be signed in to change notification settings - Fork 871
Cannot compile for FreeBSD #4516
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
Comments
It seems like this would require some relatively significant changes. Do you need to run on FreeBSD? |
yep |
Is this for your homelab or at work btw @unknowndevQwQ? Would love to know more about your particular use case. Are you provisioning freebsd infrastructure or are you wanting to run the coder portal on freebsd. |
I spun up a FreeBSD virtual machine to dig a little deeper - here are my notes:
$ pkg update -f
$ pkg install git
$ git clone https://github.com/coder/coder.git --recursive
$ pkg install bash getopt docker docker-machine go shfmt node nfpm zstd pkgconf pixman cairo pango
$ cd /usr/ports/textproc/hs-pandoc/ && make install clean
go: downloading github.com/gobwas/glob v0.2.3
go: downloading github.com/tchap/go-patricia/v2 v2.3.1
go: downloading github.com/yashtewari/glob-intersection v0.1.0
go: downloading github.com/mitchellh/go-ps v1.0.0
go: downloading github.com/bep/godartsass v0.14.0
go: downloading github.com/bep/golibsass v1.1.0
go: downloading github.com/tdewolff/parse/v2 v2.6.4
go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
go: downloading github.com/google/go-cmp v0.5.9
go: downloading github.com/x448/float16 v0.8.4
go: downloading filippo.io/edwards25519 v1.0.0-rc.1
go: downloading github.com/agnivade/levenshtein v1.1.1
# github.com/u-root/u-root/pkg/termios
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/sgtty_unix.go:13:20: undefined: unix.TCGETS
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/sgtty_unix.go:14:20: undefined: unix.TCSETS
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/termios.go:33:10: undefined: TTYIO
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/termios.go:39:9: undefined: MakeRaw
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/termios.go:48:10: undefined: TTYIO
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/termios.go:71:10: undefined: TTYIO
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/termios.go:75:10: undefined: TTYIO
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/var_unix.go:42:38: undefined: syscall.IUTF8
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/var_unix.go:50:37: undefined: syscall.OFILL
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/var_unix.go:51:37: undefined: syscall.OFDEL
/root/go/pkg/mod/github.com/u-root/u-root@v0.10.0/pkg/termios/termios.go:39:9: too many errors
# github.com/godbus/dbus/v5
/root/go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/transport_unix.go:52:10: cannot use t (variable of type *unixTransport) as type transport in return statement:
*unixTransport does not implement transport (missing SendNullByte method)
/root/go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/transport_unix.go:58:10: cannot use t (variable of type *unixTransport) as type transport in return statement:
*unixTransport does not implement transport (missing SendNullByte method) |
This comment was marked as outdated.
This comment was marked as outdated.
Hi Geoffrey, This looks like: godbus/dbus#237 See Also:
See Also Also:
@guelfey may be able to provide advice for the best path to resolve, cc @buglloc and our @dfr (working on godbus/dbus#332) |
@ghuntley Hey just curious, what does your rc.conf file look like for the FreeBSD machine? Edit: |
|
godbus/dbus#332 was merged recently - I don't know
how the dbus release process works but it should be in the next one.
…On Tue, 8 Nov 2022 at 05:50, Geoffrey Huntley ***@***.***> wrote:
@ghuntley <https://github.com/ghuntley> Hey just curious, what does your
rc.conf file look like for the FreeBSD machine?
👋 @gjake1337 <https://github.com/gjake1337>
***@***.***:~ # pkg install dbus
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 3 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
dbus: 1.14.4,1
libICE: 1.0.10,1
libSM: 1.2.3,1
Number of packages to be installed: 3
The process will require 2 MiB more space.
499 KiB to be downloaded.
Proceed with this action? [y/N]: y
[1/3] Fetching dbus-1.14.4,1.pkg: 100% 383 KiB 392.2kB/s 00:01
[2/3] Fetching libICE-1.0.10,1.pkg: 100% 92 KiB 94.5kB/s 00:01
[3/3] Fetching libSM-1.2.3,1.pkg: 100% 24 KiB 24.2kB/s 00:01
Checking integrity... done (0 conflicting)
[1/3] Installing libICE-1.0.10,1...
[1/3] Extracting libICE-1.0.10,1: 100%
[2/3] Installing libSM-1.2.3,1...
[2/3] Extracting libSM-1.2.3,1: 100%
[3/3] Installing dbus-1.14.4,1...
===> Creating groups.
Creating group 'messagebus' with gid '556'.
===> Creating users
Creating user 'messagebus' with uid '556'.
[3/3] Extracting dbus-1.14.4,1: 100%
***@***.***:/coder # cat /etc/rc.conf
hostname="freebsd"
ifconfig_vtnet0="DHCP"
ifconfig_vtnet0_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dbus_enable="YES"
***@***.***:/coder # service dbus start
Starting dbus.
***@***.***:/coder # scripts/build_go.sh --os freebsd --arch amd64 --agpl
# github.com/u-root/u-root/pkg/termios
***@***.***/pkg/termios/sgtty_unix.go:13:20: undefined: unix.TCGETS
***@***.***/pkg/termios/sgtty_unix.go:14:20: undefined: unix.TCSETS
***@***.***/pkg/termios/termios.go:33:10: undefined: TTYIO
***@***.***/pkg/termios/termios.go:39:9: undefined: MakeRaw
***@***.***/pkg/termios/termios.go:48:10: undefined: TTYIO
***@***.***/pkg/termios/termios.go:71:10: undefined: TTYIO
***@***.***/pkg/termios/termios.go:75:10: undefined: TTYIO
***@***.***/pkg/termios/var_unix.go:42:38: undefined: syscall.IUTF8
***@***.***/pkg/termios/var_unix.go:50:37: undefined: syscall.OFILL
***@***.***/pkg/termios/var_unix.go:51:37: undefined: syscall.OFDEL
***@***.***/pkg/termios/termios.go:39:9: too many errors
# github.com/godbus/dbus/v5
***@***.***/transport_unix.go:52:10: cannot use t (variable of type *unixTransport) as type transport in return statement:
*unixTransport does not implement transport (missing SendNullByte method)
***@***.***/transport_unix.go:58:10: cannot use t (variable of type *unixTransport) as type transport in return statement:
*unixTransport does not implement transport (missing SendNullByte method)
—
Reply to this email directly, view it on GitHub
<#4516 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABOTJMX3DI3UXKR2JAPS7DWHHS2TANCNFSM6AAAAAARDMWKG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
homelab
Run coder on freebsd and try to connect to freebsd using vscode remote via coder |
Some updates
Thanks to https://twitter.com/koobs aka @koobs we have been able to get a binary to compile. It's the weekend rn so later can explore topics of validation if there's anything else left to do. |
Note also the build is all from sources (no packages for dependencies), so we're a step ahead of a future FreeBSD Port/Package Edit: (2022-11-14) Patch link above is temporarily unavailable. Had a little power outage last night causing a zfs import issue. |
Hey all! Please find attached a patch set adding FreeBSD support to Coder. Apologies for the patch set over a PR, as I lost my local dev environment configurations to filesystem failure. Apologies also for the *.txt filenames, but GitHub doesn't allow *.patch files currently :) 0001-Update-godbus-dependency-to-latest.txt This has been tested from deployment setup using a local PostgreSQL (15) server, through to |
Coder fails to build [1] on FreeBSD: transport_unix.go:52:10: cannot use t (variable of type *unixTransport) as type transport in return statement: *unixTransport does not implement transport (missing SendNullByte method) Update godbus dependency to latest, post upstream PR #332 [2] via #237 Fixes: #4516 [1] #4516 [2] godbus/dbus#332 [3] godbus/dbus#237
`./scripts/build_go.sh --os freebsd` fails to build with the following (unique) errors: termios/sgtty_unix.go:13:20: undefined: unix.TCGETS termios/termios.go:33:10: undefined: TTYIO termios/termios.go:39:9: undefined: MakeRaw termios/var_unix.go:42:38: undefined: syscall.IUTF8 termios/var_unix.go:50:37: undefined: syscall.OFILL termios/var_unix.go:51:37: undefined: syscall.OFDEL This was resolved upstream in u-root/u-root/pull/2544 [1] via tailscale/tailscale/pull/6155 [2] in u-root/u-root/commit/18fd0ce36 [3] Update termios (u-root) dependency to a commit just past that change. [1] u-root/u-root#2544 [2] tailscale/tailscale#6155 [3] u-root/u-root@18fd0ce36 Fixes: #4516
`./scripts/build_go.sh --os freebsd` fails to build with the following (unique) errors: cli/schedule.go:223:19: undefined: tz.TimezoneIANA cli/util.go:116:17: undefined: tz.TimezoneIANA coderd/util/tz currently contains per-OS implementions (one file per supported OS), but is missing a tz_freebsd.go. Follow the existing pattern by creating a tz_freebsd.go from tz_linux.go. FreeBSD supports standard IANA zoneinfo (and /etc/localtime), so no other changes are required. Fixes: #4516
This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity. |
Unstale |
Hi @koobs, Feel free to submit a PR. |
@matifali Please reopen this issue, it has not yet been resolved. |
We have no plans to do this ourselves but we're open to PRs from the community, I'm closing this as not planned for now |
Why not keep this issue open? |
We're trying to keep the issue tracker focused so that it is easier for us to address the features and enhancements in the short and medium term. It doesn't appear as if there's been a lot of interest from the community since this was opened roughly a year and a half ago, but if that changes I'll happily open it back up and see where we can fit it in. |
coder currently has no binaries for freebsd, tried to compile one but got an error
Steps to reproduce
git clone github.com/coder/coder
(commit abf14d9)scripts/build_go.sh --os freebsd --arch amd64 --agpl
output:
The text was updated successfully, but these errors were encountered: