Subject: Re: bug#78509: Coreutils' mv and cp 9.5 do not work properly on old PPC Mac OS X 10.4.11, Tiger

From: Peter Dyballa <[email-masked]>
Date: Wed, 21 May 2025 20:01:45 +0200

> Am 20.Mai.2025 um 19:10 schrieb Paul Eggert <[email-masked]>:
> 
> First, please build and run coreutils 9.7 and try that instead.

Building with GCC 14.2 yields the same as reported before for diffutils 3.12, bug#77840:

	/opt/local/bin/gcc-mp-14 -std=gnu23   -pipe -Os -arch ppc  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -o src/hostid src/hostid.o src/libver.a lib/libcoreutils.a -lintl -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices  lib/libcoreutils.a 
	depbase=`echo src/timeout.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	/opt/local/bin/gcc-mp-14 -std=gnu23  -I. -I./lib  -Ilib -I./lib -Isrc -I./src -I/opt/local/include   -pipe -Os -arch ppc -MT src/timeout.o -MD -MP -MF $depbase.Tpo -c -o src/timeout.o src/timeout.c &&\
	mv -f $depbase.Tpo $depbase.Po
	src/timeout.c: In function 'send_sig':
	src/timeout.c:183:18: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	  183 |     signal (sig, SIG_IGN);
	      |                  ^~~~~~~
	      |                  |
	      |                  void (*)(void)
	In file included from /usr/include/signal.h:63,
	                 from ./lib/signal.h:52,
	                 from /usr/include/sys/select.h:146,
	                 from ./lib/sys/select.h:114,
	                 from /usr/include/unistd.h:483,
	                 from ./lib/unistd.h:40,
	                 from /usr/include/getopt.h:44,
	                 from ./lib/getopt.h:34,
	                 from src/timeout.c:48:
	/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);
	      |                       ^~~~~~~~~~~~~
	src/timeout.c: In function 'main':
	src/timeout.c:539:20: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	  539 |   signal (SIGTTIN, SIG_IGN);   /* Don't stop if background child needs tty.  */
	      |                    ^~~~~~~
	      |                    |
	      |                    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);
	      |                       ^~~~~~~~~~~~~
	src/timeout.c:540:20: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	  540 |   signal (SIGTTOU, SIG_IGN);   /* Don't stop if background child needs tty.  */
	      |                    ^~~~~~~
	      |                    |
	      |                    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);
	      |                       ^~~~~~~~~~~~~
	src/timeout.c:567:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	  567 |       signal (SIGTTIN, 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);
	      |                       ^~~~~~~~~~~~~
	src/timeout.c:568:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	  568 |       signal (SIGTTOU, 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);
	      |                       ^~~~~~~~~~~~~
	src/timeout.c:609:32: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
	  609 |                   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]: *** [src/timeout.o] Error 1
	make[2]: Leaving directory `/opt/local/var/macports/build/_Volumes_BSD-Linux_macports-ports_sysutils_coreutils-devel/coreutils-devel/work/coreutils-9.7'

Adding -Wincompatible-pointer-types to the C compiler flags does not change anything.

--

Mit friedvollen Grüßen

  Pete

We've got to pause and ask ourselves: How much clean air do we need?
				– Lee Iacocca