As promised a writeup on how to get syncthing to run on ARM with 64bit pagesize.
Assumed no existing install of go, instructions from scratch build.
% git clone https://go.googlesource.com/go $HOME/go1.4
% cd $HOME/go1.4
% git checkout release-branch.go1.4
% cd src/runtime
% vi arch_arm.h
Remove any conditional logic so that the variable PhysPageSize is set like the line below:
PhysPageSize = 65536,
Then save and quit with ā:wqā
% cd ..
% ./make.bash
Let it build and finish then we will install go 1.5
% git clone https://go.googlesource.com/go $HOME/go
% cd $HOME/go/src/runtime
% vi arch_arm.h
Again, remove any conditional logic so that the variable PhysPageSize is set like the line below:
PhysPageSize = 65536,
Then save and quit with ā:wqā
% cd ..
% env GOROOT_BOOTSTRAP=$HOME/go1.4 ./all.bash
Ensure that your paths are setup correctly
export GOROOT=$HOME/go
export GOPATH=$HOME/work
export PATH=$PATH:$GOPATH/bin
Next lets grab syncthing to our go path. Mine is ~/work
% mkdir -p ~/work/src/github.com/syncthing
% cd ~/work src/github.com/syncthing
% git clone https://github.com/syncthing/syncthing
% cd syncthing
Now letās build!
% go get -d ./cmd/syncthing
% env GOOS=linux GOARCH=arm GOARM=7 GOPATH=$HOME/work/src/github.com/syncthing/syncthing/Godeps/_workspace:$HOME/work go build -ldflags "-R 65536 -w -X main.Version=v0.12.0-beta0+101-ga32b66c -X main.BuildStamp=1442258191 -X main.BuildUser=ddubyat -X main.BuildHost=linux32box -X main.BuildEnv=default" ./cmd/syncthing
Now you should see synthing in the current directory, letās verify
% ls -al synthing
Now scp it over to your device and run it (use your own values where obvious)
% scp syncthing user@ip:/home/user
% ssh user@ip
% ./syncthing
If all went well you should see it startup in the foreground. To startup in background, refer to syncthing docs
Hope this helps someone out.
-Dustin