pyvips
pyvips copied to clipboard
Segfault on conda package
Hello, When I try to install on my arch linux with:
conda install --channel conda-forge pyvips
And as soon as I import pyvips I get:
$ python
Python 3.7.5 (default, Oct 25 2019, 15:51:11)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvips
Segmentation fault (core dumped)
Any idea what I can do to fix this? Thanks!
UPDATE: It seems libMagickCore-7.Q16HDRI.so.6 => not found is missing from the dynamic dependencies. Shouldn't it be included in the anaconda package?
Thanks for reporting this @EKami. I see this too on Ubuntu:
$ conda create --name test python=3 pyvips
...
$ conda activate test
(test) $ which python
/home/john/miniconda3/envs/test/bin/python
(test) $ gdb /home/john/miniconda3/envs/test/bin/python
Reading symbols from /home/john/miniconda3/envs/test/bin/python...
(gdb) run
Starting program: /home/john/miniconda3/envs/test/bin/python
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Python 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 21:52:21)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvips
Program received signal SIGSEGV, Segmentation fault.
do_lookup_x (
undef_name=undef_name@entry=0x7ffff70277a4 "_ITM_deregisterTMCloneTable",
new_hash=new_hash@entry=2247416213,
old_hash=old_hash@entry=0x7fffffffb8e0, ref=0x7ffff70274b8,
result=result@entry=0x7fffffffb8f0, scope=<optimised out>, i=0,
version=0x0, flags=1, skip=<optimised out>, type_class=4,
undef_map=0x555555a41040) at dl-lookup.c:350
...
#7 0x00007ffff7fe49ba in _dl_open (file=0x7ffff7fbf5b8 "libgobject-2.0.so.0",
mode=-2147483646, caller_dlopen=<optimised out>, nsid=-2, argc=1,
argv=0x7fffffffd9f8, env=0x7fffffffda08) at dl-open.c:603
603 dl-open.c: No such file or directory.
(gdb)
Though libgobject is present in lib:
$ ls ~/miniconda3/envs/test/lib/libgobject-2.0.so*
/home/john/miniconda3/envs/test/lib/libgobject-2.0.so
/home/john/miniconda3/envs/test/lib/libgobject-2.0.so.0
/home/john/miniconda3/envs/test/lib/libgobject-2.0.so.0.5800.3
Sebastian is trying to update the conda package now, but something seems to be broken there too:
https://github.com/conda-forge/libvips-feedstock/pull/4
I ended up doing: ln -s /home/ekami/Programs/anaconda3/envs/dl/lib/libMagick++-7.Q16HDRI.so /home/ekami/Programs/anaconda3/envs/dl/lib/libMagickCore-7.Q16HDRI.so.6
And it kinda worked, not sure if that's a sustainable solution tho.
I have just reproduced the error.
Could you please let me know which one is the offending package in: https://github.com/conda-forge/libvips-feedstock/blob/master/recipe/meta.yaml
Since we haven't pinned any dependency in the recipe, one of those will have been updated and it's causing the issue. What I normally do is to find out the offending dependency in the recipe and pin it to a previously working version in a new package release.
@sebastian-luna-valero I'd say imagemagick since that's the one missing from the dynamic dependencies
If you do:
conda create -n test -c conda-forge -c bioconda -c defaults pyvips 'imagemagick<7.0.9'
It should work. Please try and let me know.
@sebastian-luna-valero It works indeed!
Thanks!
xref: https://github.com/conda-forge/libvips-feedstock/pull/5
Hello,
Please also ensure the conda package uses the pixman=0.36.0 dependency and not the 0.38.0, the reason is because the version 0.38.0 create corrupted images with various levels of zoom. I lost 2 weeks of converting WSIs because of this :(
As far as I can see in the conda-forge recipes pixman is not a direct dependency for either libvips or pyvips, did we miss it? I see how pixman is installed with libvips since it must be a dependency of a dependency. Is this the intended behaviour?
i'm still getting this segfault on ubuntu 18. even with the imagemagick bound it doesn't work. EKami's solution of softlinking works
Hi,
On Ubuntu 18.04, I have just tried:
conda create -n test1 --override-channels -c conda-forge -c defaults pyvips
conda activate test1
python -c "import pyvips"
and it works for me. FYI:
conda list imagemagick
# packages in environment at /tmp/tmp.UxcuggEH4h/conda-install/envs/test1:
#
# Name Version Build Channel
imagemagick 7.0.8_68 pl526h51306e4_0 conda-forge
I am not able to check the issue with pixman 0.38 though.
Best regards, Sebastian
The pixman issue (https://github.com/libvips/libvips/issues/1401) will be resolved with https://github.com/conda-forge/pixman-feedstock/pull/16.
I had a quick scan through the libvips-feedstock and noticed:
- The libvips version is still on 8.8.3 whereas 8.9.2 is available.
gstreamer-orcis pinned to<0.4.30but not necessary after https://github.com/conda-forge/gstreamer-orc-feedstock/pull/4.- Perhaps we could try to build the libvips recipe for Windows. The
gdk-pixbufissue is now resolved with: https://github.com/conda-forge/gdk-pixbuf-feedstock/pull/19.
I could help to resolve these things, if you want. Note that I don't use Conda on a daily basis.
(The Windows build can be tricky to fix, as it usually involves a lot of patches see for e.g. https://github.com/libvips/build-win64-mxe/tree/master/8.9/patches)
Many thanks @kleisauke
Please have a go and I would be happy to assist.