[Tcsh] tcsh and Alpine Linux: progress, anyone?

Nelson H. F. Beebe beebe at math.utah.edu
Sat Nov 26 13:52:08 UTC 2022


Vlad points to a patch for tcsh on Alpine Linux:

>> https://git.alpinelinux.org/aports/tree/community/tcsh/001-sysmalloc.patch

Thanks!  

It does not apply with "patch -p1 < 001-sysmalloc.patch" because the
tcsh source code has since changed, but the essential thing is that
for Alpine Linux, the symbolic SYSMALLOC must be defined.  The Alpine
patch in the URL above is brutal: it removes the test for 9 other
symbols, and thus cannot be part of the tcsh distribution.

On the '#if defined(__MACHTEN__) ...' statement at line 150 of
config_f.h, I added to the end ' || defined(__ALPINE__)', then edited
the Makefile to have

	CFLAGS = -I/usr/uumath/include -D__ALPINE__

That is necessary because there is no symbol defined on Alpine Linux
in /usr/bin/cc that uniquely identifies this system, as verified by
the output of the script at

	https://www.math.utah.edu/~beebe/cc-defs

I ran "make clean; make; make check", and all but one of the tests
pass!  Here is the single failure:

	 30: @                                               FAILED (commands.at:18)

The section of testsuite.log that records the failing test looks like
this:

	30. commands.at:14: testing @ ...
	./commands.at:17: tcsh -f -c 'set' > out1 && tcsh -f -c '@' > out2
	./commands.at:18: diff out1 out2 | tail -n +2
	--- -
	+++ /local/build/cc/tcsh-6.24.02/testsuite.dir/at-groups/30/stdout
	@@ -1,4 +1,11 @@
	-< command	set
	----
	-> command	@
	++++ out2
	+@@ -2,7 +2,7 @@
	+ anyerror	
	+ argv	()
	+ cdtohome	
	+-command	set
	++command	@
	+ csubstnonl	
	+ cwd	/local/build/cc/tcsh-6.24.02/testsuite.dir/030
	+ dirstack	/local/build/cc/tcsh-6.24.02/testsuite.dir/030

	30. commands.at:14: 30. @ (commands.at:14): FAILED (commands.at:18)

Without further study of that test, I cannot quickly identify the
cause of the failure, but perhaps other list members can.

In any event, I now have a usable tcsh on Alpine Linux, and that is a
big step.  It also means that the Alpine packagers ought to be able to
include tcsh in the package repository.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                                                          -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe at math.utah.edu  -
- 155 S 1400 E RM 233                       beebe at acm.org  beebe at computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------


More information about the Tcsh mailing list