Luiz-Monad / aspectc

Automatically exported from code.google.com/p/aspectc
0 stars 0 forks source link

ACC doesn't build on Mac OS X 10.6 #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the build

What is the expected output? What do you see instead?
A clean build showing passed test cases, but instead:

cflewis@coral-reef ~/D/ACC> make
cd src && make all_bs 
gcc -c libacc.c
ar rvs ../lib/libacc.a libacc.o
ar: creating archive ../lib/libacc.a
a - libacc.o
gcc -O2  -o ../bin/acc Parse.c Decls.c Unparse.c Bodies.c AST.c IR.c DefTab.c 
Types.c Scanning.c Error.c Coder.c Mapping.c Arith.c weaveutil.c Weave.c 
Semantic.c main.c  lexer.c output.c XARITH.c xerror.c XCODER.c pointcut.c 
symboltable.c y.tab.c grts.c
../bin/tacc -acc-option="-n" -bootstrappath=..  -O2  -o ../bin/acc Parse.c 
Decls.c Unparse.c Bodies.c AST.c IR.c DefTab.c Types.c Scanning.c Error.c 
Coder.c Mapping.c Arith.c weaveutil.c Weave.c Semantic.c main.c  lexer.c 
output.c XARITH.c xerror.c XCODER.c pointcut.c symboltable.c y.tab.c grts.c 
matchinfo.acc matchaa.acc
"/usr/include/stdlib.h", line 271: error--1: syntax error near token '^' .
make[1]: *** [all_bs] Error 1
make: *** [all] Error 2

What version of the product are you using? On what operating system?
ACC v0.9 RC

Please provide any additional information below.

cflewis@coral-reef ~/D/ACC> gcc -v
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~105/src/configure --disable-checking 
--enable-werror --prefix=/usr --mandir=/share/man 
--enable-languages=c,objc,c++,obj-c++ 
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib 
--build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- 
--host=x86_64-apple-darwin10 --target=i686-apple-darwin10 
--with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)

Original issue reported on code.google.com by cfle...@gmail.com on 23 Oct 2010 at 5:48

GoogleCodeExporter commented 8 years ago
As a work-around, If you add -fno-blocks to the CFLAGS, it will build cleanly.
The problem is that apple's gcc ships with some custom patches to support 
lexical closures in C, C++, and Objective-C.

As an aside, building with -std=c99 (which also disables blocks), causes the 
code to emit hundreds of warnings and seems to enable a version of strcpy that 
acc can't handle due to a (I suspect) __restrict keyword which means that at 
present you can't easily use this with C99 code.

Original comment by br...@linuxfood.net on 26 Nov 2010 at 8:32