Fails to build with GCC 15
Status: Beta
Brought to you by:
confusion42
Dear developer,
pdfcrack fails to build on Debian with GCC 15. The following errors are shown:
cc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/PKGS/pdfcrack/pdfcrack-0.20=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wextra -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -O3 -g -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,-z,now -c -o benchmark.o benchmark.c
md5.c: In function ‘md5_50_init’:
md5.c:327:20: error: assignment to ‘void (*)(void)’ from incompatible pointer type ‘void (*)(uint8_t *, const unsigned int)’ {aka ‘void (*)(unsigned char *, const unsigned int)’} [-Wincompatible-pointer-types]
327 | md5_50_variant = &md5_50f;
| ^
md5.c:207:1: note: ‘md5_50f’ declared here
207 | md5_50f(uint8_t *msg, const unsigned int msgLen __attribute__((unused))) {
| ^~~~~~~
md5.c:329:20: error: assignment to ‘void (*)(void)’ from incompatible pointer type ‘void (*)(uint8_t *, const unsigned int)’ {aka ‘void (*)(unsigned char *, const unsigned int)’} [-Wincompatible-pointer-types]
329 | md5_50_variant = &md5_50s;
| ^
md5.c:200:1: note: ‘md5_50s’ declared here
200 | md5_50s(uint8_t *msg, const unsigned int msgLen) {
| ^~~~~~~
md5.c: In function ‘md5_50’:
md5.c:334:3: error: too many arguments to function ‘md5_50_variant’; expected 0, have 2
334 | md5_50_variant(msg, msgLen);
| ^~~~~~~~~~~~~~ ~~~
make[1]: *** [Makefile:19: md5.o] Error 1
make[1]: *** Waiting for unfinished jobs....
main.c: In function ‘main’:
main.c:311:21: error: assignment to ‘__sighandler_t’ {aka ‘void (*)(int)’} from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
311 | act1.sa_handler = alarmInterrupt;
| ^
main.c:40:1: note: ‘alarmInterrupt’ declared here
40 | alarmInterrupt() {
| ^~~~~~~~~~~~~~
In file included from main.c:23:
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
72 | typedef void (*__sighandler_t) (int);
| ^~~~~~~~~~~~~~
make[1]: *** [Makefile:19: main.o] Error 1
benchmark.c: In function ‘runBenchmark’:
benchmark.c:313:18: error: assignment to ‘__sighandler_t’ {aka ‘void (*)(int)’} from incompatible pointer type ‘void (*)(void)’ [-Wincompatible-pointer-types]
313 | act.sa_handler = interruptBench;
| ^
benchmark.c:43:1: note: ‘interruptBench’ declared here
43 | interruptBench() {
| ^~~~~~~~~~~~~~
In file included from benchmark.c:21:
/usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here
72 | typedef void (*__sighandler_t) (int);
| ^~~~~~~~~~~~~~
make[1]: *** [Makefile:19: benchmark.o] Error 1
Regards,
Eriberto
11 years of Debian maintenance of my 19 year old toy, and still going strong Eriberto!
How can I not release a fix? :-)
I shall have a release out before Sunday with this and the FreeBSD patch.
Kind Regards,
Henning Norén
Hi Henning! Thanks a lot for your nice work.
pdfcrack-0.21 has been released with a fix for this issue.