[GRASS-dev] grass7 on mac OSX

Massimo Di Stefano massimodisasha at gmail.com
Thu May 27 04:56:50 EDT 2010


Hell Soeren,

seems i've an up-to-date revision :

MacBook-Pro-15-di-Massimo-Di-Stefano:grass_trunk sasha$ svn up
At revision 42358.

i also did make distclean first to re-try configure && make.


but your note about a "renamed" function, point me to a problem i had on qgis side too (make install overwrite the .app but ... it don't do it as aspected)

infact, removing manually the old grass70.app (compiled from source) trashing the complete app from /Application , instead of overwrite it using "sudo make install"

now i have :

In [1]: import os, sys

In [2]: from grass.lib import raster
------------------------------------------------------------
Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
ImportError: No module named lib


the error is present but changes ... this time maybe can be a wrong sintax i used ???
weird .. i'm a bit confused ;-)



i'm tring to replicate, from command line, the code :

###

import os, sys
from grass.lib import grass, raster
from ctypes import *

input = sys.argv[1]

grass.G_gisinit(sys.argv[0])

mapset = grass.G_find_raster2(input, "")
print mapset


Massimo

Il giorno 27/mag/2010, alle ore 10.37, Soeren Gebbert ha scritto:

> Hello Massimo,
> can you please make a svn update?The gmath function
> G_math_backward_solving has been renamed into
> G_math_backward_substitution a while ago. Maybe something got mixed
> up?
> 
> Best
> Soeren
> 
> 2010/5/27 Massimo Di Stefano <massimodisasha at gmail.com>:
>> i see ctypesgen is included in grass7 (not ctype itself)
>> to check if my local copy of ctypesgen is the reason of the error,
>> i temporary moved ctypesgen from my computer :
>> 
>> sudo mv /Library/Python/2.6/site-packages/ctypesgencore /Library/Python/2.6/site-packages/ctypesgencore__
>> sudo mv /usr/local/bin/ctypesgen.py /usr/local/bin/ctypesgen__.py
>> 
>> i can't remove ctype, is is used by other apps
>> 
>> then in the grass_trunk source :
>> 
>> make distclean
>> svn up
>> ./configure ...
>> make
>> 
>> but the problem persists :
>> 
>> In [2]: import os, sys
>> 
>> In [3]: from grass.lib import raster
>> ------------------------------------------------------------
>> Traceback (most recent call last):
>>  File "<ipython console>", line 1, in <module>
>>  File "/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/etc/python/grass/lib/__init__.py", line 3, in <module>
>>    # $Id$
>>  File "/Users/Shared/source/grass_trunk/dist.i386-apple-darwin10.3.0/etc/python/grass/lib/math.py", line 7, in <module>
>> ImportError: dlopen(/Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/lib/_math.so, 2): Symbol not found: _G_math_backward_solving
>>  Referenced from: /Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/lib/_math.so
>>  Expected in: /Applications/GRASS-7.0.app/Contents/MacOS/lib/libgrass_gmath.dylib
>>  in /Applications/GRASS-7.0.app/Contents/MacOS/etc/python/grass/lib/_math.so
>> 
>> 
>> 
>> 
>> Massimo.
>> 
>> 
>> Il giorno 27/mag/2010, alle ore 06.28, Markus Neteler ha scritto:
>> 
>>> I thought that ctypes  are now *included*?
>>> Perhaps it is now conflicting for you if you have two copies?
>>> 
>>> Markus
>>> 
>>> Michael Barton wrote:
>>>> Yes. I installed ctypes. No problem there. He said that users of the binary I compiled do not have to have ctypes installed separately. But I wonder if it has something to do with this.
>>>> 
>>>> Michael
>>>> ____________________
>>>> C. Michael Barton
>>>> Director, Center for Social Dynamics&  Complexity
>>>> Professor of Anthropology, School of Human Evolution&  Social Change
>>>> Arizona State University
>>>> 
>>>> voice:       480-965-6262 (SHESC), 480-727-9746 (CSDC)
>>>> fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
>>>> www: www.public.asu.edu/~cmbarton, http://csdc.asu.edu
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On May 26, 2010, at 9:11 PM, Markus Neteler wrote:
>>>> 
>>>> 
>>>>> On Thu, May 27, 2010 at 6:07 AM, Michael Barton<Michael.Barton at asu.edu>  wrote:
>>>>> ...
>>>>> 
>>>>>> I did nothing special to make it work. I'm also using the standard system python 2.6.1. I did a build and it worked fine. I posted my binaries for students and colleagues. A student downloaded it and it won't run. She has a very similar machine.
>>>>>> 
>>>>>> Sorry I'm no help. I think it is something else wrong and that this error is probably not what is really wrong.
>>>>>> 
>>>>> Do you/they use latest GRASS 7? Glynn included a Ctypes* copy in SVN, this
>>>>> won't still work?
>>>>> 
>>>>> Markus
>>>>> 
>>>> 
>>>> 
>>> 
>> 
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-dev
>> 



More information about the grass-dev mailing list