[GRASS-user] Re: GRASS-python-swig

I list,
I've build python_grass6.so and python_grass6.py with make from MakeFile in swig/python directory but if import the library:

import python_grass6

I've that error from python interpreter:

import python_grass6

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/lib-dynload/python_grass6.py", line 7, in <module>
    import _python_grass6
ImportError: /usr/lib/python2.5/lib-dynload/_python_grass6.so: undefined symbol: __stack_chk_fail_local

Or, in IDLE:

import python_grass6

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import python_grass6
  File "/usr/lib/python2.5/lib-dynload/python_grass6.py", line 7, in <module>
    import _python_grass6
ImportError: libgrass_I.so: cannot open shared object file: No such file or directory

I'm not a python guru. Could anybody help me?

Thanks

Gianluca

On Wed, Aug 27, 2008 at 9:32 PM, g_massa@libero.it <g_massa@libero.it> wrote:

I list,
I've build python_grass6.so and python_grass6.py with make from MakeFile in swig/python directory but if import the library:

import python_grass6

I've that error from python interpreter:

import python_grass6

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/lib-dynload/python_grass6.py", line 7, in <module>
   import _python_grass6
ImportError: /usr/lib/python2.5/lib-dynload/_python_grass6.so: undefined symbol: __stack_chk_fail_local

Not sure about above, but:

Or, in IDLE:

import python_grass6

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
   import python_grass6
File "/usr/lib/python2.5/lib-dynload/python_grass6.py", line 7, in <module>
   import _python_grass6
ImportError: libgrass_I.so: cannot open shared object file: No such file or directory

suggests that LD_LIBRARY_PATH isn't properly set.

I have:

cat /etc/ld.so.conf.d/grass.conf
/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/lib

(adjust path to your installation, save as "root" user and
run ldconfig then - I assume that you use Linux).

Markus