I followed the instructions to download and install SAC, however, upon executing the "make fast" command I receive the following error:
maxx@ubuntu:~/sac2c-1.00-beta-linux-x86_64/stdlib$ make fast make -f buildfile MODE=lean cd modules/structures/lib/..; sac2c -v0 -g -O3 -linksetsize 0 ScalarArith.sac -o lib ****ABORT: line 0 file: /usr/include/stdc-predef.h ABORT: syntax error at pos 36: '3` ABORT: # 1 "/usr/include/stdc-predef.h" 1 3 4 ABORT:** ^** *** Compilation failed *** *** Exit code 1 (Loading SAC program) *** 1 Error(s), 0 Warning(s) make: *** [modules/structures/lib/libScalarArithTree.so] Error 1 make: *** [fast] Error 2 maxx@ubuntu:~/sac2c-1.00-beta-linux-x86_64/stdlib$
I am not sure how to proceed here, I am thinking it may be a problem specific to my environment, but it seems highly specific.
I did some looking around and found this article on gcc which had the following to say:
The GCC pre-processor may now pre-includes a file that defines certain macros for the entirety of the translation unit. This allows fully conformant implementations of C99/C11 and other standards that require compiler or compiler + runtime macros that describe implementation availability.
On linux, is pre-included.
This subtle change means that some more creative uses of the pre-processor may now fail, with the following diagnostic:
/usr/include/stdc-predef.h:0: error: Syntax error near '3' As a workaround, the stdc-predef.h preinclude can be disabled with the use of -ffreestanding. For non C/C++ code, use the pre-processor flag -P.
Then I tried recompiling with
make "CPP=gcc -E -ffreestanding" fast
And still no luck. Any ideas? Below is my architecture information
Linux ubuntu 3.13.0-35-generic x86_64 x86_64 x86_64 GNU/Linux