-
-
Notifications
You must be signed in to change notification settings - Fork 979
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
Fix for FreeBSD with static_assert #5398
Conversation
On FreeBSD kitty fails to build due to "type specifier missing" in static_assert. We currently patch it to replace it with _Static_assert. This pull requests aims to take the change upstream . Discussion here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265393
static_assert is part of the C11 standard. If its not in the freebsd headers that's a bug there. It is supposed to be defined as a macro that expands to _Static_assert. kitty is compiled with -std c11 so this macro must be defined. The proper fix is to figure out why its not defined for you. And if you cant figure that out, then a better fix is to use #ifndef static_assert
#define static_assert _Static_assert
#endif |
Hi, We went to a similar problem with xxHash issue and is said "use _Static_assert instead, which is directly part of the C11 language". I'm not a programmer but indeed that fix was applied by upstream. Thanks |
static_assert is also part of the C11 standard and the reason it is prefered |
You have a point on that and it seems to be clang related because FreeBSD kitty-0.25.2 builds:
[1] build log:
Any hints? Thanks |
I suggest simply patching locally if you are trying to build with ancient clang. The patch I posted in my previous comment should work fine. If it does, let me know and I will see about adding it to kitty's code. |
Your patch is OK as long as kitty never happens to use data-types.h in a |
I'm ok with that, this was the only workaround found to avoid "port broken" on 12.3. Well I could patch it only for 12.3 or wait that upstream do a change that fix it for ancient clang using a correct way to do it. |
Sorry I was a little bit lost thinking port patch was the recommended by upstream. I've tested your recomendation and port builds in all releases (including ancient clang 10.0.0.1):
Now I can use an if condition to apply it only were it is needed, 12.3, ancient clang. What you think the best option is? Thanks |
On Mon, Aug 22, 2022 at 05:51:45AM -0700, nunotexbsd wrote:
Now I can use an if condition to apply it only were it is needed, 12.3, ancient clang.
What you think the best option is?
Do that, I am not interested in upstreaming this patch given it is for one particular
ancient compiler version one one OS. The patch itself should be fairly
robust.
|
- Use upstream patch instead of workaround fix kovidgoyal/kitty#5398 - Bump PORTREVISION PR: 265393 MFH: 2022Q3
- Use upstream patch instead of workaround fix kovidgoyal/kitty#5398 - Bump PORTREVISION PR: 265393 MFH: 2022Q3 (cherry picked from commit adf824b)
Thank you very much for your help @kovidgoyal. https://cgit.freebsd.org/ports/commit/?id=adf824b09c349ee00ac25189c2f98e3fc2c48953 Cheers |
- Use upstream patch instead of workaround fix kovidgoyal/kitty#5398 - Bump PORTREVISION PR: 265393 MFH: 2022Q3 (cherry picked from commit adf824b)
On FreeBSD kitty fails to build due to "type specifier missing" in
static_assert.
We currently patch it to replace it with _Static_assert.
This pull requests aims to take the change upstream .
Discussion here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265393