[Numpy-discussion] extension module with swig
Tue Nov 4 06:41:56 CST 2008
changing the library path and explicitly adding libraries =['gsl',
'gslcblas'] did the trick !
Thank you so much !
On 04 Nov 2008, at 12:09, Matthieu Brucher wrote:
> The issue with the LD_LIBRARY_PATH would come up in any case. You have
> to put your gsl library folder before the system one if you want your
> gsl library to be used.
> For the cblas issue, it seems from Google you have to link against a
> CBLAS library as well to use the GSL (for instance blas or atlas
> shoule be enough).
> 2008/11/4 Giovanni Samaey <email@example.com>:
>> And, additionally setting the environment variable LD_LIBRARY_PATH to
>> start with /data/home/u0038151/lib instead of ending with it, it
>> up my own gsl, and gives the error message
>> 0 u0038151@lo-03-02 dot2 $ python -c "import dot"
>> Traceback (most recent call last):
>> File "<string>", line 1, in ?
>> File "dot.py", line 7, in ?
>> import _dot
>> ImportError: /data/home/u0038151/lib/libgsl.so.0: undefined symbol:
>> Again something different...
>> On 04 Nov 2008, at 11:46, Giovanni Samaey wrote:
>>> Hi Matthieu,
>>> thank you for your prompt reply.
>>> On 04 Nov 2008, at 11:24, Matthieu Brucher wrote:
>>>>> # dot extension module
>>>>> _test = Extension("_test",
>>>>> include_dirs = [numpy_include,'/data/home/
>>>>> library_dirs = ['/data/home/u0038151/lib']
>>> This is where is specify the directory where my header files are, as
>>> well as the directory of the library. If I add, from your
>>> suggestion libraries = ['gsl'] to that list, it tries to pick up a
>>> gsl that is installed in /usr/lib (but there are no headers there.)
>>> Then I get the message:
>>> python -c "import dot"
>>> Traceback (most recent call last):
>>> File "<string>", line 1, in ?
>>> File "dot.py", line 7, in ?
>>> import _dot
>>> ImportError: /usr/lib/libgsl.so.0: undefined symbol: cblas_dsdot
>>> So it finds the gsl symbols in the system library (not mine),
>>> probably combined with my headers, and then has a different error.
>> Numpy-discussion mailing list
> Information System Engineer, Ph.D.
> Website: http://matthieu-brucher.developpez.com/
> Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
> LinkedIn: http://www.linkedin.com/in/matthieubrucher
> Numpy-discussion mailing list
More information about the Numpy-discussion