-
Notifications
You must be signed in to change notification settings - Fork 3.2k
CMakeLists.txt: allow compilation without CXX support #4366
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?
CMakeLists.txt: allow compilation without CXX support #4366
Conversation
de88d6f to
98320bb
Compare
…fluent#7741 e.g. fluent-bit is a c-only library, so allow compilation without cxx Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
…fluent#7741 e.g. fluent-bit is a c-only library, so allow compilation without cxx Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
98320bb to
8a74726
Compare
deca571 to
12520e5
Compare
|
@emasab, a kind remember |
261eb15 to
e9183d5
Compare
e9183d5 to
9590d99
Compare
|
@emasab, @NZKoz, @ctrochalakis, @thijsc, @janmejay, @milindl Hi all, This PR has been open for quite some time, is it possible to review and/or approve? This commit solves this issue: Also solves this issue in fluent-bit:
Which in turn would supersede a patch in buildroot: Kr, Thomas Devoogdt |
9590d99 to
941da36
Compare
8f2c14e to
d86a7d1
Compare
d86a7d1 to
9a5609d
Compare
9a5609d to
0a7cef8
Compare
@emasab, @NZKoz, @ctrochalakis, @thijsc, @janmejay, @milindl Please, can anyone review this PR? Or just being polite and reject it with a small comment? |
0a7cef8 to
f50f5c8
Compare
f50f5c8 to
2114bd2
Compare
2114bd2 to
d2563e6
Compare
d2563e6 to
89b1f50
Compare
|
@emasab can you consider this PR? |
89b1f50 to
69552ac
Compare
5f55e00 to
81aadb4
Compare
Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
|
@emasab can you have a look at this PR? With some luck, it can be merged just within 2 years. |
a7cb234 to
f7f83f2
Compare
Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
|
@ThomasDevoogdt sorry for the late reply but as you can imagine we've a schedule of features to add to stay on parity with the Java client and about the community issues we give priority to the critical ones. In this case librdkafka has a C++ client too so it's fair it's requiring a C++ compiler. |
Hi, thx for the response. I know that this PR looks like an "enhancement", but I do consider it more a bug that the librdkafka C library requires C++. Not all targets do have a C++ compiler out of the box. I'm working on a PR in fluent-bit fluent/fluent-bit#9277 to check if compilation succeeds without a C++ compiler. But they are a bit waiting on this to be merged. Yes, I can help myself to apply patches on my build targets, but it would help me seriously if this patch doesn't have to wait "for much time" (Which it has been doing for 2 years). Beware that this PR doesn't really change anything if C++ is just available, so there is no real regression possible here. |
|
It cannot be considered a bug as librdkafka never allowed to compile without a C++ compiler, if it was allowed an it was not working it would be a bug. When changing it for CMake it should be allowed to compile without C++ with Disabling C++ should only be done on purpose like passing a |
I know, C++ support was indeed always expected, but that doesn't mean it should be. Sometimes you just don't need it.
I don't see any mention of
The current way of doing it on purpose is CXX=/bin/false, I don't see the added value of having to pass e.g. -DDISABLE_CXX=ON. See this output: With C++ Without C++ $ CXX=/bin/false cmake -GNinja ../
-- The C compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for a CXX compiler
-- Looking for a CXX compiler - NOTFOUND
-- C++ compiler not found, skipping C++ support
$ ninja
$ ls -al src/librdkafka.so*
lrwxrwxrwx 1 thomas thomas 15 aug 7 22:14 src/librdkafka.so -> librdkafka.so.1
-rwxrwxr-x 1 thomas thomas 4346816 aug 7 22:14 src/librdkafka.so.1I think that it's quite clear printed that C++ support has been skipped, you can't miss it either, since |
f7f83f2 to
a77e3bb
Compare
|
@emasab I updated the test part. |
Upstream is not really amused with the proposal to allow compilation without CXX support, see confluentinc/librdkafka#4366. So disable it from the check for now. Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream is not really amused with the proposal to allow compilation without CXX support, see confluentinc/librdkafka#4366. So disable it from the check for now. Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream is not really amused with the proposal to allow compilation without CXX support, see confluentinc/librdkafka#4366. So disable it from the check for now. Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream is not really amused with the proposal to allow compilation without CXX support, see confluentinc/librdkafka#4366. So disable it from the check for now. Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream is not really amused with the proposal to allow compilation without CXX support, see confluentinc/librdkafka#4366. So disable it from the check for now. Signed-off-by: Thomas Devoogdt <[email protected]>
|
@emasab its again a bit silent here. I assume that you don't really like the pull request update? Is e.g. adding a CMakeLists.txt option better? Which is more explicit to do... |
e.g. fluent-bit is a c-only library, so allow compilation without cxx Signed-off-by: Thomas Devoogdt <[email protected]>
a77e3bb to
7576aa6
Compare
Upstream: confluentinc/librdkafka#4366 Signed-off-by: Thomas Devoogdt <[email protected]>
Upstream is not really amused with the proposal to allow compilation without CXX support, see confluentinc/librdkafka#4366. So disable it from the check for now. Signed-off-by: Thomas Devoogdt <[email protected]>
e.g. fluent-bit is a c-only library, so allow compilation without cxx