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

all: add support for FreeBSD 12 #22447

Closed
mikioh opened this issue Oct 26, 2017 · 9 comments
Closed

all: add support for FreeBSD 12 #22447

mikioh opened this issue Oct 26, 2017 · 9 comments

Comments

@mikioh
Copy link
Contributor

mikioh commented Oct 26, 2017

This is a meta bug for tracking the status of the issues for supporting FreeBSD 12. FreeBSD 12, which will be released in CY18, will contain a few breaking changes on ABI and a few packages in standard library (and probably x/sys/unix repository) need to find out some good way to fill the ABI gap between FreeBSD 11 or below and FreeBSD 12 or above.

@mikioh mikioh added this to the Unplanned milestone Oct 26, 2017
@SylvainGarrigues
Copy link

SylvainGarrigues commented Apr 5, 2018

I compiled successfully Go 1.10 on FreeBSD 12 / arm. Basic programs seem to work for me: is there anything notably broken?

@mikioh
Copy link
Contributor Author

mikioh commented Apr 20, 2018

@SylvainGarrigues,

I don't know the detail of your basic program and your kernel configuration. See #22448. What happens when the kernel is built without a series of compat flags such as WANT_FREEBSD11_DIRENT?

steffenfritz added a commit to steffenfritz/verwalter that referenced this issue Aug 2, 2018
Added Travis CI: Golang v1.7 is tested due to FreeBSDs problem with 1.10: golang/go#22447
@paulzhol
Copy link
Member

paulzhol commented Sep 23, 2018

I think it's safe not to switch to the new APIs and require COMPAT_FREEBSD11, at least not while we also support FreeBSD 10.x and 11.x.
I'm particularly worried about this:
https://svnweb.freebsd.org/base?view=revision&revision=320043
Unlike the 64-bit inode ABI change, Kevent (keventt) is used directly in the runtime netpoller. And while 64-bit inodes can be used by applications working on large filesystems and can work in backward-compatible mode (limited to golang.org/x/sys/unix), the runtime won't benefit from the new kevent API.

Rust are explicitly linking to the old symbol versions to handle the FreeBSD 12 changes:
rust-lang/libc@78f9322
rust-lang/libc@969ad2b

Also note that all the ARM kernel configs, even ARMv4/5 which we don't even support - have COMPAT_FREEBSD10 and COMPAT_FREEBSD11 enabled.
(COMPAT_FREEBSD10 is just for pipe, and @tklauser switched all the BSDs to pipe2 recently).

options 	COMPAT_FREEBSD10	# Compatible with FreeBSD10
options 	COMPAT_FREEBSD11	# Compatible with FreeBSD11

https://github.com/freebsd/freebsd/blob/75c7e3b2102b9ecddae188b1c7b60057f87ffdd3/sys/arm/conf/std.arm#L5-L6
https://github.com/freebsd/freebsd/blob/75c7e3b2102b9ecddae188b1c7b60057f87ffdd3/sys/arm/conf/std.armv6#L50-L51
https://github.com/freebsd/freebsd/blob/75c7e3b2102b9ecddae188b1c7b60057f87ffdd3/sys/arm/conf/std.armv7#L50-L51

Unlike the amd64 GENERIC kernel, which has all COMPAT_* options turned on:

options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
options 	COMPAT_FREEBSD9		# Compatible with FreeBSD9
options 	COMPAT_FREEBSD10	# Compatible with FreeBSD10
options 	COMPAT_FREEBSD11	# Compatible with FreeBSD11

https://github.com/freebsd/freebsd/blob/75c7e3b2102b9ecddae188b1c7b60057f87ffdd3/sys/amd64/conf/GENERIC#L59-L66

@mikioh
Copy link
Contributor Author

mikioh commented Oct 2, 2018

@paulzhol,

Can you please file a separate issue for your concern about kevent?

@paulzhol
Copy link
Member

paulzhol commented Oct 3, 2018

@mikioh I don't think there's a need for another issue, core doesn't use EVFILT_TIMER so the new absolute timer API won't be used anyhow. We can continue using to the current (COMPAT_FREEBSD11) sysnum on all versions.

@mikioh
Copy link
Contributor Author

mikioh commented Nov 7, 2018

@paulzhol,

Would you mind adding a note to doc/go1.12.html (and detailed information in https://github.com/golang/go/wiki/FreeBSD) to clarify the requirements for running Go 1.x on FreeBSD 12-STABLE kernels?

@paulzhol
Copy link
Member

paulzhol commented Nov 10, 2018

@mikioh I've updated the wiki. I see there's a syscall section in doc/go1.12.html (autogenerated?) from Brad's 'RELNOTE=FreeBSD breakages in syscall, use build tags' comment in the CL. I'll update it as well.

@mikioh
Copy link
Contributor Author

mikioh commented Jan 7, 2019

I've checked the network subsystem code of 12-STABLE and found no sign of ABI breaking changes. So it's fine to close this issue (w/ explicit limitations such as requiring COMPAT_SOMETHING) once #22448 is fixed.

PS: The fix for #28896 in Go 1.12 might frighten auto-generated code, but it's fine.

@gopherbot
Copy link

gopherbot commented Feb 1, 2019

Change https://golang.org/cl/160778 mentions this issue: doc: go1.12: document FreeBSD 12.0 requires COMPAT_FREEBSD11

nebulabox pushed a commit to nebulabox/go that referenced this issue Feb 18, 2019
Fixes golang#22447
Fixes golang#22448

Change-Id: Ia24f42c31e014c79040ff927f1247dfb2318de4f
Reviewed-on: https://go-review.googlesource.com/c/160778
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
nebulabox pushed a commit to nebulabox/go that referenced this issue Feb 20, 2019
Fixes golang#22447
Fixes golang#22448

Change-Id: Ia24f42c31e014c79040ff927f1247dfb2318de4f
Reviewed-on: https://go-review.googlesource.com/c/160778
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
@golang golang locked and limited conversation to collaborators Feb 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants