-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/tools/cmd/gorename: cgo pkg-config not supported by loader(?) #13526
Comments
For what it's worth, I'd be fine with any simple workarounds you have -- the cgo module is not important to the code I'm editing. For example if I could check in the cgo-generated files to fix this, or use a build tag to remove the cgo files when using gorename, etc... (Obviously just fixing it is preferable though if that's easy.) ...which gives me an idea! I might try inlining the results of pkg-config into cflags/ldflags on the relevant source. |
I have the same problem. gorename output:
|
same for me with https://github.com/abh/geoip While scanning Go workspace:
// some text
GeoIP not declared by package geoip
Open not declared by package geoip even though these functions are declared by this package. |
This is a bug in |
Is there an issue for this bug, or is this the issue? Is there a patch somewhere that I might be able to apply locally while waiting for this to make it into the release? |
@alaska This is the issue. I don't think there is an existing patch. Alan outlined above what needs to happen. |
Any luck here, its been open a while and doesn't seem to be scheduled. I am seeing while trying to use tools like errcheck or unused. |
CL https://golang.org/cl/21121 mentions this issue. |
(Sorry for the terrible issue description, I don't really understand all the pieces.)
When I use
gorename
on a project that transitively depends on a cgo library, I get the error:I get this in go version go1.4.2 linux/amd64 but also on my other box which has a newer version of go.
I hear that @alandonovan knows about this. I find the error in this module:
https://code.google.com/p/go/source/browse/go/loader/cgo.go?repo=tools
The text was updated successfully, but these errors were encountered: