Murmele / Gittyup

Understand your Git history!
https://murmele.github.io/Gittyup
MIT License
1.37k stars 108 forks source link

Won't build on gcc 14.1 #766

Open alerque opened 1 month ago

alerque commented 1 month ago

Trying to build (to update AUR packaging and my hosted repos for it), but running ino this:

[220/577] Building C object test/dep/zip/CMakeFiles/zip.dir/src/zip.c.o
FAILED: test/dep/zip/CMakeFiles/zip.dir/src/zip.c.o
/usr/bin/cc -DCURR_YEAR=2024 -DENABLE_UPDATE_OVER_GUI -DQT_NO_DEBUG_OUTPUT -I/build/gittyup/src/Gittyup/test/dep/zip/src -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexc
eptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame
-pointer -g -ffile-prefix-map=/build/gittyup/src=/usr/src/debug/gittyup -flto=auto -Wall -Wextra -Werror -pedantic -fPIC -fvisibility=hidden -MD -MT test/dep/zip/CMakeFiles/z
ip.dir/src/zip.c.o -MF test/dep/zip/CMakeFiles/zip.dir/src/zip.c.o.d -o test/dep/zip/CMakeFiles/zip.dir/src/zip.c.o -c /build/gittyup/src/Gittyup/test/dep/zip/src/zip.c
In file included from /build/gittyup/src/Gittyup/test/dep/zip/src/zip.c:39:
/build/gittyup/src/Gittyup/test/dep/zip/src/miniz.h:4988:9: note: ‘#pragma message: Using fopen, ftello, fseeko, stat() etc. path for file I/O - this path may not support lar
ge files.’
 4988 | #pragma message(                                                               \
      |         ^~~~~~~
/build/gittyup/src/Gittyup/test/dep/zip/src/zip.c: In function ‘zip_stream_copy’:
/build/gittyup/src/Gittyup/test/dep/zip/src/zip.c:1676:24: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc
-transposed-args]
 1676 |   *buf = calloc(sizeof(unsigned char), n);
      |                        ^~~~~~~~
/build/gittyup/src/Gittyup/test/dep/zip/src/zip.c:1676:24: note: earlier argument should specify number of elements, later size of each element
cc1: all warnings being treated as errors

Is gcc too new and throwing new warnings? How do we either patch these up or disable warnings-as-errors so it will build anyway?

FabioLolix commented 1 month ago

gcc14 is too new, updating the zip submodules will solve this since the upstream repo build fine from the last commit

alerque commented 1 month ago

Is there a commit we can cherry pick into the release to get the release version to build, or is that going to screw something else up? Or can we get a patch release with just that fix alone even if nothing much else is different?

FabioLolix commented 1 month ago

Is there a commit we can cherry pick into the release to get the release version to build

On master is broken too

or is that going to screw something else up?

No idea and I don't know how to patch git submodules (unless doing dirty tricks in the pkgbuild which would avoid)

Murmele commented 1 month ago

Is this fixed now?

alerque commented 1 month ago

I cherry picked the patch into the stable tag and it does seem to build now. The test suite still fails to me, but given the reports of other issues with the tests that is probably unrelated.

Murmele commented 1 month ago

Thanks for testing.