-
Notifications
You must be signed in to change notification settings - Fork 1.7k
plugins: kafka: fix cmake cross compile error #9600
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
base: master
Are you sure you want to change the base?
plugins: kafka: fix cmake cross compile error #9600
Conversation
b398800
to
c96d616
Compare
c96d616
to
abc06b7
Compare
@edsiper It has been a while. Any chance that this gets approved? I try to reduce my own patch list. |
@edsiper Happy New Year! Can you have a look at this PR please? |
@edsiper @leonardo-albertovich @fujimotos @koleini This PR is open for a while. Is it possible to have a look? |
abc06b7
to
5c51513
Compare
Can we rebase to see if it resolves the unit test failures? |
5c51513
to
18017d7
Compare
I rebased it. |
@patrick-stephens rebased it, and all checks are passing. |
@patrick-stephens what is the next step to get this merged? I also have other open PRs which are approved, but not merged yet. Can you check my other PRs also? https://github.com/fluent/fluent-bit/pulls/ThomasDevoogdt |
@edsiper will be merging when he is happy to put it in a release - be aware we're finalising the 4.0 release now. |
@patrick-stephens @edsiper I see that 4.0.0 has landed, this is the ideal moment to consider this PR. |
@patrick-stephens can you also check this one, while at it? |
Looks fine to me, just want to check @edsiper is happy with the commit title |
18017d7
to
86fb988
Compare
@patrick-stephens @edsiper I couldn't really find a similar example for the git message log. But I changed it a bit to what is probably more right. Can you have a look at this PR? |
86fb988
to
8c60cbf
Compare
@cosmo0920 This is another cross compilation issue I encountered. |
How could we check this issue? Just using gcc-aarch64-linux-gnu on x86_64 platform to cross compiling is enough? |
It took me some time to reproduce, but these are the steps: git clone https://github.com/buildroot/buildroot.git
cd buildroot
rm package/fluent-bit/0001-plugins-kafka-fix-cmake-cross-compile-error.patch
echo support/config-fragments/autobuild/bootlin-x86-64-glibc.config,x86_64 > toolchain-configs.csv
./utils/test-pkg -p fluent-bit -t toolchain-configs.csv And follow the output in another shell: tail -F br-test-pkg/bootlin-x86-64-glibc/logfile You can also fix stuff by going to the work folder, and change the current checkout: cd br-test-pkg/bootlin-x86-64-glibc/
# edit build/fluent-bit-4.0.2/
make You will see this error:
|
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 checked the behavior around this line: https://github.com/fluent/fluent-bit/blob/master/CMakeLists.txt#L1144
Yep, KAFKA_INCLUDEDIR is originated from there and this change is valid. 👍
Note: This patch is originated from Fluent Bit side of glitches among CMakeLists.txt and kafka plugins. So, we need to handle this compilation error on this repo. |
@cosmo0920 It has been approved for a while, can this be merged? |
let's resolve the conflicts since we had recent changes in the Kafka layer and make it part of the next release |
8c60cbf
to
9d51c13
Compare
@edsiper I rebased the branch. Perhaps you can still take it along? |
Looks like CentOS stream dependencies have gone even more incompatible... |
I don't think it is related with this PR, can you restore the milestone label? |
9d51c13
to
fb46e10
Compare
@edsiper @patrick-stephens can you have a look, this has been approved before, I don't see any issues anymore, can this be merged? |
Yeah I am fine with it, I think the Debian failures are unrelated. |
KAFKA_INCLUDEDIR is not set if FLB_PREFER_SYSTEM_LIB_KAFKA is not used, when cross-compiling, it just translates to -I/librdkafka, which is not allowed. Fix this by only including KAFKA_INCLUDEDIR if really set. x86_64-linux-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/librdkafka' Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
fb46e10
to
dcecf8f
Compare
@patrick-stephens @edsiper It's again a bit silent around this PR. Everything is approved and ready to be merged, on what do we exactly wait? Can you just merge this one? |
@cosmo0920 Can you put this PR back on another more milestone, I have the feeling that next means forgotten. Or just merge this one. |
KAFKA_INCLUDEDIR is not set if FLB_PREFER_SYSTEM_LIB_KAFKA is not used, when cross-compiling, it just translates to -I/librdkafka, which is not allowed. Fix this by only including KAFKA_INCLUDEDIR if really set.
x86_64-linux-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/librdkafka'
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.