[R-SIG-Mac] Trouble building R 1.7.1
Simon Urbanek
Simon.Urbanek at math.uni-augsburg.de
Wed Oct 1 17:13:24 MEST 2003
As Thomas pointed out this was an issue a while ago. This is a part of
post I sent at that time:
(the proposed solution refers to the relevant #include in devQuartz.c)
--- cut here ---
I was just building R-devel with aqua today. I had some issues
compiling it, so I'm letting you know ... just in case ... ;)
gcc -no-cpp-precomp -I. -I../../src/include
-I../../../../R-devel/src/include -I/usr/X11R6/include
-I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c
../../../../R-devel/src/unix/devQuartz.c -o devQuartz.o
In file included from
/System/Library/Frameworks/CoreServices.framework/Frameworks/
CarbonCore.framework/Headers/CarbonCore.h:113,
from
/System/Library/Frameworks/CoreServices.framework/Headers/
CoreServices.h:21,
from
/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
from ../../../../R-devel/src/unix/devQuartz.c:35:
/System/Library/Frameworks/CoreServices.framework/Frameworks/
CarbonCore.framework/Headers/Debugging.h:285:2: #else without #if
/System/Library/Frameworks/CoreServices.framework/Frameworks/
CarbonCore.framework/Headers/Debugging.h:287:2: #endif without #if
/System/Library/Frameworks/CoreServices.framework/Frameworks/
CarbonCore.framework/Headers/Debugging.h:301:1: missing binary operator
before token "enum"
../../../../R-devel/src/unix/devQuartz.c:922:1: unterminated #if
make[3]: *** [devQuartz.o] Error 1
This is mainly due to the fact that R uses DEBUG in some way where
Carbon expects it to be either undefined or defined as 0/1. Dirty fix
is to always #undef it before including Carbon.h, but that is just a
quick hack, not a real solution. A bit more general (but clumsy) is the
following:
#ifdef DEBUG
#define __R_DEBUG DEBUG
#undef DEBUG
#endif
#include <Carbon/Carbon.h>
#ifdef __R_DEBUG
#define DEBUG __R_DEBUG
#undef __R_DEBUG
#endif
that works for me ... although I'm still not happy about R using DEBUG
... I fell into that trap with Rserve already.
--- cut here ---
... and as Thomas also pointed out this was fixed in R-devel since.
Cheers,
Simon
---
Simon Urbanek
Department of computer oriented statistics and data analysis
University of Augsburg
Universitätsstr. 14
86135 Augsburg
Germany
Tel: +49-821-598-2236
Fax: +49-821-598-2200
Simon.Urbanek at Math.Uni-Augsburg.de
http://simon.urbanek.info
More information about the R-SIG-Mac
mailing list