The issue seems to be that the sather System/Common/Makefile uses The C Preprocessor, cpp
to preprocess CONFIG.proto into CONFIG. Since cpp
does not know that the intended output is sather
rather than C
, it processes and inserts the standard header file /usr/include/stdc-predef.h at the start of the CONFIG file, as you can verify by doing
cpp -dI System/Common/CONFIG.proto | head
Because make variable CPP
is defined in the top-level Makefile as CPP=/lib/cpp -C -P
, comments in the input files are not suppressed. So the CONFIG file ends up with a big /* C-style */
comment block at the top, which apparently chokes the sather
parser (which apparently expects comments to start with -
).
The inclusion of the stdc-predef.h seems to have been introduced in GCC 4.8, and the recommended way to enforce backward compatibility is with the option -ffreestanding
(although this option does not appear to be documented in the cpp man page):
make clean
make CPP='cpp -ffreestanding -C -P'
You should then be able to execute ./Bin/sacomp
as follows
SATHER_HOME=. ./Bin/sacomp
There is no class named MAIN.
(presumably it expects to be given the name of one or more source files).
See Porting to GCC 4.8 .