[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
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

2.4.0 fails to build with Clang < 18 and GCC < 14 #84

Open
jbeich opened this issue Oct 7, 2024 · 3 comments
Open

2.4.0 fails to build with Clang < 18 and GCC < 14 #84

jbeich opened this issue Oct 7, 2024 · 3 comments

Comments

@jbeich
Copy link
jbeich commented Oct 7, 2024

cagebreak still builds fine with -std=c11 and (unlike wlroots where -std=c23 is autodetected) doesn't use __VA_OPT__. Why intentionally break then?

$ cc --version
FreeBSD clang version 17.0.6 (https://github.com/llvm/llvm-project.git llvmorg-17.0.6-0-g6009708b4367)
Target: x86_64-unknown-freebsd13.3
Thread model: posix
InstalledDir: /usr/bin

$ meson setup _build
The Meson build system
Version: 1.6.0.rc1
Source dir: .../cagebreak-2.4.0
Build dir: .../cagebreak-2.4.0/_build
Build type: native build
meson_options.txt:3: WARNING: Project does not target a minimum version but uses feature deprecated since '1.1.0': "boolean option" keyword argument "value" of type str. use a boolean, not a string
meson_options.txt:4: WARNING: Project does not target a minimum version but uses feature deprecated since '1.1.0': "boolean option" keyword argument "value" of type str. use a boolean, not a string
meson_options.txt:5: WARNING: Project does not target a minimum version but uses feature deprecated since '1.1.0': "boolean option" keyword argument "value" of type str. use a boolean, not a string
Project name: cagebreak
Project version: 2.4.0

meson.build:3:0: ERROR: None of values ['c23'] are supported by the C compiler. Possible values for option "C_std" are ['none', 'c89', 'c99', 'c11', 'c17', 'c18', 'c2x', 'gnu89', 'gnu99', 'gnu11', 'gnu17', 'gnu18', 'gnu2x']

A full log can be found at .../cagebreak-2.4.0/_build/meson-logs/meson-log.txt
@project-repo
Copy link
Owner

Hi jbeich,
Sorry for this. The issue is that the code is strictly speaking not
std<23 compatible. (ISO C99 requires at least one argument for the "..."
in a variadic macro). The only possibility we saw for fixing this was to
require at least std=3Dc23. So we had the tension between having a
release build with no warnings basically for free vs a big cost of
conforming to new warnings for an older version of C - though it did
break stuff, even for us (fuzzing) it seemed like the best option.

We are very open to ideas that address the issue.

Cheers
project-repo

@jbeich
Copy link
Author
jbeich commented Oct 7, 2024

ISO C99 requires at least one argument for the "..." in a variadic macro

Clang doesn't print this warning in -std=c11 mode. See downstream build log after applying workaround.

@project-repo
Copy link
Owner

Thank you very much for your swift reply, we will include the patch for meson.build in our next release, which will hopefully occur sooner than last time.

cheers
project-repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants