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

x/tools/go/loader: should respect PKG_CONFIG environmental variable #30964

Closed
benjaminp opened this issue Mar 20, 2019 · 4 comments
Closed

x/tools/go/loader: should respect PKG_CONFIG environmental variable #30964

benjaminp opened this issue Mar 20, 2019 · 4 comments

Comments

@benjaminp
Copy link
Contributor

When loading cgo, the go tool allows the path to the pkg-config tool to be overridden with the PKG_CONFIG environmental variable. The x/tools loader, however, hardcodes the name pkg-config for a $PATH search. It should instead only fallback to such a search after looking at the PKG_CONFIG environmental variable.

@gopherbot gopherbot added this to the Unreleased milestone Mar 20, 2019
@josharian
Copy link
Contributor

go/loader is deprecated in favor of go/packages. Please give it a try. (The same bug may well exist there. If so, please let us know.)

cc @matloob

@benjaminp
Copy link
Contributor Author

The go/packages < 1.12 fallback code uses the same cgo code as go/loader. But it looks like that's all slated to be deleted imminently?

@matloob
Copy link
Contributor

matloob commented Mar 21, 2019

The go/packages fallback code was just deleted as of golang.org/cl/166537.

As @josharian noted above, go/loader is deprecated. We don't plan on making changes to go/loader except to fix serious bugs.

@andybons andybons changed the title x/tools/go/loader should respect PKG_CONFIG environmental variable x/tools/go/loader: should respect PKG_CONFIG environmental variable May 14, 2019
@andybons
Copy link
Member

Closing as the package is deprecated.

@golang golang locked and limited conversation to collaborators May 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants