-
Notifications
You must be signed in to change notification settings - Fork 116
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
Build failure with stricter C compilers (e.g. GCC 14) #615
Comments
This is an issue with CDK I would say. cdk-devel-5.0.20230201-1.1.x86_64 on openSUSE tumbleweed: In older CDK 4.9.13 it was char**, so CDK changes its prototypes. I could add a configure check, but perhaps you can update cdk to version 5? |
or we enforce use of cdk >= 5 |
huh, interestingly, we only have these versions.. 5.0.20210324-r2, 5.0.20221025, 5.0.20230201 let me see if a configure test got confused.. |
check cdk_config.h too on your side. |
ok, my cdk_config.h has:
configure for gphoto2 says:
config.h says for gphoto2 says:
looking more.. |
jwakely kindly tested for me on Fedora and shared their Diffing the two:
It turns out Fedora (and openSUSE) builds cdk with So, this is PEBKAC to an extent, and I'll fix our package for cdk in Gentoo now. Up to you if you think configure for gphoto2 should check for this. Thank you for the help! |
I don't understand why, in the year 2023, this is optional or at the very least not default-on, but whatever. It turns out that Fedora and openSUSE at least, probably many others, are building cdk with --enable-const which is why this only showed up on Gentoo. We do the same --enable-const dance for ncurses so I suppose I should've known. Enable it for parity given it should be fine to go in this direction anyway. Bug: gphoto/gphoto2#615 Closes: https://bugs.gentoo.org/919279 Signed-off-by: Sam James <sam@gentoo.org>
FWIW its not a super state of cdk being API flexible this way. |
i replaced "const" by CDK_CONST in the affected places now, this might help with both variants. |
Describe the bug
Modern C compilers are becoming stricter with a variety of changes over the last year or so.
GCC 14 in particular (to be released in ~April 2024) fails to build gphoto2-2.2.58 like:
Originally reported downstream in Gentoo at https://bugs.gentoo.org/919279.
Name the camera
N/A
libgphoto2 and gphoto2 version
libgphoto2-2.5.1, gphoto2-2.5.28
To Reproduce
Steps to reproduce the behavior: This can be emulated with
-Werror=incompatible-pointer-types -Werror=implicit -Werror=int-conversion
on an older GCC or Clang.Similar to gphoto/libgphoto2#941.
The text was updated successfully, but these errors were encountered: