We should either do seperate builds for armv6 and armv7 or only do armv6. I tried to runny caddy on my Model B rasp-pi and it didn't work :(
runtime: this CPU has no VFPv3 floating point hardware, so it cannot run
this GOARM=7 binary. Recompile using GOARM=6.
Hm, I hadn't thought about that. Try this, I compiled it with GOARM=6. https://drive.google.com/file/d/0B-OxZ0LoeTvGUFdHSDFVOC00Znc/view?usp=sharing
Will check tomorrow
+1
Also, it's really not difficult or time consuming to build for arm on arm:
# Get prebuilt community go binaries from an Ubuntu / Debian ppa
wget https://xivilization.net/~marek/raspbian/xivilization-raspbian.gpg.key -O - | sudo apt-key add -
sudo wget https://xivilization.net/~marek/raspbian/xivilization-raspbian.list -O /etc/apt/sources.list.d/xivilization-raspbian.list
sudo aptitude update
sudo aptitude install golang
# Build caddy with go
export GOPATH=${HOME}/go
go get github.com/mholt/caddy
go build -o /usr/local/bin/caddy github.com/mholt/caddy
Note: You will need every last drop of the 240MiB RAM that a RPi has to offer to download and compile.
There need to be several links to arm builds and you can't cross compile. Cross-compiling is for noobs.
Raspberry Pi armv6l hard floating point
https://dropsha.re/files/funny-bat-22/caddy-armv6l-hf
P.S. I can help setup a raspberry pi for automatic builds.
Thought for the file structure:
https://caddyserver.com/dist/v0.7.1/armv6l-hf/caddy
For the easy-install script we don't want to have to unzip or gunzip or whatever. Just want it to work like magic.
@coolaj86 I don't remember, did we try GOARM=5 when I was there? Could you see if GOOS=linux GOARCH=arm GOARM=5 go build works on the RPi?
We did that, it didn't work.
Another reason to to try to cross compile:
I'm telling you, cross-compiling is a red herring. Always native compile. Always.
Well, cross-compilation in Go is fine as long as the processor instructions are correct. Those issues are related to shared libraries, whereas Caddy is completely self-contained (edit: that's not entirely true, a fix to the build server will come out this week I hope). But it does seem there is an issue with the floating point instructions from cross-compilation right now. Still looking into this.
Hm. I don't seem to have this problem anymore -- or at least, x-compile builds now work on my RasPi using both GOARM=6 and leaving GOARM blank.
this app so does not work on Raspberry Pi
Nginx = sudo apt-get install and it works
This app = fool around for an hour -> nothing
@hinst It works fine on RPi; for example: https://caddyserver.com/download/build?os=linux&arch=arm&arm=6&features=
For me, here's what I did on my laptop (running Mate 17.2):
cd ~/go # my GOPATH
go get github.com/mholt/caddy/caddy
cd src/github.com/mholt/caddy/caddy
env GOOS=linux GOARCH=arm GOARM=6 go build -o ~/go/bin/caddy.arm6
cd into the 'second' caddy folder - rather than figure out why, I just went with what worked at this timeBuild-time: under 2 minutes (maybe less-than 1... I was doing something else, too)
This put the executable caddy.arm6 in my ~/go/bin folder. I copied this over to my Raspberry Pi B+ (arm6 based) and started it. Works with no problems (to-date).
In case that help.
@hinst i am afraid your going to have to share more than that.
Most helpful comment
this app so does not work on Raspberry Pi
Nginx = sudo apt-get install and it works
This app = fool around for an hour -> nothing