JuliaPy / JuliaPy/PyCall.jl

Error in importing python module that uses fftw3 library: undefined symbol: dfftw_destroy_plan_

Abierto
#291 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Julia
Estrellas
1.5k
Forks
186
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I have a module [shtools](http://shtools.ipgp.fr/) that I am trying to import in julia. It is a collection of fortran codes that comes with a python f2py wrapper. I am being able to import it correctly in python, but using @pyimport to import it in julia fails. I am using julia 0.4.5.

```
$ python -c "import pyshtools as shtools"
loading shtools documentation
$ julia
julia> using PyCall
julia> @pyimport pyshtools
ERROR: PyError (:PyImport_ImportModule)
ImportError('/home/jishnu/lib/SHTOOLS-3.0/pyshtools/_SHTOOLS.so: undefined symbol: dfftw_destroy_plan_',)
File "/home/jishnu/lib/SHTOOLS-3.0/pyshtools/__init__.py", line 31, in
load_documentation()
File "/home/jishnu/lib/SHTOOLS-3.0/pyshtools/__init__.py", line 13, in load_documentation
from . import _SHTOOLS

[inlined code] from /home/jishnu/.julia/v0.4/PyCall/src/exception.jl:81
in pyimport at /home/jishnu/.julia/v0.4/PyCall/src/PyCall.jl:341

```

From what I can see, the path to libfftw3.so is present in LD_LIBRARY_PATH. libfftw3.so is also present in julia's lib directory.

```
$ python -c 'import sys,os;print filter(lambda x: os.path.exists(x) and "libfftw3.so" in os.listdir(x),sys.argv[1].split(":"))' $LD_LIBRARY_PATH
['/home/apps/fftw-3.2/lib']
```

I have built shtools and pycall using the same version of python (version 2.7 from anaconda2). Is there a way to tell julia how to find this library?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start by reproducing the @pyimport failure and compare it with the successful Python import. Read PyCall/src/exception.jl around line 81 and PyCall.jl around line 341, along with pyshtools/__init__.py and the _SHTOOLS.so import path shown in the traceback. Done means the library-loading cause and a reproducible resolution or documented limitation are established.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
julia, python
Área
tooling
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.