foomo / simplecert

golang autocert library for letsencrypt
MIT License
212 stars 34 forks source link

Can't build for FreeBSD! #15

Closed blusewang closed 3 years ago

blusewang commented 3 years ago
CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -o https https_server.go
# github.com/lextoumbourou/goodhosts
../../../../.go/pkg/mod/github.com/lextoumbourou/goodhosts@v2.1.0+incompatible/goodhosts.go:108:36: undefined: eol
../../../../.go/pkg/mod/github.com/lextoumbourou/goodhosts@v2.1.0+incompatible/goodhosts.go:221:53: undefined: hostsFilePath
blusewang commented 3 years ago

So much more depend packages! Did it really so complicated?

dreadl0ck commented 3 years ago

I've updated the package that caused the error, try the latest version: https://github.com/foomo/simplecert/releases/tag/v1.8.1

With this version, I am able to cross compile the simplecert examples for FreeBSD.

$ cd examples/simple
$ GOOS=freebsd go build
$ file simple 
simple: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, Go BuildID=q_Fa8YXiDPoZDFRe4deB/XFF7cRC_yd-ZgcQ50SHq/VmvfZUj91GjkSRLYIJgn/SR2s0ux6yuoS25MGPDCI, not stripped
blusewang commented 3 years ago

@dreadl0ck thanks a lot!