JuliaPy / JuliaPy/PyCall.jl

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

Ouverte
#291 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Julia
Étoiles
1.5k
Forks
186
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par reproduire l’échec de @pyimport et comparez-le avec l’importation Python réussie. Lisez PyCall/src/exception.jl autour de la ligne 81 et PyCall.jl autour de la ligne 341, ainsi que pyshtools/__init__.py et le chemin d’importation de _SHTOOLS.so indiqué dans le traceback. Le travail est terminé lorsque la cause du chargement de la bibliothèque et une résolution reproductible ou une limitation documentée sont établies.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
julia, python
Domaine
tooling
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.