Subject: Re: [bug-diffutils] bug#77840: Testing diffutils 3.12 on PPC Mac OS X 10.4.11, Tiger, produces so many failures

From: Peter Dyballa <[email-masked]>
Date: Tue, 20 May 2025 12:29:09 +0200

> Am 19.Mai.2025 um 20:16 schrieb Paul Eggert <[email-masked]>:
> 
> There are lots of failures there, but unfortunately I don't have access to that old platform so you'll need to do some more digging to isolate the cause.
> 
> Let's look at the first failure.
> 
> echo a > a
> echo b > b
> diff a b
> 
> This doesn't generate the correct output. Can you run 'diff' under a debugger and see why?

This fails… See here:

	pete 243 /\ echo a > a
	pete 244 /\ echo b > b
	pete 247 /\ which gdb ggdb
	/usr/bin/gdb
	ggdb: Command not found.
	pete 248 /\ which diff gdiff
	/usr/bin/diff
	/opt/local/bin/gdiff
	pete 249 /\ gdb --args /opt/local/bin/gdiff a b
	GNU gdb 6.3.50-20050815 (Apple version gdb-696) (Sat Oct 20 18:20:28 GMT 2007)
	Copyright 2004 Free Software Foundation, Inc.
	GDB is free software, covered by the GNU General Public License, and you are
	welcome to change it and/or distribute copies of it under certain conditions.
	Type "show copying" to see the conditions.
	There is absolutely no warranty for GDB.  Type "show warranty" for details.
	This GDB was configured as "powerpc-apple-darwin"...
	warning: --arch option not supported in this gdb.
	Reading symbols for shared libraries ..... done
	
	(gdb) run
	Starting program: /opt/local/bin/gdiff a b
	Reading symbols for shared libraries ..................+ done
	1c1
	< a
	---
	> b
	
	Program exited with code 01.
	(gdb) pete 250 /\ gdb --args /opt/local/bin/gdiff -u a b
	GNU gdb 6.3.50-20050815 (Apple version gdb-696) (Sat Oct 20 18:20:28 GMT 2007)
	Copyright 2004 Free Software Foundation, Inc.
	GDB is free software, covered by the GNU General Public License, and you are
	welcome to change it and/or distribute copies of it under certain conditions.
	Type "show copying" to see the conditions.
	There is absolutely no warranty for GDB.  Type "show warranty" for details.
	This GDB was configured as "powerpc-apple-darwin"...
	warning: --arch option not supported in this gdb.
	Reading symbols for shared libraries ..... done
	
	(gdb) run
	Starting program: /opt/local/bin/gdiff -u a b
	Reading symbols for shared libraries ..................+ done
	--- a	2025-05-20 11:04:52.000000000 +0200
	+++ b	2025-05-20 11:05:08.000000000 +0200
	@@ -1 +1 @@
	-a
	+b
	
	Program exited with code 01.
	(gdb) pete 251 /\ 

The previous tests were made by the MacPorts package manager which creates a somehow own environment. It can be shown when running it in debug mode.

BTW, I had the diffutils uninstalled and reinstalled them for test. The reason for uninstalling is here (Tcsh alias newly created to use gdiff instead of old original Apple diff):

	root 403 /\ alias gdip	'gdiff  ~/Portfiles/Portfile-\!{:1}-312 `port file \!:1`'
	root 404 /\ gdip mupdf
	gdiff: program error
	gdiff: program error
	Abort
	root 405 /\ l ~/Portfiles/Portfile-mupdf-312 `port file mupdf`
	-rw-r--r--   1 root  admin  5395 14 Mai 11:45 .../macports-ports/graphics/mupdf/Portfile
	-rw-r--r--   2 root  wheel  5187 12 Apr 09:31 .../Portfiles/Portfile-mupdf-312

Executing the tests of the just built software starts with:

	#!/bin/sh
	# small examples
	
	. "${srcdir=.}/init.sh"; path_prepend_ ../src

so the actual test

	echo a > a
	echo b > b
	for opt in '' -u -c; do
	  returns_ 1 diff $opt a b > out 2> err || fail=1
	  # Remove date and time.
	  sed -e 's/^\([-+*][-+*][-+*] [^	]*\)	.*/\1/' out > k; mv k out
	  compare exp-$(echo $opt|tr ' ' _) out || fail=1
	done

should be using (g)diff just built.

Trying to run 'make check' from the sources' root directory does not show any progress, so maybe I need a pristine build for testing…

--
Greetings

  Pete                                           0
                                           %-/\_//
                                            (*)(*)