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

compile failed for mac, undefined: driver.TxOptions #638

Closed
qhcmler opened this issue Jul 14, 2017 · 6 comments
Closed

compile failed for mac, undefined: driver.TxOptions #638

qhcmler opened this issue Jul 14, 2017 · 6 comments

Comments

@qhcmler
Copy link

qhcmler commented Jul 14, 2017

osx version 10.11.6
go version 1.8.3

If I tried "go get github.com/go-sql-driver/mysql", few minutes ago I got this:
../../../Desktop/go/src/github.com/go-sql-driver/mysql/connection_go18.go:43: undefined: driver.TxOptions
../../../Desktop/go/src/github.com/go-sql-driver/mysql/connection_go18.go:55: undefined: sql.IsolationLevel
../../../Desktop/go/src/github.com/go-sql-driver/mysql/connection_go18.go:55: undefined: sql.LevelDefault
../../../Desktop/go/src/github.com/go-sql-driver/mysql/connection_go18.go:69: undefined: driver.NamedValue
../../../Desktop/go/src/github.com/go-sql-driver/mysql/connection_go18.go:88: undefined: driver.NamedValue
../../../Desktop/go/src/github.com/go-sql-driver/mysql/connection_go18.go:122: undefined: driver.NamedValue
../../../Desktop/go/src/github.com/go-sql-driver/mysql/connection_go18.go:141: undefined: driver.NamedValue
../../../Desktop/go/src/github.com/go-sql-driver/mysql/utils_go18.go:21: c.Clone undefined (type *tls.Config has no field or method Clone, but does have tls.clone)
../../../Desktop/go/src/github.com/go-sql-driver/mysql/utils_go18.go:24: undefined: driver.NamedValue
../../../Desktop/go/src/github.com/go-sql-driver/mysql/utils_go18.go:36: undefined: driver.IsolationLevel
../../../Desktop/go/src/github.com/go-sql-driver/mysql/utils_go18.go:21: too many errors

I deleted it and download again, no luck.
Please tell me if you know the solve method .
Thanks.....verymuch..

@denisacostaq
Copy link

denisacostaq commented Jul 15, 2017

The same issue on linux:
Linux hostname 4.11.0-1-amd64 # 1 SMP Debian 4.11.6-1 (2017-06-19) x86_64 GNU/Linux
go version go1.8.3 linux/amd64

working with go 1.7

@methane
Copy link
Member

methane commented Jul 15, 2017

Have you cleared $GOPATH/pkg when upgrading from Go 1.7?
What is output of go env?

I suspect you uses Go 1.7's database/sql/driver in someway.

@denisacostaq
Copy link

Hello @methane
Thaks for your hint, but I can not try it, my system is working ok now and I will become off line for a ~month. I will to upgrade to 1.8 in other moment.

I was no clear the packages build before, this can be the problem, I hope your hint help to @qhcmler

regards

@qhcmler
Copy link
Author

qhcmler commented Jul 19, 2017

@methane Thank you very much,
Golang-1.8.3 is my first version of installed,and this is my go env :

GOARCH="amd64"
GOBIN="/Users/qhcmler/Desktop/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/qhcmler/Desktop/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0x/4t8rzpj571bbgpllt2np3vyh0000gn/T/go-build758330925=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

This is a strange issue, I did't searched enough hints on internet, almost nobody got this issue.

@methane
Copy link
Member

methane commented Jul 19, 2017

This is a strange issue, I did't searched enough hints on internet, almost nobody got this issue.

It may because your Go 1.8 is installed dirtily.
Remove /usr/local/go and $GOPATH/pkg and reinstall Go 1.8.

@qhcmler
Copy link
Author

qhcmler commented Jul 19, 2017

@methane Thanks for your hint, it helped me, I had reinstalled Golang1.8 and solved this issue.

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

4 participants