[Matrix-SIG] Re: problem building LLNL11 Graphics/Gist

Zane Motteler zcm@llnl.gov
Tue, 13 Apr 99 14:28:41 PDT


You wrote:

>On Solaris 2.6 (sparc), with python 1.5.2b1, using egcs-1.1.1,
> the Gist library won't load properly, because of the error:
>>>> import Numeric
>>>> import gist
>Traceback (innermost last):
>  File "<stdin>", line 1, in ?
>  File "/local/lib/python1.5/site-packages/gist/gist.py", line 5, in ?
>    from gistC import *
>ImportError: ld.so.1: python: fatal: relocation error: file
>/local/lib/python1.5/site-packages/gistCmodule.so: symbol PyArray_Return:
>referenced symbol not found
>I tried linking gistCmodule.so against
>_numpymodule.so, where PyArray_Return is defined, but it didn't help.
>I had this working with an earlier release of LLNL, but I don't recall what I

It sounds to me as if you need import_array. Without this,
gistC is unable to access the functions in _numpymodule. (In
general, .so files can't access eqach other's symbols.)

What you need, right before the assignment to PyOS_InputHook,

#ifdef import_array

This should fix the problem.


Zane C. Motteler, Ph. D.
   Professor Emeritus of Computer Science and Engineering
   California Polytechnic State University, San Luis Obispo
   Computer Scientist
   Lawrence Livermore National Laboratory
   P O Box 808, L-038 (Street address 7000 East Avenue, L-038)
   Livermore, CA 94551-9900
   zcm@llnl.gov  925/423-2143, FAX 925/423-9969