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

Error when building from source #421

Closed
roger2hk opened this issue Jul 27, 2020 · 3 comments · Fixed by #425
Closed

Error when building from source #421

roger2hk opened this issue Jul 27, 2020 · 3 comments · Fixed by #425
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: docs Improvement to the documentation for an API.

Comments

@roger2hk
Copy link
Contributor

Bug Description

There is an error when building from source.
Not sure why it happens as PR #382 pinned the bazil.org/fuse version.

Example code (or command)

> go get github.com/GoogleCloudPlatform/cloudsql-proxy/cmd/cloud_sql_proxy
# bazil.org/fuse
/Users/user/go/src/bazil.org/fuse/error_std.go:26:20: undefined: errNoXattr
/Users/user/go/src/bazil.org/fuse/fuse.go:171:12: undefined: mount
/Users/user/go/src/bazil.org/fuse/fuse.go:236:24: undefined: maxWrite
/Users/user/go/src/bazil.org/fuse/fuse.go:425:32: undefined: maxWrite
/Users/user/go/src/bazil.org/fuse/fuse.go:810:12: undefined: openFlags
/Users/user/go/src/bazil.org/fuse/fuse.go:828:18: undefined: openFlags
/Users/user/go/src/bazil.org/fuse/fuse.go:845:18: undefined: openFlags
/Users/user/go/src/bazil.org/fuse/fuse.go:868:18: undefined: openFlags
/Users/user/go/src/bazil.org/fuse/fuse.go:991:12: undefined: openFlags
/Users/user/go/src/bazil.org/fuse/fuse.go:1413:20: undefined: maxWrite
/Users/user/go/src/bazil.org/fuse/fuse.go:1413:20: too many errors

Stacktrace

N/A

How to reproduce

  1. Execute the go get command mentioned in README.

Environment

  1. OS type and version: macOS 10.15.6
  2. Cloud SQL Proxy version (./cloud_sql_proxy -version): N/A
@roger2hk roger2hk added the type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. label Jul 27, 2020
@shubha-rajan shubha-rajan added the priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. label Jul 27, 2020
@kurtisvg
Copy link
Contributor

kurtisvg commented Jul 28, 2020

Do you know which version of Go you are using? I was able to replicate successfully with GO111MODULE=off go get github.com/GoogleCloudPlatform/cloudsql-proxy/cmd/cloud_sql_proxy, but built successfully with GO111MODULE=on.

We may need to update the README to include explicit instructions for each version...

@roger2hk
Copy link
Contributor Author

Here is the output of go version and go env.

> go version
go version go1.14.5 darwin/amd64
> go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/user/Library/Caches/go-build"
GOENV="/Users/user/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/user/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/t5/k1fgpt2n6ts_d2308wxk2mqr0000gn/T/go-build148249455=/tmp/go-build -gno-record-gcc-switches -fno-common"

@roger2hk
Copy link
Contributor Author

You are right. It works by adding the GO111MODULE=on.

> GO111MODULE=on go get github.com/GoogleCloudPlatform/cloudsql-proxy/cmd/cloud_sql_proxy
go: downloading github.com/GoogleCloudPlatform/cloudsql-proxy v1.17.0
go: found github.com/GoogleCloudPlatform/cloudsql-proxy/cmd/cloud_sql_proxy in github.com/GoogleCloudPlatform/cloudsql-proxy v1.17.0
go: downloading cloud.google.com/go v0.56.0
go: downloading golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
go: downloading bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
go: downloading google.golang.org/protobuf v1.21.0
go: downloading google.golang.org/api v0.21.0
go: downloading google.golang.org/grpc v1.28.1
go: downloading google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb
go: downloading golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f

@kurtisvg kurtisvg added type: docs Improvement to the documentation for an API. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants