-
Notifications
You must be signed in to change notification settings - Fork 157
feat: add support for pkg-config #2534
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
Conversation
This patch adds support for `pkg-config`, so that when `go build` is invoked, `libflux` is built as part of finding the path to the library.
// #cgo pkg-config: flux | ||
// #include "influxdata/flux.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand these cgo declarations. Did we move this header file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see above that it was deleted. Still wondering about the way that the naming here changed. Why the influxdata/flux.h
instead of just referencing the file. Does it live somewhere else now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were two flux.h
files (I seem to remember that it's actually just a symlink to the original), and I can't remember the reasoning for it, other than it was a hack to help link the rust from go. With pkg-config
, we don't need to do any weird symlinking or keep copies of files around; the hacks can go away.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I saw that you were able to remove the symlinks with this change. That's awesome. The symlinks were a little confusing and cumbersome to me.
To build flux, first install the `pkg-config` utility, and ensure the GNU `pkg-config` utility is also installed. | ||
|
||
``` | ||
$ go get github.com/influxdata/pkg-config | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for including this. Reading a bit of the pkg-config information helped with understanding some of these changes.
Just a few questions for my own understanding, but overall this looks good to me. |
@wolffcm re-targeted this against |
This was the PR that landed |
This patch adds support for
pkg-config
, so that whengo build
isinvoked,
libflux
is built as part of finding the path to the library.