[aarch64] Error making: caddy with gandiv5 dns plugin

(Pixys) #1

Hello,

I am trying to build the last stable version of caddy (1.0.0) on an Arch Linux arm64 platform.
The pkgbuild file is this one: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=caddy

But the build always fails when I activate the tls.dns.gandiv5 plugin. It works without.

I don’t know where to look to get additional logs.

Parsing meta tags from https://cloud.google.com/go?go-get=1 (status code 200)
get "cloud.google.com/go": found meta tag get.metaImport{Prefix:"cloud.google.com/go", VCS:"git", RepoRoot:"https://code.googlesource.com/gocloud"} at https://cloud.google.com/go?go-get=1
go: finding cloud.google.com/go v0.34.0
go: error loading module requirements
==> ERROR: A failure occurred in build().
    Aborting...
Error making: caddy

Thanks!

(Matthew Fay) #2

Hmm, not sure how the AUR pkgbuilds work. Here’s how I built Caddy with the gandiv5 plugin just now. I only used Docker to get a clean environment with the latest Golang image, v1.12.5.

whitestrake at cadmus in ~
❯ docker run --rm -it golang:latest sh
# mkdir /root/caddy
# cd /root/caddy
# cat <<EOF > caddy.go
> package main
>
> import (
> 	"github.com/mholt/caddy/caddy/caddymain"
> 	_ "github.com/caddyserver/dnsproviders/gandiv5"
> )
>
> func main() {
> 	caddymain.EnableTelemetry = false
> 	caddymain.Run()
> }
> EOF
# export GO111MODULE=on
# go mod init caddy
go: creating new go.mod: module caddy
# echo "replace github.com/h2non/gock => gopkg.in/h2non/gock.v1 v1.0.14" >> go.mod
# go build
go: finding github.com/caddyserver/dnsproviders/gandiv5 latest
go: finding github.com/mholt/caddy/caddy/caddymain latest
go: finding github.com/caddyserver/dnsproviders v0.2.0
go: downloading github.com/caddyserver/dnsproviders v0.2.0
go: extracting github.com/caddyserver/dnsproviders v0.2.0
go: finding github.com/mholt/caddy/caddy latest
go: finding github.com/mholt/caddy v1.0.0
go: downloading github.com/mholt/caddy v1.0.0
go: extracting github.com/mholt/caddy v1.0.0
go: finding github.com/BurntSushi/toml v0.3.1
go: finding github.com/lucas-clemente/quic-go v0.10.2
go: finding github.com/hashicorp/go-syslog v1.0.0
go: finding github.com/Azure/go-autorest/autorest/azure/auth v0.1.0
go: finding github.com/google/uuid v1.1.1
go: finding github.com/cloudflare/cloudflare-go v0.8.5
go: finding github.com/akamai/AkamaiOPEN-edgegrid-golang v0.7.4
go: finding github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4
go: finding github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014
go: finding golang.org/x/net v0.0.0-20190328230028-74de082e2cca
go: finding github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: finding github.com/cpu/goacmedns v0.0.1
go: finding github.com/mholt/caddy v1.0.0-beta2.0.20190420233410-0c3d90ed21a4
go: finding github.com/naoina/toml v0.1.1
go: finding github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: finding golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
go: finding github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f
go: finding github.com/nrdcg/auroradns v1.0.0
go: finding golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480
go: finding golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a
go: finding github.com/gorilla/websocket v1.4.0
go: finding github.com/juju/ratelimit v1.0.1
go: finding github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47
go: finding gopkg.in/ini.v1 v1.42.0
go: finding cloud.google.com/go v0.34.0
go: finding github.com/klauspost/cpuid v1.2.0
go: finding github.com/Azure/go-autorest/autorest/validation v0.1.0
go: finding github.com/modern-go/reflect2 v1.0.1
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding gopkg.in/mcuadros/go-syslog.v2 v2.2.1
go: finding github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced
go: finding golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25
go: finding github.com/marten-seemann/qtls v0.2.3
go: finding github.com/Azure/go-autorest/autorest v0.1.0
go: finding gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: finding github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9
go: finding gopkg.in/ns1/ns1-go.v2 v2.0.0-20190322154155-0dafb5275fd1
go: finding gopkg.in/h2non/gock.v1 v1.0.14
go: finding github.com/decker502/dnspod-go v0.0.0-20181231011336-d1081970f528
go: finding github.com/dnsimple/dnsimple-go v0.23.0
go: finding github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a
go: finding golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e
go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: finding github.com/google/go-querystring v1.0.0
go: finding google.golang.org/api v0.3.2
go: finding github.com/aws/aws-sdk-go v1.19.15
go: finding github.com/onsi/ginkgo v1.8.0
go: finding golang.org/x/text v0.3.0
go: finding google.golang.org/appengine v1.4.0
go: finding github.com/JamesClonk/vultr v2.0.0+incompatible
go: finding github.com/Azure/go-autorest/autorest/mocks v0.1.0
go: finding github.com/Azure/go-autorest/autorest/adal v0.1.0
go: finding github.com/Azure/go-autorest/tracing v0.1.0
go: finding github.com/stretchr/testify v1.3.0
go: finding github.com/go-acme/lego v2.5.0+incompatible
go: finding golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e
go: finding github.com/lucas-clemente/quic-clients v0.1.0
go: finding github.com/Azure/go-autorest/autorest/azure/cli v0.1.0
go: finding golang.org/x/tools v0.0.0-20190312170243-e65039ee4138
go: finding github.com/dustin/go-humanize v1.0.0
go: finding github.com/naoina/go-stringutil v0.1.0
go: finding github.com/golang/mock v1.2.0
go: finding golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
go: finding golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e
go: finding github.com/timewasted/linode v0.0.0-20160829202747-37e84520dcf7
go: finding go.opencensus.io v0.20.1
go: finding honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099
go: finding google.golang.org/grpc v1.19.0
go: finding golang.org/x/net v0.0.0-20180724234803-3673e40ba225
go: finding golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4
go: finding github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115
go: finding go.opencensus.io v0.20.2
go: finding github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: finding google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19
go: finding github.com/mholt/certmagic v0.5.0
go: finding golang.org/x/tools v0.0.0-20190328211700-ab21143f2384
go: finding github.com/onsi/gomega v1.5.0
go: finding github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: finding contrib.go.opencensus.io/exporter/ocagent v0.4.12
go: finding golang.org/x/net v0.0.0-20180826012351-8a410e7b638d
go: finding google.golang.org/api v0.3.1
go: finding google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8
go: finding github.com/stretchr/objx v0.1.0
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding github.com/Azure/azure-sdk-for-go v27.3.0+incompatible
go: finding github.com/client9/misspell v0.3.4
go: finding gopkg.in/fsnotify.v1 v1.4.7
go: finding github.com/Azure/go-autorest/autorest/to v0.1.0
go: finding github.com/Azure/go-autorest/autorest/date v0.1.0
go: finding google.golang.org/grpc v1.19.1
go: finding github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: finding github.com/google/go-cmp v0.2.0
go: finding golang.org/x/sys v0.0.0-20190124100055-b90733256f2e
go: finding github.com/onsi/ginkgo v1.6.0
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/miekg/dns v1.1.3
go: finding github.com/cenkalti/backoff v2.1.1+incompatible
go: finding github.com/golang/mock v1.1.1
go: finding golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3
go: finding golang.org/x/sys v0.0.0-20180830151530-49385e6e1522
go: finding gopkg.in/yaml.v2 v2.2.1
go: finding github.com/hashicorp/golang-lru v0.5.0
go: finding github.com/davecgh/go-spew v1.1.0
go: finding github.com/go-ini/ini v1.42.0
go: finding golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6
go: finding gopkg.in/square/go-jose.v2 v2.2.2
go: finding github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542
go: finding golang.org/x/net v0.0.0-20190311183353-d8887717615a
go: finding github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829
go: finding github.com/namedotcom/go v0.0.0-20180403034216-08470befbe04
go: finding github.com/mitchellh/go-homedir v1.1.0
go: finding golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
go: finding github.com/hpcloud/tail v1.0.0
go: finding golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b
go: finding github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348
go: finding gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: finding github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d
go: finding github.com/jtolds/gls v4.20.0+incompatible
go: finding github.com/Azure/go-autorest/logger v0.1.0
go: finding golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3
go: finding github.com/golang/protobuf v1.3.1
go: finding github.com/json-iterator/go v1.1.6
go: finding github.com/dimchansky/utfbom v1.1.0
go: finding github.com/apache/thrift v0.12.0
go: finding github.com/census-instrumentation/opencensus-proto v0.2.0
go: finding golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f
go: finding github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973
go: finding github.com/prometheus/common v0.2.0
go: finding golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
go: finding golang.org/x/tools v0.0.0-20190114222345-bf090417da8b
go: finding github.com/openzipkin/zipkin-go v0.1.6
go: finding github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1
go: finding google.golang.org/appengine v1.1.0
go: finding github.com/grpc-ecosystem/grpc-gateway v1.8.5
go: finding golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e
go: finding cloud.google.com/go v0.26.0
go: finding github.com/golang/protobuf v1.2.0
go: finding github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
go: finding github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d
go: finding github.com/Shopify/toxiproxy v2.1.4+incompatible
go: finding github.com/gorilla/context v1.1.1
go: finding github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515
go: finding google.golang.org/grpc v1.17.0
go: finding github.com/eapache/queue v1.1.0
go: finding github.com/gogo/protobuf v1.1.1
go: finding github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910
go: finding github.com/matttproud/golang_protobuf_extensions v1.0.1
go: finding github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc
go: finding gopkg.in/resty.v1 v1.12.0
go: finding github.com/pierrec/lz4 v2.0.5+incompatible
go: finding github.com/fsnotify/fsnotify v1.4.7
go: finding golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8
go: finding github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32
go: finding github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f
go: finding github.com/sirupsen/logrus v1.2.0
go: finding github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
go: finding github.com/onsi/ginkgo v1.7.0
go: finding golang.org/x/net v0.0.0-20181114220301-adae6a3d119a
go: finding github.com/go-logfmt/logfmt v0.3.0
go: finding golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b
go: finding github.com/eapache/go-resiliency v1.1.0
go: finding github.com/exoscale/egoscale v0.17.0
go: finding github.com/kr/pretty v0.1.0
go: finding github.com/go-kit/kit v0.8.0
go: finding github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21
go: finding golang.org/x/net v0.0.0-20181220203305-927f97764cc3
go: finding golang.org/x/exp v0.0.0-20190121172915-509febef88a4
go: finding golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
go: finding golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33
go: finding github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af
go: finding gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: finding github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223
go: finding golang.org/x/crypto v0.0.0-20180904163835-0709b304e793
go: finding github.com/gorilla/mux v1.6.2
go: finding golang.org/x/tools v0.0.0-20190226205152-f727befe758c
go: finding gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: finding golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961
go: finding github.com/ghodss/yaml v1.0.0
go: finding github.com/davecgh/go-spew v1.1.1
go: finding github.com/stretchr/objx v0.1.1
go: finding github.com/kr/text v0.1.0
go: finding github.com/gogo/protobuf v1.2.0
go: finding honnef.co/go/tools v0.0.0-20180728063816-88497007e858
go: finding github.com/stretchr/testify v1.2.2
go: finding github.com/prometheus/client_golang v0.9.1
go: finding github.com/onsi/gomega v1.4.3
go: finding github.com/gofrs/uuid v3.2.0+incompatible
go: finding github.com/kisielk/gotool v1.0.0
go: finding github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a
go: finding github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf
go: finding golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5
go: finding github.com/Shopify/sarama v1.19.0
go: finding github.com/julienschmidt/httprouter v1.2.0
go: finding github.com/go-stack/stack v1.8.0
go: finding gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7
go: finding golang.org/x/sync v0.0.0-20181108010431-42b317875d0f
go: finding github.com/pkg/errors v0.8.0
go: finding github.com/kr/pty v1.1.1
go: finding golang.org/x/net v0.0.0-20190213061140-3a22650c66bd
go: finding golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52
go: downloading github.com/go-acme/lego v2.5.0+incompatible
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/mholt/certmagic v0.5.0
go: downloading github.com/google/uuid v1.1.1
go: downloading github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: downloading github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4
go: downloading github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: extracting gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/lucas-clemente/quic-go v0.10.2
go: extracting github.com/google/uuid v1.1.1
go: extracting github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568
go: downloading github.com/naoina/toml v0.1.1
go: downloading github.com/klauspost/cpuid v1.2.0
go: extracting github.com/mholt/certmagic v0.5.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: extracting github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a
go: extracting github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4
go: extracting github.com/naoina/toml v0.1.1
go: downloading golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480
go: extracting github.com/klauspost/cpuid v1.2.0
go: extracting gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/gorilla/websocket v1.4.0
go: extracting github.com/gorilla/websocket v1.4.0
go: downloading github.com/hashicorp/go-syslog v1.0.0
go: extracting github.com/hashicorp/go-syslog v1.0.0
go: downloading golang.org/x/net v0.0.0-20190328230028-74de082e2cca
go: extracting github.com/lucas-clemente/quic-go v0.10.2
go: extracting golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480
go: downloading github.com/naoina/go-stringutil v0.1.0
go: extracting github.com/naoina/go-stringutil v0.1.0
go: extracting golang.org/x/net v0.0.0-20190328230028-74de082e2cca
go: downloading github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9
go: extracting github.com/go-acme/lego v2.5.0+incompatible
go: extracting github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9
go: downloading github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115
go: downloading github.com/hashicorp/golang-lru v0.5.0
go: downloading github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced
go: downloading golang.org/x/text v0.3.0
go: downloading gopkg.in/square/go-jose.v2 v2.2.2
go: downloading github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f
go: downloading github.com/dustin/go-humanize v1.0.0
go: downloading github.com/miekg/dns v1.1.3
go: extracting github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115
go: extracting github.com/hashicorp/golang-lru v0.5.0
go: downloading github.com/cenkalti/backoff v2.1.1+incompatible
go: extracting github.com/dustin/go-humanize v1.0.0
go: extracting github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f
go: extracting github.com/cenkalti/backoff v2.1.1+incompatible
go: extracting gopkg.in/square/go-jose.v2 v2.2.2
go: extracting github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced
go: extracting github.com/miekg/dns v1.1.3
go: downloading golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e
go: extracting golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e
go: extracting golang.org/x/text v0.3.0
# ./caddy -version
Caddy v1.0.0 (h1:KI6RPGih2GFzWRPG8s9clKK28Ns4ZlVMKR/v7mxq6+c=)
# ./caddy -plugins
Server types:
  http

Caddyfile loaders:
  short
  flag
  default

Other plugins:
  http.basicauth
  http.bind
  http.browse
  http.errors
  http.expvar
  http.ext
  http.fastcgi
  http.gzip
  http.header
  http.index
  http.internal
  http.limits
  http.log
  http.markdown
  http.mime
  http.pprof
  http.proxy
  http.push
  http.redir
  http.request_id
  http.rewrite
  http.root
  http.status
  http.templates
  http.timeouts
  http.websocket
  on
  tls
  tls.cluster.file
  tls.dns.gandiv5

#
(Pixys) #3

Thanks.

I will try to build it from source but it is far from ideal as I will have to handle the upgrades manually and not through the package manager.

Also, the weird thing is I can build it first without tls.dns.gandiv5 and then again with it. It does not really work as Caddy complains:

 error during parsing: Unknown DNS provider by name 'gandiv5'

but the build step does not fail.