Open pebbe opened 9 years ago
Two things:
For the first, you need to fix the import statements in your code. For the second you need to call go get again.
The easy way to do both:
On Thu, Dec 11, 2014 at 3:53 AM, Peter Kleiweg notifications@github.com wrote:
Can't install with Go version 1.4:
gopkg.in/qml.v0/bridge.go:16:2: C source files not allowed when not using cgo: tref.cgopkg.in/qml.v1/bridge.go:16:2: C source files not allowed when not using cgo: cdata.cgopkg.in/qml.v0/bridge.go:16:2: C source files not allowed when not using cgo: tref.cgopkg.in/qml.v1/bridge.go:16:2: C source files not allowed when not using cgo: cdata.c
— Reply to this email directly or view it on GitHub https://github.com/go-qml/qml/issues/134.
clear your gopath?
@cookieo9 Updating for v1 works, but not for v0.
For v1: what happened to gopkg.in/qml.v1/work-in-progress/gl
?
(peter) ~/go/src go get gopkg.in/qml.v0
gopkg.in/qml.v0/bridge.go:16:2: C source files not allowed when not using cgo: tref.c
(peter) ~/go/src go get -v gopkg.in/qml.v0/gl
(peter) ~/go/src go get -v gopkg.in/qml.v1
(peter) ~/go/src go get -v gopkg.in/qml.v1/work-in-progress/gl
Fetching https://gopkg.in/qml.v1/work-in-progress/gl?go-get=1
Parsing meta tags from https://gopkg.in/qml.v1/work-in-progress/gl?go-get=1 (status code 200)
get "gopkg.in/qml.v1/work-in-progress/gl": found meta tag main.metaImport{Prefix:"gopkg.in/qml.v1", VCS:"git", RepoRoot:"https://gopkg.in/qml.v1"} at https://gopkg.in/qml.v1/work-in-progress/gl?go-get=1
get "gopkg.in/qml.v1/work-in-progress/gl": verifying non-authoritative meta tag
Fetching https://gopkg.in/qml.v1?go-get=1
Parsing meta tags from https://gopkg.in/qml.v1?go-get=1 (status code 200)
gopkg.in/qml.v1 (download)
package gopkg.in/qml.v1/work-in-progress/gl
imports gopkg.in/qml.v1/work-in-progress/gl
imports gopkg.in/qml.v1/work-in-progress/gl: cannot find package "gopkg.in/qml.v1/work-in-progress/gl" in any of:
/my/opt/go/src/gopkg.in/qml.v1/work-in-progress/gl (from $GOROOT)
/home/peter/go/src/gopkg.in/qml.v1/work-in-progress/gl (from $GOPATH)
v0 is deprecated, don't use it.
It likely will not be updated to (for example) work with newer versions of Go.
Also it's less portable.
I have old software that depends on v0.
Don't use go 1.4, or update your code to use v1.
In general v0 versions are not meant for public consumption. As you noticed, the API changed in v0 for how to get access to gl. Even if v0 is updated to work with go 1.4, some parts of the API may have changed from when you used it.
BTW: The go compatibilty promise (go updates don't break your code) only applies to Go code (which uses the stdlib) not CGO.
It's unfortunate if your old code is broken, but it was coded against an unstable API (http://gopkg.in#VersionZero).
It should be possible to patch the change to v1 back into v0 to fix the errors, but you will have to do it yourself, as any changes made to the official v0 will still be using a different API then the version of v0 used by your code.
The commit which fixed v1 was b94596a6ddac9305f52c756f78cab8cb28de29af
Can't install with Go version 1.4: