blob: c51fb31a11c8af58410fd6618f724de50c73e16a [file] [log] [blame] [view]
Andrew Gerrand5bc444d2014-12-10 11:35:11 +11001# Go on OpenBSD
2
Constantine A. Murenin1beb25b2015-02-25 20:26:18 +00003Go is available within the OpenBSD ports tree collection since OpenBSD 5.2. It is marked as i386- and amd64- only. See [`ports/lang/go`](http://ports.su/lang/go) for details.
Constantine A. Mureninc2964ab2015-02-25 20:04:31 +00004
5| **OpenBSD release** | **golang in ports** |
6|:--------------------|:--------------------|
Dimitri Sokolyukec097922016-09-10 15:31:41 +02007| 6.0 (Sep 1, 2016) | go-1.6.3 |
Dimitri Sokolyukf0ac4272016-04-24 00:44:03 +02008| 5.9 (Mar 29, 2016) | go-1.5.4 |
Dimitri Sokolyuk6502da82015-10-19 17:15:00 +02009| 5.8 (Oct 18, 2015) | go-1.4.2 |
Jack Peirce67c88152015-05-07 20:20:37 -060010| 5.7 (May 1, 2015) | go-1.4.1 |
Constantine A. Murenin1beb25b2015-02-25 20:26:18 +000011| 5.6 (Nov 1, 2014) | go-1.3p0 |
Constantine A. Mureninc2964ab2015-02-25 20:04:31 +000012
Mikio Hara82de2872016-09-29 14:41:13 +090013## Building from source
Constantine A. Mureninc2964ab2015-02-25 20:04:31 +000014
Mikio Harac53c0cd2016-10-20 16:15:03 +090015| **Kernel version** | **Architectures** | **Initial support version** | **Final support version** |
16|:-------------------|:------------------|:----------------------------|:--------------------------|
Mikio Hara55554742016-12-12 16:42:45 +090017| 6.1 | amd64, arm, 386 | Go 1.8 | |
Mikio Hara914a3ca2016-10-22 18:36:04 +090018| 6.0 | amd64, 386 | Go 1.4.1 _*_ | |
Mikio Harac53c0cd2016-10-20 16:15:03 +090019| 6.0 | arm | Go 1.5 | |
Mikio Hara914a3ca2016-10-22 18:36:04 +090020| 5.9 | amd64, 386 | Go 1.4.1 _*_ | |
Mikio Harac53c0cd2016-10-20 16:15:03 +090021| 5.9 | arm | Go 1.5 | |
Mikio Hara794a45e2017-02-02 07:30:31 +090022| 5.6 through 5.8 | amd64, 386 | Go 1.4.1 _*_ | Go 1.7.5 |
Mikio Haraf2d63862017-01-27 06:37:52 +090023| 5.5 | amd64, 386 | Go 1.3 _*_ | Go 1.7.5 |
Mikio Harac53c0cd2016-10-20 16:15:03 +090024| 5.0 through 5.4 | amd64, 386 | Go 1 | Go 1.2.2 |
Mikio Haraddebc2c2016-09-29 16:31:41 +090025_*_ Go 1.5 or above is recommended.
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110026
Mikio Hara82de2872016-09-29 14:41:13 +090027## ulimits (` /etc/login.conf `)
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110028
Michael McConville8ccc3172016-01-13 23:39:29 -050029Edit `/etc/login.conf` so that the staff class has the proper
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110030settings. The following is a working example of the staff class:
31```
32staff:\
33 :datasize-cur=infinity:\
34 :datasize-max=infinity:\
35 :datasize=infinity:\
36 :openfiles-cur=4096:\
37 :maxproc-max=512:\
38 :maxproc-cur=512:\
39 :ignorenologin:\
40 :requirehome@:\
41 :tc=default:
42```
43
Michael McConvilleeee069b2016-01-13 23:36:43 -050044If the database file `/etc/login.conf.db` exists, you need to rebuild it with:
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110045```
46# cap_mkdb /etc/login.conf
47```
48
Michael McConville1abb1222016-01-13 23:41:10 -050049Ensure that the user you intend to build Go with is in the `staff` login class:
Andrew Gerrand5bc444d2014-12-10 11:35:11 +110050```
Michael McConville1abb1222016-01-13 23:41:10 -050051# usermod -L staff your_username_here
Michael McConville9d08e0a2016-01-13 23:17:38 -050052```