Compiling the MeatAxe on MacOS X.

I tried to compile the MeatAxe 2.4.2 on MacOS X 10.2. The bits that I need work but the compiling was a bit of a botch job. Here's what happened in case you find it useful, though this is really to remind me what I did in case I need to do it again!

Having unpacked everything and edited the make.conf file we begin...

G4% cd /Applications/MeatAxe/2.4.2
G4% make check
...
Compiling c-tensor.c
Building zzztest
ld: archive: libmtx.a has no table of contents, add one with ranlib(1) (can't load from it)
make[1]: *** [zzztest] Error 1
make: *** [build] Error 2
G4% 

I don't know what this means, and the man page is not very helpful. However, the following seems to work...

G4% cd src
G4% ranlib libmtx.a
G4% cd ..
G4% make check
cd src; make
CFLAGS=-ansi -O -Wall -DOS_MacOSX -DMTXBIN="/Applications/MeatAxe/2.4.2/bin" -DMTXLIB="/Applications/MeatAxe/2.4.2/lib" -DZZZ=0
-----
Building zzztest
Compiling checksum.c
Building checksum
...
./t-0200 - Testing lattice programs (m11)
File m11.inc: checksum error
	 expected:   144.3930496644
	 calculated: 144.3971761824
make[1]: *** [run-all] Error 1
make: *** [check] Error 2

Oh well. Better than 2.4.1 anyway. Maybe the unexpected checksum is something to do with libmtx.a not happening as expected. Continuing...

G4% make install
cd src; make install
Installing programs in /Applications/MeatAxe/2.4.2/bin
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
/bin/sh: csplit: command not found
install: xx00: No such file or directory
G4% 

MacOS X does not have a csplit command, unlike most versions of UNIX. These errors correpsond to the 11 “scripts” (e.g., fro.sh) listed at the bottom of src/Makefile.
csplit is suppoed to truncate these scripts where their comments start, i.e., at “/*{{{”, then install the remaining portion in the binaries folder.
My work-round for this is to install the textutils package from Fink which includes csplit.

G4% make install
cd src; make install
Installing programs in /Applications/MeatAxe/2.4.2/bin
302
415
290
405
246
402
236
405
236
403
236
403
734
395
372
475
387
406
838
666
879
904
G4% make clean
cd src; make clean
rm -f *.o core *.zzz
rm -f zzztest checksum maketab cfcomp chop decomp genmod mkcycl mkdotl mkinc mkgraph mkhom mkhom_old mksub mktree orbrep precond pwkond rad soc symnew tcond tuc zad zbl zcf zcl zcp zct zcv zef zfr zev ziv zkd zmo zmu zmw znu zor zpo zpr zpt zqt zro zsc zsp zsi zsy ztc zte ztr zts zuk zvp zzztest check *.o *.a core
cd test; make clean
rm -f run/* *.zzz
G4%