Clone wiki

goios / Home

Welcome to the goios wiki!

How to run Go tip (1.5+) arm64 port all.bash on jailbroken iDevice:

Due to circular dependencies, you have to build runtime/cgo on another machine.

you also need to apply some patches to cmd/dist and cmd/internal/ld:

I assume you have a native toolchain in ~/iossdk (you can get one native SDK here: and a bootstrap version of Go 1.4 in ~/go1.4 (the arm port can still be built using internal linking, thus without the circular dependency issues, use commit ff1a23f3683a8ea0636f5510f929269409f5221a, or tag go1.4+-ios for that).

On desktop darwin machine:

$ ./make.bash # make sure to use the same commit as the iOS device
$ CGO_ENABLED=1 CC=`pwd`/../misc/ios/ GOARCH=arm64 ../bin/go install -v -a runtime/cgo
$ git clone go.git
$ cd go.git/src
$ curl | patch -p2
$ PATH=~/iossdk/usr/bin/:$PATH /usr/bin/time ./all.bash

When all.bash has started to compile runtime, run the following on the desktop Darwin to copy the runtime/cgo.a to idevice:

# still under $GOROOT/src
$ ssh ipadmini mkdir -p go.git/pkg/darwin_arm64/runtime && scp ../pkg/darwin_arm64/runtime/cgo.a ipadmini:go.git/pkg/darwin_arm64/runtime/