buffrr / letsdane

🔒 Let's DANE is an experimental way to enable the use of DANE/TLSA in browsers and other apps using a lightweight proxy.
Apache License 2.0
111 stars 11 forks source link

Build Failure in *BSD #7

Closed micadeyeye closed 3 years ago

micadeyeye commented 3 years ago

The below is an effort to build letsdane in FreeBSD.

letsdane/cmd/letsdane # go build -tags unbound

github.com/miekg/unbound

/go/pkg/mod/github.com/miekg/unbound@v0.0.0-20180419064740-e2b53b2dbcba/unbound.go:36:10: fatal error: 'unbound.h' file not found

include

     ^~~~~~~~~~~

1 error generated. /letsdane/cmd/letsdane # locate unbound. /usr/local/lib/libunbound.a /usr/local/include/unbound.h /usr/local/lib/libunbound.so ...... ...... ......

Any suggestions on how to point at the location of the unbound.h? Thanks for your prompt response to the "IP_Addr:Port" issue. If you would want to include it in the README in addition to the "-r" and referral to the help, that would be clearer.

buffrr commented 3 years ago

If you have unbound installed on freebsd, assuming the library path is /usr/local/lib and include path is /usr/local/include. You should be able to build it this way:

CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" go build -tags unbound

let me know if this works for you

micadeyeye commented 3 years ago

env CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" go build -tags unbound

"Env" should be before it. Thanks.