Go on OpenBSD

Go is available within the OpenBSD ports tree collection since OpenBSD 5.2. It is marked as i386- and amd64- only. See ports/lang/go for details.

OpenBSD releasegolang in ports
5.8 (Oct 18, 2015)go-1.4.2
5.7 (May 1, 2015)go-1.4.1
5.6 (Nov 1, 2014)go-1.3p0

Building from source.

Required:

Kernel versionMin. versionMax. version
5.8go1.4.1go1.6
5.7go1.4.1go1.6
5.6go1.4.1go1.6
  • ulimits (/etc/login.conf)

Edit /etc/login.conf so that the staff class has the proper settings. The following is a working example of the staff class:

staff:\
       :datasize-cur=infinity:\
       :datasize-max=infinity:\
       :datasize=infinity:\
       :openfiles-cur=4096:\
       :maxproc-max=512:\
       :maxproc-cur=512:\
       :ignorenologin:\
       :requirehome@:\
       :tc=default:

If the database file /etc/login.conf.db exists, you need to rebuild it with:

# cap_mkdb /etc/login.conf

Ensure that the user you intend to build Go with is in the staff login class:

# usermod -L staff your_username_here