-
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
out_kafka: Make MSVC compatible #1179
Conversation
In Windows, librdkafka implements rwlock_* by itself: https://github.com/edenhill/librdkafka/blob/b677b451700a3548e37298fa070016b5126b71c8/src/tinycthread_extra.h#L86 |
af7f45b
to
1f47d2f
Compare
@cosmo0920 Thanks! I confirmed it worked. |
@edsiper Can we merge this? |
plugins/out_kafka/CMakeLists.txt
Outdated
@@ -14,4 +14,8 @@ set(src | |||
kafka.c) | |||
|
|||
FLB_PLUGIN(out_kafka "${src}" "rdkafka") | |||
target_link_libraries(flb-plugin-out_kafka -lpthread) | |||
if (MSVC) | |||
target_link_libraries(flb-plugin-out_kafka) |
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.
note that line is doing nothing, the condition must be "if i am not on MSVC, link to pthread"
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.
Oops, that's too bad.
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've fixed at f95ad54.
librdkafka is already compatible for MinGW and MSVC. For MSVC, we should avoid to link libpthread. Signed-off-by: Hiroshi Hatake <[email protected]>
1f47d2f
to
f95ad54
Compare
thanks |
This reverts commit 69fffab. Bakashar Kemerbay (and many other Windows users) reports that it causes an immediate abort on Windows environments. In particular, it causes abort even when they does not use out_kafka. For example, I can confirm that even the following command does not work on a vanilla Windows server. $ fluent-bit.exe -i dummy -o stdout This is because librdkafka is dependent on OpenSSL (ssleay32.dll and libeay32.dll), which most Windows servers do not have. Hence fluent-bit.exe always fails due to missing DLL dependencies. So we have to revert this, and revisit it after resolving the dependency issue. Signed-off-by: Fujimoto Seiji <[email protected]>
This reverts commit 69fffab. Bakashar Kemerbay (and many other Windows users) reports that it causes an immediate abort on Windows environments. In particular, it causes abort even when they does not use out_kafka. For example, I can confirm that even the following command does not work on a vanilla Windows server. $ fluent-bit.exe -i dummy -o stdout This is because librdkafka is dependent on OpenSSL (ssleay32.dll and libeay32.dll), which most Windows servers do not have. Hence fluent-bit.exe always fails due to missing DLL dependencies. So we have to revert this, and revisit it after resolving the dependency issue. Signed-off-by: Fujimoto Seiji <[email protected]>
This reverts commit 69fffab. Bakashar Kemerbay (and many other Windows users) reports that it causes an immediate abort on Windows environments. In particular, it causes abort even when they does not use out_kafka. For example, I can confirm that even the following command does not work on a vanilla Windows server. $ fluent-bit.exe -i dummy -o stdout This is because librdkafka is dependent on OpenSSL (ssleay32.dll and libeay32.dll), which most Windows servers do not have. Hence fluent-bit.exe always fails due to missing DLL dependencies. So we have to revert this, and revisit it after resolving the dependency issue. Signed-off-by: Fujimoto Seiji <[email protected]>
This reverts commit 69fffab. Bakashar Kemerbay (and many other Windows users) reports that it causes an immediate abort on Windows environments. In particular, it causes abort even when they does not use out_kafka. For example, I can confirm that even the following command does not work on a vanilla Windows server. $ fluent-bit.exe -i dummy -o stdout This is because librdkafka is dependent on OpenSSL (ssleay32.dll and libeay32.dll), which most Windows servers do not have. Hence fluent-bit.exe always fails due to missing DLL dependencies. So we have to revert this, and revisit it after resolving the dependency issue. Signed-off-by: Fujimoto Seiji <[email protected]> Signed-off-by: Hassan Farid <[email protected]>
This reverts commit 69fffab. Bakashar Kemerbay (and many other Windows users) reports that it causes an immediate abort on Windows environments. In particular, it causes abort even when they does not use out_kafka. For example, I can confirm that even the following command does not work on a vanilla Windows server. $ fluent-bit.exe -i dummy -o stdout This is because librdkafka is dependent on OpenSSL (ssleay32.dll and libeay32.dll), which most Windows servers do not have. Hence fluent-bit.exe always fails due to missing DLL dependencies. So we have to revert this, and revisit it after resolving the dependency issue. Signed-off-by: Fujimoto Seiji <[email protected]>
librdkafka is already compatible for MinGW and MSVC.
For MSVC, we should avoid to link libpthread.
Signed-off-by: Hiroshi Hatake [email protected]
I've confirmed with the folllowing fluent-bit settings:
Part of #960.