Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile on debian #58

Closed
hazcod opened this issue Nov 19, 2018 · 1 comment
Closed

Cannot compile on debian #58

hazcod opened this issue Nov 19, 2018 · 1 comment

Comments

@hazcod
Copy link
Contributor

hazcod commented Nov 19, 2018

Since alpine fails to build, I tried with debian.

FROM golang
WORKDIR /go/src/app
RUN apt update && apt install --yes ca-certificates \
	&& git clone https://github.com/cloudflare/cloudflared /go/src/app \
	&& go get -u all \
	&& make

Log:

Sending build context to Docker daemon   2.56kB
Step 1/7 : FROM golang AS builder
 ---> df6ac9d1bf64
Step 2/7 : WORKDIR /go/src/app
 ---> Using cache
 ---> 7a22fa1bbd1e
Step 3/7 : RUN apt update && apt install --yes ca-certificates git gcc make 	&& git clone https://github.com/cloudflare/cloudflared /go/src/app 	&& go get -u all 	&& make
 ---> Running in 01d86e12042d

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:3 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [459 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages [5152 B]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [7089 kB]
Fetched 7859 kB in 5s (1531 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
All packages are up to date.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20161130+nmu1+deb9u1).
gcc is already the newest version (4:6.3.0-4).
git is already the newest version (1:2.11.0-3+deb9u4).
make is already the newest version (4.1-9.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Cloning into '/go/src/app'...
# app/cmd/cloudflared/access
cmd/cloudflared/access/carrier.go:24:44: cannot use c (type *"app/vendor/gopkg.in/urfave/cli.v2".Context) as type *"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context in argument to config.ValidateUrl
# app/tlsconfig
tlsconfig/certreloader.go:52:19: cannot use log.JSONFormatter literal (type *log.JSONFormatter) as type "app/vendor/github.com/sirupsen/logrus".Formatter in argument to "app/vendor/github.com/sirupsen/logrus".SetFormatter:
	*log.JSONFormatter does not implement "app/vendor/github.com/sirupsen/logrus".Formatter (wrong type for Format method)
		have Format(*"github.com/cloudflare/cloudflared/vendor/github.com/sirupsen/logrus".Entry) ([]byte, error)
		want Format(*"app/vendor/github.com/sirupsen/logrus".Entry) ([]byte, error)
# app/tunnelrpc/pogs
tunnelrpc/pogs/tunnelrpc.go:22:55: cannot use s.Struct (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Struct) as type "app/vendor/zombiezen.com/go/capnproto2".Struct in argument to pogs.Insert
tunnelrpc/pogs/tunnelrpc.go:27:59: cannot use s.Struct (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Struct) as type "app/vendor/zombiezen.com/go/capnproto2".Struct in argument to pogs.Extract
tunnelrpc/pogs/tunnelrpc.go:40:59: cannot use s.Struct (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Struct) as type "app/vendor/zombiezen.com/go/capnproto2".Struct in argument to pogs.Insert
tunnelrpc/pogs/tunnelrpc.go:45:63: cannot use s.Struct (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Struct) as type "app/vendor/zombiezen.com/go/capnproto2".Struct in argument to pogs.Extract
tunnelrpc/pogs/tunnelrpc.go:65:60: cannot use s.Struct (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Struct) as type "app/vendor/zombiezen.com/go/capnproto2".Struct in argument to pogs.Insert
tunnelrpc/pogs/tunnelrpc.go:70:64: cannot use s.Struct (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Struct) as type "app/vendor/zombiezen.com/go/capnproto2".Struct in argument to pogs.Extract
tunnelrpc/pogs/tunnelrpc.go:84:51: cannot use s.Struct (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Struct) as type "app/vendor/zombiezen.com/go/capnproto2".Struct in argument to pogs.Insert
tunnelrpc/pogs/tunnelrpc.go:89:55: cannot use s.Struct (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Struct) as type "app/vendor/zombiezen.com/go/capnproto2".Struct in argument to pogs.Extract
tunnelrpc/pogs/tunnelrpc.go:124:14: cannot use p.Options (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".CallOptions) as type "app/vendor/zombiezen.com/go/capnproto2".CallOptions in argument to "app/vendor/zombiezen.com/go/capnproto2/server".Ack
tunnelrpc/pogs/tunnelrpc.go:138:14: cannot use p.Options (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".CallOptions) as type "app/vendor/zombiezen.com/go/capnproto2".CallOptions in argument to "app/vendor/zombiezen.com/go/capnproto2/server".Ack
tunnelrpc/pogs/tunnelrpc.go:138:14: too many errors
# app/cmd/cloudflared
cmd/cloudflared/main.go:54:13: cannot use tunnel.Before (type func(*"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context) error) as type "app/vendor/gopkg.in/urfave/cli.v2".BeforeFunc in assignment
cmd/cloudflared/main.go:66:4: cannot use updater.Update (type func(*"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context) error) as type "app/vendor/gopkg.in/urfave/cli.v2".ActionFunc in field value
cmd/cloudflared/main.go:76:15: cannot use tunnel.Commands() (type []*"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Command) as type []*"app/vendor/gopkg.in/urfave/cli.v2".Command in append
cmd/cloudflared/main.go:77:15: cannot use access.Commands() (type []*"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Command) as type []*"app/vendor/gopkg.in/urfave/cli.v2".Command in append
cmd/cloudflared/main.go:83:15: cannot use append(flags, access.Flags()...) (type []"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Flag) as type []"app/vendor/gopkg.in/urfave/cli.v2".Flag in return argument
cmd/cloudflared/main.go:91:55: cannot use c (type *"app/vendor/gopkg.in/urfave/cli.v2".Context) as type *"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context in argument to tunnel.StartServer
# app/cmd/cloudflared/tunnel
cmd/cloudflared/tunnel/cmd.go:75:4: cannot use tunneldns.Run (type func(*"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context) error) as type "app/vendor/gopkg.in/urfave/cli.v2".ActionFunc in field value
cmd/cloudflared/tunnel/cmd.go:119:29: cannot use c (type *"app/vendor/gopkg.in/urfave/cli.v2".Context) as type *"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context in argument to sqlgateway.StartProxy
cmd/cloudflared/tunnel/cmd.go:238:24: cannot use logger (type *"github.com/cloudflare/cloudflared/vendor/github.com/sirupsen/logrus".Logger) as type *"app/vendor/github.com/sirupsen/logrus".Logger in argument to initLogFile
cmd/cloudflared/tunnel/cmd.go:266:32: cannot use c (type *"app/vendor/gopkg.in/urfave/cli.v2".Context) as type *"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context in argument to updater.IsAutoupdateEnabled
cmd/cloudflared/tunnel/cmd.go:271:62: cannot use &listeners (type *"app/vendor/github.com/facebookgo/grace/gracenet".Net) as type *"github.com/cloudflare/cloudflared/vendor/github.com/facebookgo/grace/gracenet".Net in argument to updater.Autoupdate
cmd/cloudflared/tunnel/cmd.go:332:42: cannot use logger (type *"github.com/cloudflare/cloudflared/vendor/github.com/sirupsen/logrus".Logger) as type *"app/vendor/github.com/sirupsen/logrus".Logger in argument to prepareTunnelConfig
cmd/cloudflared/tunnel/cmd.go:350:51: cannot use c (type *"app/vendor/gopkg.in/urfave/cli.v2".Context) as type *"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context in argument to config.FindInputSourceContext
cmd/cloudflared/tunnel/cmd.go:355:39: cannot use inputSource (type "github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2/altsrc".InputSourceContext) as type "app/vendor/gopkg.in/urfave/cli.v2/altsrc".InputSourceContext in argument to "app/vendor/gopkg.in/urfave/cli.v2/altsrc".ApplyInputSourceValues:
	"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2/altsrc".InputSourceContext does not implement "app/vendor/gopkg.in/urfave/cli.v2/altsrc".InputSourceContext (wrong type for Generic method)
		have Generic(string) ("github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Generic, error)
		want Generic(string) ("app/vendor/gopkg.in/urfave/cli.v2".Generic, error)
cmd/cloudflared/tunnel/configuration.go:158:38: cannot use c (type *"app/vendor/gopkg.in/urfave/cli.v2".Context) as type *"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context in argument to config.ValidateUrl
cmd/cloudflared/tunnel/configuration.go:206:51: cannot use c (type *"app/vendor/gopkg.in/urfave/cli.v2".Context) as type *"github.com/cloudflare/cloudflared/vendor/gopkg.in/urfave/cli.v2".Context in argument to tlsconfig.CreateTunnelConfig
cmd/cloudflared/tunnel/configuration.go:206:51: too many errors
# app/origin
origin/tunnel.go:311:31: cannot use tunnelrpc.NewTransportLogger(config.Logger.WithField("subsystem", "rpc-register"), "app/vendor/zombiezen.com/go/capnproto2/rpc".StreamTransport(stream)) (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/rpc".Transport) as type "app/vendor/zombiezen.com/go/capnproto2/rpc".Transport in argument to "app/vendor/zombiezen.com/go/capnproto2/rpc".NewConn:
	"github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/rpc".Transport does not implement "app/vendor/zombiezen.com/go/capnproto2/rpc".Transport (wrong type for RecvMessage method)
		have RecvMessage("context".Context) ("github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/std/capnp/rpc".Message, error)
		want RecvMessage("context".Context) ("app/vendor/zombiezen.com/go/capnproto2/std/capnp/rpc".Message, error)
origin/tunnel.go:311:55: cannot use config.Logger.WithField("subsystem", "rpc-register") (type *"app/vendor/github.com/sirupsen/logrus".Entry) as type *"github.com/cloudflare/cloudflared/vendor/github.com/sirupsen/logrus".Entry in argument to tunnelrpc.NewTransportLogger
origin/tunnel.go:311:105: cannot use "app/vendor/zombiezen.com/go/capnproto2/rpc".StreamTransport(stream) (type "app/vendor/zombiezen.com/go/capnproto2/rpc".Transport) as type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/rpc".Transport in argument to tunnelrpc.NewTransportLogger:
	"app/vendor/zombiezen.com/go/capnproto2/rpc".Transport does not implement "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/rpc".Transport (wrong type for RecvMessage method)
		have RecvMessage("context".Context) ("app/vendor/zombiezen.com/go/capnproto2/std/capnp/rpc".Message, error)
		want RecvMessage("context".Context) ("github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/std/capnp/rpc".Message, error)
origin/tunnel.go:312:20: cannot use tunnelrpc.ConnLog(config.Logger.WithField("subsystem", "rpc-transport")) (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/rpc".ConnOption) as type "app/vendor/zombiezen.com/go/capnproto2/rpc".ConnOption in argument to "app/vendor/zombiezen.com/go/capnproto2/rpc".NewConn
origin/tunnel.go:312:44: cannot use config.Logger.WithField("subsystem", "rpc-transport") (type *"app/vendor/github.com/sirupsen/logrus".Entry) as type *"github.com/cloudflare/cloudflared/vendor/github.com/sirupsen/logrus".Entry in argument to tunnelrpc.ConnLog
origin/tunnel.go:315:43: cannot use conn.Bootstrap(ctx) (type "app/vendor/zombiezen.com/go/capnproto2".Client) as type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Client in field value:
	"app/vendor/zombiezen.com/go/capnproto2".Client does not implement "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Client (wrong type for Call method)
		have Call(*"app/vendor/zombiezen.com/go/capnproto2".Call) "app/vendor/zombiezen.com/go/capnproto2".Answer
		want Call(*"github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Call) "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2".Answer
origin/tunnel.go:385:31: cannot use tunnelrpc.NewTransportLogger(logger.WithField("subsystem", "rpc-unregister"), "app/vendor/zombiezen.com/go/capnproto2/rpc".StreamTransport(stream)) (type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/rpc".Transport) as type "app/vendor/zombiezen.com/go/capnproto2/rpc".Transport in argument to "app/vendor/zombiezen.com/go/capnproto2/rpc".NewConn:
	"github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/rpc".Transport does not implement "app/vendor/zombiezen.com/go/capnproto2/rpc".Transport (wrong type for RecvMessage method)
		have RecvMessage("context".Context) ("github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/std/capnp/rpc".Message, error)
		want RecvMessage("context".Context) ("app/vendor/zombiezen.com/go/capnproto2/std/capnp/rpc".Message, error)
origin/tunnel.go:385:48: cannot use logger.WithField("subsystem", "rpc-unregister") (type *"app/vendor/github.com/sirupsen/logrus".Entry) as type *"github.com/cloudflare/cloudflared/vendor/github.com/sirupsen/logrus".Entry in argument to tunnelrpc.NewTransportLogger
origin/tunnel.go:385:100: cannot use "app/vendor/zombiezen.com/go/capnproto2/rpc".StreamTransport(stream) (type "app/vendor/zombiezen.com/go/capnproto2/rpc".Transport) as type "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/rpc".Transport in argument to tunnelrpc.NewTransportLogger:
	"app/vendor/zombiezen.com/go/capnproto2/rpc".Transport does not implement "github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/rpc".Transport (wrong type for RecvMessage method)
		have RecvMessage("context".Context) ("app/vendor/zombiezen.com/go/capnproto2/std/capnp/rpc".Message, error)
		want RecvMessage("context".Context) ("github.com/cloudflare/cloudflared/vendor/zombiezen.com/go/capnproto2/std/capnp/rpc".Message, error)
origin/tunnel.go:386:37: cannot use logger.WithField("subsystem", "rpc-transport") (type *"app/vendor/github.com/sirupsen/logrus".Entry) as type *"github.com/cloudflare/cloudflared/vendor/github.com/sirupsen/logrus".Entry in argument to tunnelrpc.ConnLog
origin/tunnel.go:385:31: too many errors
The command '/bin/sh -c apt update && apt install --yes ca-certificates git gcc make 	&& git clone https://github.com/cloudflare/cloudflared /go/src/app 	&& go get -u all 	&& make' returned a non-zero code: 2

So basically any means of compiling on docker is failing. What are we doing wrong?

@hazcod
Copy link
Contributor Author

hazcod commented Nov 19, 2018

Fixed for alpine; https://github.com/HazCod/argo/tree/master

@hazcod hazcod closed this as completed Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant