-
Notifications
You must be signed in to change notification settings - Fork 157
feat: add support for pkg-config #2555
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
8ee1f46
to
a1f2f3e
Compare
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.
A comment on improving the makefile but it looks good otherwise.
3e74676
to
b652872
Compare
a0309e3
to
2cab465
Compare
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. Please enter the commit message for your changes. Lines starting
Restoring and saving the gocache seems to interfere with `pkg-config`. In the future, we can try to build `pkg-config` in a way where this doesn't happen, but we don't get a lot of benefit from restoring the gocache anyway so there isn't a lot of reason to save it. The problem is that go will run `pkg-config --libs` to obtain the library linker flags when it compiles the static library for a dependency. When it links the final binary, it then uses the libraries saved from that invocation. It caches this output inside of the gocache and doesn't rerun it unless the package changes. This causes a unique problem for CI. CI will save the gocache which contains the build artifact from the go build, but when building flux locally, it doesn't contain the static libraries that were created by `pkg-config`. We then run CI again and restore the go build cache. Now, the library is gone because it was kept in the repository and is no longer present, but the build cache entry still exists and it doesn't rerun `pkg-config`. Since the gocache causes us more trouble than it saves, this eliminates restoring and saving the gocache. We can fix the underlying problem in `pkg-config` later at our discretion.
2cab465
to
831e59e
Compare
Codecov Report
@@ Coverage Diff @@
## feat/use-algo-w #2555 +/- ##
================================================
Coverage 51.15% 51.15%
================================================
Files 297 297
Lines 38132 38132
================================================
Hits 19507 19507
Misses 16443 16443
Partials 2182 2182
Continue to review full report at Codecov.
|
This patch adds support for
pkg-config
, so that whengo build
isinvoked,
libflux
is built as part of finding the path to the library.