-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
build: use the system provided libmsgpack and libsqlite3 if found #9572
Open
ThomasDevoogdt
wants to merge
4
commits into
fluent:master
Choose a base branch
from
ThomasDevoogdt:feature/libmsgpack-system-lib
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+54
−14
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
59904b1
build: use the system provided msgpack if found
ThomasDevoogdt 2c27a43
build: use the system provided sqlite if found
ThomasDevoogdt 77d67ab
workflows: pr-compile-check.yaml: add libsqlite3-dev system library test
ThomasDevoogdt a7a4518
workflows: pr-compile-check.yaml: improve the system libraries test
ThomasDevoogdt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# msgpack cmake | ||
option(MSGPACK_ENABLE_CXX OFF) | ||
option(MSGPACK_ENABLE_SHARED OFF) | ||
option(MSGPACK_BUILD_TESTS OFF) | ||
option(MSGPACK_BUILD_EXAMPLES OFF) | ||
include_directories( | ||
${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_MSGPACK}/include | ||
) | ||
add_subdirectory(${FLB_PATH_LIB_MSGPACK} EXCLUDE_FROM_ALL) | ||
set(MSGPACK_LIBRARIES "msgpack-c-static") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# sqlite cmake | ||
include_directories( | ||
${FLB_PATH_ROOT_SOURCE}/${FLB_PATH_LIB_SQLITE} | ||
) | ||
add_subdirectory(${FLB_PATH_LIB_SQLITE}) | ||
set(SQLITE_LIBRARIES "sqlite3") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this required?
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.
This is the whole intention of this PR. Allowing to link fluent-bit against system libraries instead of build-int libraries. So adding this to the apt-get hook, ensures we test the libsqlite3 linking.
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.
Sure but where do we test it?
My main query was we added it here but not the actual packaging build and not any of the other libraries in this PR so wanted to check why. Can we add a comment to indicate this was added specifically to test the linkage? Otherwise someone will remove it later or wonder why (probably me!).
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.
The test here is about this
"# Sanity check for compilation using system libraries"
But it's perhaps better to effective assert if these libs are used.
See the
ldd ./bin/fluent-bit
which gives something like:(See https://github.com/fluent/fluent-bit/actions/runs/12705012946/job/35415319384)
So perhaps we should assert that libsqlite3 is in that list, together with the other tested libraries.
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 added a commit to test it.
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 we can do that I think, sorry if I missed where it was being done but a comment saying "adding this to support using system libraries and verified here: xxx" would help.
We can then see why it should not be mirrored into the centos7 image used for building - which would not be obvious particularly next time we have to tweak deps on both.
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.
Updated that last commit, with an extra step to make it clear that these packages are part of the test.