conda-forge / pynio-feedstock

A conda-smithy repository for pynio.
BSD 3-Clause "New" or "Revised" License
3 stars 14 forks source link

import error due to libpoppler issue #31

Closed maddenp closed 6 years ago

maddenp commented 6 years ago

I'm not sure if this is the appropriate venue for a fix, but let's see.

Background:

~ % conda create -y -n pynio -c conda-forge pynio
[ ... ]
~ % source activate pynio
(pynio) ~ % python -c "import Nio"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/pm/miniconda/envs/pynio/lib/python2.7/site-packages/PyNIO/Nio.py", line 83, in <module>
    from nio import *
ImportError: libpoppler.so.66: cannot open shared object file: No such file or directory

Note the version (build, specifically) of libgdal installed into this environment:

(pynio) ~ % conda list | grep libgdal
libgdal                   2.1.4                         4    conda-forge

I think this might be fixed in a newer build of libgdal, as I can reproduce the error in a gdal-only environment by downgrading to the build (4) installed in the pynio environment:

~ % conda create -y -n gdal -c conda-forge gdal=2.1.4
[ ... ]
~ % source activate gdal
(gdal) ~ % conda list | grep libgdal
libgdal                   2.1.4                         8    conda-forge
(gdal) ~ % gdalinfo --help-general # so far, so good with build 8...
Generic GDAL utility command options:
  --version: report version of GDAL in use.
  --license: report GDAL license info.
  --formats: report all configured format drivers.
  --format [format]: details of one format.
  --optfile filename: expand an option file into the argument list.
  --config key value: set system configuration option.
  --debug [on/off/value]: set debug level.
  --pause: wait for user input, time to attach debugger
  --locale [locale]: install locale for debugging (i.e. en_US.UTF-8)
  --help-general: report detailed help on general options.
(gdal) ~ % conda install -y -c conda-forge libgdal=2.1.4=4
[ ... ]
(gdal) ~ % gdalinfo --help-general # breaks with build 4...
gdalinfo: error while loading shared libraries: libpoppler.so.66: cannot open shared object file: No such file or directory

So, libgdal build 8 seems to address the issue present in build 4, however:

(gdal) ~ % source deactivate
~ % source activate pynio
(pynio) ~ % conda install -y -c conda-forge libgdal=2.1.4=8
Fetching package metadata .............
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in conflict:
  - hdfeos5
  - libgdal 2.1.4 8 -> hdf5 1.10.1
Use "conda info <package>" to see the dependencies for each package.

I'm working around this issue by forcing poppler 0.52.0.* and xerces-c 3.1.4.* (which appear to be what libgdal build 4 need) in the meta.yaml of my package that uses pynio, but I thought I should point out that an out-of-the-box install of pynio may have a problem.

ocefpaf commented 6 years ago

It is the right place, thanks for the report.

We need a rebuild of pynio with latest gdal. However, we'll probably have to drop support for hdfeos5 b/c that does not build with latest hdf5 1.10.1. I'll try to get to that soon, meanwhile downgrading poppler and xerces-c, like you did, is a the a workaround to get it to work.