[GRASS-dev] grass7 on mac OSX

Massimo Di Stefano massimodisasha at gmail.com
Wed Jun 2 15:51:29 EDT 2010


i applied the patch and tried to rebuild (after make distclean)

this the log :



MacBook-Pro-15-di-Massimo-Di-Stefano:grass_trunk sasha$ make -C lib/python
...
..

make[2]: `date.py' is up to date.
make[2]: `grass.py' is up to date.
make[2]: `raster.py' is up to date.
make[2]: `gmath.py' is up to date.
make[2]: `proj.py' is up to date.
make[2]: `imagery.py' is up to date.
make[2]: `vector.py' is up to date.
make[2]: `display.py' is up to date.
make[2]: `stats.py' is up to date.
make[2]: `dbmi.py' is up to date.
make[2]: `g3d.py' is up to date.
make[2]: `arraystats.py' is up to date.
make[2]: `cluster.py' is up to date.
make[2]: `trans.py' is up to date.
make[2]: `vedit.py' is up to date.
make[2]: `ogsf.py' is up to date.
GISRC=/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/demolocation/.grassrc70 GISBASE=/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0 PATH="/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/bin:$PATH" PYTHONPATH="/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/etc/python:$PYTHONPATH" DYLD_LIBRARY_PATH="/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/bin:/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/lib:/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/lib:/Users/Shared/source/tables-2.1.2/tables/" LC_ALL=C ./ctypesgen.py -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 -lgrass_nviz  /Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/include/grass/nviz.h -o nviz.py
Status: Preprocessing /var/folders/G7/G7KYb9O2GaGW2zFTZZP9nE+++TI/-Tmp-/tmpUC9FfB.h
Status: gcc -E -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-/tmpUC9FfB.h
Traceback (most recent call last):
  File "./ctypesgen.py", line 134, in <module>
    descriptions=ctypesgencore.parser.parse(options.headers,options)
  File "/Users/Shared/source/grass_trunk/lib/python/ctypes/ctypesgencore/parser/__init__.py", line 21, in parse
    parser.parse()
  File "/Users/Shared/source/grass_trunk/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py", line 67, in parse
    ctypesparser.CtypesParser.parse(self,f.name,None)
  File "/Users/Shared/source/grass_trunk/lib/python/ctypes/ctypesgencore/parser/cparser.py", line 113, in parse
    self.preprocessor_parser.parse(filename)
  File "/Users/Shared/source/grass_trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py", line 196, in parse
    token = self.lexer.token()
  File "/Users/Shared/source/grass_trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py", line 51, in token
    result = lex.Lexer.token(self)
  File "/Users/Shared/source/grass_trunk/lib/python/ctypes/ctypesgencore/parser/lex.py", line 297, in token
    newtok = func(tok)
  File "/Users/Shared/source/grass_trunk/lib/python/ctypes/ctypesgencore/parser/pplexer.py", line 234, in t_ANY_string_literal
    t.value = StringLiteral(t.value)
  File "/Users/Shared/source/grass_trunk/lib/python/ctypes/ctypesgencore/parser/pplexer.py", line 60, in __new__
    value = value[1:-1].decode('string_escape')
ValueError: invalid \x escape
make[2]: *** [nviz.py] Error 1
make[1]: *** [default] Error 2
make: [default] Error 2 (ignored)
MacBook-Pro-15-di-Massimo-Di-Stefano:grass_trunk sasha$ 


 
Il giorno 02/giu/2010, alle ore 16.39, Glynn Clements ha scritto:

> 
> 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>
> 
> --- 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