[GRASS-dev] grass7 on mac OSX

Glynn Clements glynn at gclements.plus.com
Wed Jun 2 10:39:44 EDT 2010


Massimo Di Stefano wrote:

> >> while start grass in text mode, again  grass.lib is not avaiable as
> >> grass.python module 
> > 
> > You'll need to provide the output from "make -C lib/python" if you
> > want help with this.
> 
> Thanks! i see this log thinking about the wxgui failure ... while was grass lib,
> this the log :

	Status: gcc -E -U __GNUC__ -dD
	-I/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/include
	-I/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/include
	"-Dinline=" "-D__inline__=" "-D__extension__="
	"-D_Bool=uint8_t" "-D__const=const" "-D__asm__(x)="
	"-D__asm(x)=" "-DCTYPESGEN=1" "-D__uint16_t=uint16_t"
	"-D__uint32_t=uint32_t" "-D__uint64_t=uint64_t"
	/var/folders/G7/G7KYb9O2GaGW2zFTZZP9nE+++TI/-Tmp-/tmpcrHehC.h
	...
	Error: gcc -E: /usr/include/TargetConditionals.h:284:10:
	error: #error TargetConditionals.h: unknown compiler (see
	comment above)

The OSX headers are specifically generating an error; probably because
__GNUC__ is being undefined.

Try the attached patch.

-- 
Glynn Clements <glynn at gclements.plus.com>

-------------- next part --------------
--- lib/python/ctypes/ctypesgencore/parser/preprocessor.py	(revision 42432)
+++ lib/python/ctypes/ctypesgencore/parser/preprocessor.py	(working copy)
@@ -129,7 +129,9 @@
         """Parse a file and save its output"""
         
         cmd = self.options.cpp
-        cmd += " -U __GNUC__ -dD"
+        if sys.platform != 'darwin':
+            cmd += " -U __GNUC__"
+        cmd += " -dD"
         for path in self.options.include_search_paths:
             cmd += " -I%s" % path 
         for define in self.defines:


More information about the grass-dev mailing list