Bugzilla – Bug 1225852
Package libgnomesu does not build with gcc14 because of new errors
Last modified: 2024-07-11 08:15:03 UTC
GCC 14 newly by default treats as errors a number of situations which before were only warnings. For more information see https://gcc.gnu.org/gcc-14/porting_to.html and meta bug #1220571. Because of this, package $PKG fails to compile. This can be seen online at: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/libgnomesu/standard/x86_64 It can be reproduced locally with command: osc build --clean --alternative-project home:rguenther:nextgcc The (first) error (that halts the build) is: [ 20s] xmalloc.c:61:7: error: conflicting types for ‘rpl_realloc’; have ‘void *(char *, size_t)’ {aka ‘void *(char *, long unsigned int)’} [ 20s] 61 | void *rpl_realloc (char *p, size_t n); [ 20s] | ^~~~~~~~~~~ [ 20s] <command-line>: note: previous declaration of ‘rpl_realloc’ with type ‘void *(void *, size_t)’ {aka ‘void *(void *, long unsigned int)’}
With a correct "losetup -d" in the script, error rate increased to 55 of 20000 attempts. (losetup -d is faster, as it attempts to detach only a single loop device I stepped forward, and added "losetup -a -l" in case of failure. In the most cases, the device did not exist any more, but in 2/50000 attempts it did. And what surprise: NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC /dev/loop0 0 0 1 0 /root/file.img 0 512 This indicates a problem. It should not be 512. Digging deeper, calling "losetup -a -l" multiple times, I realized that even if the loop device is created by a single ioctl(4, LOOP_CONFIGURE, {fd=3, block_size=4096, info={lo_offset=0, lo_number=0, lo_flags=LO_FLAGS_DIRECT_IO, lo_file_name="/root/file1.img", ...}}) internally in the kernel it is created as a basic device, and a latter it sets DIO and logical sector size: NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC /dev/loop0 0 0 1 0 /root/file.img 0 512 NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC /dev/loop0 0 0 0 0 /root/file.img 1 4096 This indicates a bug in the kernel: kernel sometimes fails to sed DIO and logical block size, but but the ioctl returns 0. And for some reason, that buggy device exists even after "udevadm settle".
(In reply to Stanislav Brabec from comment #1) > With a correct "losetup -d" in the script, error rate increased to 55 of > 20000 attempts. (losetup -d is faster, as it attempts to detach only a > single loop device > [...] Did you perhaps intend to write the above to a different bug?
(In reply to Martin Jambor from comment #2) > Did you perhaps intend to write the above to a different bug? Yes, sorry.
I have created https://build.opensuse.org/request/show/1186647 for this issue. The patch messes directly with the configure script which generates code snippets which are not compliant with C99. I patched directly those, the patch can be dropped once upstream also encounters GCC 14 and will re-generate their configure script.
The upstream is dead for a long time. We forked it at https://github.com/openSUSE/libgnomesu, as it is still used in our menu system. I made last several releases. I'll check where the code comes from and either fix it or re-generate.
Your fix in the upstream: https://github.com/openSUSE/libgnomesu/commit/2a3e247623693c74284debc3cbfe71f6f6c706e2 Released and submitted. Thanks for your work. https://build.opensuse.org/request/show/1186721
This is an autogenerated message for OBS integration: This bug (1225852) was mentioned in https://build.opensuse.org/request/show/1186764 Factory / libgnomesu