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

go-sql-driver/mysql/utils.go:81: undefined: cloneTLSConfig #720

Closed
fabricebsi opened this issue Dec 5, 2017 · 10 comments
Closed

go-sql-driver/mysql/utils.go:81: undefined: cloneTLSConfig #720

fabricebsi opened this issue Dec 5, 2017 · 10 comments

Comments

@fabricebsi
Copy link

Hi,

I'm trying to use the mysql driver from go-sql-driver in order to connect a google cloud sql instance.
When I import _ "github.com/go-sql-driver/mysql" I have a error message :
go-sql-driver/mysql/utils.go:81: undefined: cloneTLSConfig

I've seen the issue in which it was said to be on go 1.8 or higher but I am on go 1.9.1 on Google app engine.

Did anyone have another solution to this problem?

Thank you iin advance

Error log

/home/admin_/gopath/src/github.com/go-sql-driver/mysql/utils.go:81: undefined: cloneTLSConfig

Configuration

Go version : go version go1.9.1 linux/amd64
Server OS : Debian 8 Jessie

@methane
Copy link
Member

methane commented Dec 5, 2017

It seems your environment issue.
What happens when rm -rf $GOPATH and rm -rf $GOROOT and clean install them?

@julienschmidt
Copy link
Member

julienschmidt commented Dec 5, 2017

What happens when rm -rf $GOPATH and rm -rf $GOROOT and clean install them?

Please don't do that without backups.

Maybe rm -rf $GOPATH/pkg/github.com/go-sql-driver/mysql is already enough.

@methane
Copy link
Member

methane commented Dec 6, 2017

Maybe rm -rf $GOPATH/pkt/github.com/go-sql-driver/mysql is already enough.

It may not be enough if go-sql-driver/mysql is vendored in some package.

@fabricebsi
Copy link
Author

Thank you for your answers.
It does not seem to be my environment.
I'm trying to connect with annother package "github.com/ziutek/mymysql/godrv" and I don't have such an error.
I have to finish my test but it seems to be the go-sql-driver which is the problem or maybe I actually have a wrong configuration.

@methane
Copy link
Member

methane commented Dec 6, 2017

What's difference between "your environment problem" and "your configuration problem"?

This error is compile error and I suspect you're using old Go compiler in some way,
while you believe you're using Go 1.9.1.
Is it config problem or environment problem?

@fabricebsi
Copy link
Author

Sorry, I mean an environment problem not a configuration problem.
I have to go further. You are all right, maybe I am not using Go 1.9.1.
In fact, I'm a new user of Go.
I am using this on Google App Engine and maybe I did something wrong.
When I use "go version", it says I'm on 1.9.1 but maybe I have to use another command on app engine.
Do you have feedback about using Go on Google App Engine. Is there anything special on Google App Engine compared to another system?

@methane
Copy link
Member

methane commented Dec 6, 2017

That's what you should report first!

Recently, GAE changed default Go version from 1.6 to 1.8.
https://cloud.google.com/appengine/docs/standard/go/runtime

This driver is compatible with Go 1.8, but not 1.6.

@fabricebsi
Copy link
Author

Hi, I think you was right.
I have a problem with my environment.
I changed my gopath variable and now i have other errors.
I'll try to have the good paths in order to make this work and i come back.

@alabastida
Copy link

I'm having this issue on GAE in Flexible Env with Go 1.9.1 the gopath looks good the rm -rf $GOPATH/pkg/github.com/go-sql-driver/mysql suggestion here did remove the package and i reinstalled it, but still getting that same cloneTLSConfig error, any suggestions please?

@methane
Copy link
Member

methane commented Mar 15, 2018

I'm not GAE user. And I don't want to learn GAE programming only for replying to question.

Please ask such question on google clouds' forum first.
If you get enough information and it really looks driver's issue, report it again.

@methane methane closed this as completed Mar 15, 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

4 participants