GNU bug report logs - #77840
Testing diffutils 3.12 on PPC Mac OS X 10.4.11, Tiger, produces so many failures

Previous Next

Package: diffutils;

Reported by: Peter Dyballa <Peter_Dyballa <at> Web.DE>

Date: Wed, 16 Apr 2025 10:55:02 UTC

Severity: normal

Full log


Message #38 received at 77840 <at> debbugs.gnu.org (full text, mbox):

From: Peter Dyballa <Peter_Dyballa <at> Web.DE>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 77840 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#77840: Testing diffutils 3.12 on PPC Mac OS X
 10.4.11, Tiger, produces so many failures
Date: Wed, 21 May 2025 13:29:46 +0200
I tried to build diffutils 3.11 and 3.12 with GCC 14.2, both fail here:

	/opt/local/bin/gcc-mp-14 -std=gnu23  -I.   -I/opt/local/include   -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits -Wno-unused-const-variable -Wno-unsuffixed-float-constants -Wno-error -pipe -Os -arch ppc -MT libdiffutils_a-sigsegv.o -MD -MP -MF .deps/libdiffutils_a-sigsegv.Tpo -c -o libdiffutils_a-sigsegv.o `test -f 'sigsegv.c' || echo './'`sigsegv.c
	sigsegv.c: In function 'sigsegv_handler':
	sigsegv.c:1169:11: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	 1169 |           SIGSEGV_FOR_ALL_SIGNALS (signo, signal (signo, SIG_DFL);)
	      |           ^~~~~~~~~~~~~~~~~~~~~~~
	      |           |
	      |           void (*)(void)
	In file included from /usr/include/signal.h:63,
	                 from ./signal.h:52,
	                 from sigsegv.h:48,
	                 from sigsegv.c:23:
	/usr/include/sys/signal.h:419:23: note: expected 'void (*)(int)' but argument is of type 'void (*)(void)'
	  419 | void    (*signal(int, void (*)(int)))(int);
	      |                       ^~~~~~~~~~~~~
	sigsegv.c:1169:11: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	 1169 |           SIGSEGV_FOR_ALL_SIGNALS (signo, signal (signo, SIG_DFL);)
	      |           ^~~~~~~~~~~~~~~~~~~~~~~
	      |           |
	      |           void (*)(void)
	/usr/include/sys/signal.h:419:23: note: expected 'void (*)(int)' but argument is of type 'void (*)(void)'
	  419 | void    (*signal(int, void (*)(int)))(int);
	      |                       ^~~~~~~~~~~~~
	sigsegv.c: In function 'sigsegv_deinstall_handler':
	sigsegv.c:1395:7: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	 1395 |       SIGSEGV_FOR_ALL_SIGNALS (sig, signal (sig, SIG_DFL);)
	      |       ^~~~~~~~~~~~~~~~~~~~~~~
	      |       |
	      |       void (*)(void)
	/usr/include/sys/signal.h:419:23: note: expected 'void (*)(int)' but argument is of type 'void (*)(void)'
	  419 | void    (*signal(int, void (*)(int)))(int);
	      |                       ^~~~~~~~~~~~~
	sigsegv.c:1395:7: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	 1395 |       SIGSEGV_FOR_ALL_SIGNALS (sig, signal (sig, SIG_DFL);)
	      |       ^~~~~~~~~~~~~~~~~~~~~~~
	      |       |
	      |       void (*)(void)
	/usr/include/sys/signal.h:419:23: note: expected 'void (*)(int)' but argument is of type 'void (*)(void)'
	  419 | void    (*signal(int, void (*)(int)))(int);
	      |                       ^~~~~~~~~~~~~
	sigsegv.c: In function 'stackoverflow_deinstall_handler':
	sigsegv.c:1472:7: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	 1472 |       SIGSEGV_FOR_ALL_SIGNALS (sig, signal (sig, SIG_DFL);)
	      |       ^~~~~~~~~~~~~~~~~~~~~~~
	      |       |
	      |       void (*)(void)
	/usr/include/sys/signal.h:419:23: note: expected 'void (*)(int)' but argument is of type 'void (*)(void)'
	  419 | void    (*signal(int, void (*)(int)))(int);
	      |                       ^~~~~~~~~~~~~
	sigsegv.c:1472:7: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	 1472 |       SIGSEGV_FOR_ALL_SIGNALS (sig, signal (sig, SIG_DFL);)
	      |       ^~~~~~~~~~~~~~~~~~~~~~~
	      |       |
	      |       void (*)(void)
	/usr/include/sys/signal.h:419:23: note: expected 'void (*)(int)' but argument is of type 'void (*)(void)'
	  419 | void    (*signal(int, void (*)(int)))(int);
	      |                       ^~~~~~~~~~~~~
	make[2]: *** [libdiffutils_a-sigsegv.o] Error 1
	make[2]: Leaving directory `/opt/local/var/macports/build/_Volumes_BSD-Linux_macports-ports_sysutils_diffutils/diffutils/work/diffutils-3.12/lib'

Adding -Wincompatible-pointer-types to turn errors into warning does change the failure. SIG_DFL is #define'd in sgnal.h:

	  116	#if defined(_ANSI_SOURCE) || defined(_POSIX_C_SOURCE) || defined(__cplusplus)
	  117	/*
	  118	 * Language spec sez we must list exactly one parameter, even though we
	  119	 * actually supply three.  Ugh!
	  120	 * SIG_HOLD is chosen to avoid KERN_SIG_* values in <sys/signalvar.h>
	  121	 */
	  122	#define	SIG_DFL		(void (*)(int))0
	  123	#define	SIG_IGN		(void (*)(int))1
	  124	#define	SIG_HOLD	(void (*)(int))5
	  125	#define	SIG_ERR		((void (*)(int))-1)
	  126	#else
	  127	/* DO NOT REMOVE THE COMMENTED OUT int: fixincludes needs to see them */
	  128	#define	SIG_DFL		(void (*)(/*int*/))0
	  129	#define	SIG_IGN		(void (*)(/*int*/))1
	  130	#define	SIG_HOLD	(void (*)(/*int*/))5
	  131	#define	SIG_ERR		((void (*)(/*int*/))-1)
	  132	#endif

None of _ANSI_SOURCE, _POSIX_C_SOURCE, or __cplusplus are defined by GCC 14.2 here. As an amateur I have no idea how to solve this, so I'm going to live with the Apple supplied tools.

--
Greetings

  Pete

One cannot live by television, video games, top ten CDs, and dumb movies alone.
– Amiri Baraka, 1999








This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.