forked from RepentantGopher/tnt-kafka
-
Notifications
You must be signed in to change notification settings - Fork 14
Builtin rdkafka library with cmake option STATIC_BUILD #5
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3f3e77e
Add librdkafka dependency as submodule
RunsFor 5a2d440
Link rdkafka statically with BUNDLE_RDKAFKA option
RunsFor 201f14f
Bypass BUILD_RDKAFKA from rockspec to cmake
RunsFor 6261ca7
Add cmake build script for rdkafka
RunsFor cda420b
Update readme with new cmake option
RunsFor abe4ee9
cmake: Rename BUNDLE_RDKAFKA option to STATIC_BUILD
RunsFor 1984c62
Update url to rockspec from README example
RunsFor 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 hidden or 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,3 @@ | ||
[submodule "librdkafka"] | ||
path = librdkafka | ||
url = https://github.com/edenhill/librdkafka.git |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
macro(buildrdkafka) | ||
add_custom_target( | ||
rdkafka | ||
COMMAND ./configure | ||
COMMAND make | ||
COMMAND make install | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/librdkafka | ||
VERBATIM | ||
) | ||
endmacro() |
This file contains hidden or 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
Submodule librdkafka
added at
8695b9
This file contains hidden or 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
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.
ENABLE_BUNDLED_FOO seems to be a standard name for such configuration options.
https://github.com/tarantool/tarantool/blob/d07e3ac2facfc5c5cec43ff138e2bdbd1fab1011/CMakeLists.txt#L304
https://github.com/tarantool/tarantool-c/blob/e9f17d649c2ee543cd505ceeff59e050763528a9/CMakeLists.txt#L38-L39
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 want a single option that will be the same for all rocks and mean roughly "link all your stuff statically, and don't use anything external". Hence STATIC_BUILD
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.
Nothing blocks us with that. We still can add separate options and the helper one. This is the right way, because packaging for distros usually requires linking with system libraries, but sometimes there are problems with some specific system libraries: e.g. lack of them in certain distros.
Hipster way packaging should not break existing agreements. Otherwise it would be the systemd way: a half of the world will hate us.
Uh oh!
There was an error while loading. Please reload this page.
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'm not saying we should remove BUNDLED*, I'm just saying there should be a universal option that you can use to link all dependencies statically. It could be an alias of BUNDLED_* in case if there is only one dependency. But if there is more than one (which is true in case of kafka), it should statically link everything.
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.
As for systemd, there is only a small and vocal hater community, which doesn't even have strong arguments, except the fact that systemd is monolithic.
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'm not against. Thanks for the clarification.