FS#61655 - [vtk] Deps and optdeps (was: 8.2.0-1 Missing double-conversion dependency)

Attached to Project: Community Packages
Opened by Hans Gaiser (hgaiser) - Wednesday, 06 February 2019, 16:24 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:09 GMT
Task Type General Gripe
Category Packages
Status Closed
Assigned To Bruno Pagani (ArchangeGabriel)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
vtk has a runtime dependency on double-conversion, but it is not listed in the PKGBUILD.

Running "ldd /usr/lib/libvtkIOCore.so.1" gives the following output (assuming double-conversion is not installed):

linux-vdso.so.1 (0x00007fffe7eda000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f81ed1cd000)
libvtkCommonExecutionModel.so.1 => /usr/lib/libvtkCommonExecutionModel.so.1 (0x00007f81ed10e000)
libvtkCommonDataModel.so.1 => /usr/lib/libvtkCommonDataModel.so.1 (0x00007f81eccfa000)
liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f81eccdb000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f81ecab5000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f81ec89e000)
libdouble-conversion.so.3.0.0 => not found
libvtkCommonCore.so.1 => /usr/lib/libvtkCommonCore.so.1 (0x00007f81ec482000)
libvtksys.so.1 => /usr/lib/libvtksys.so.1 (0x00007f81ec431000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f81ec2a2000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f81ec288000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f81ed42e000)
libvtkCommonMisc.so.1 => /usr/lib/libvtkCommonMisc.so.1 (0x00007f81ec26a000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f81ec0e3000)
libvtkCommonTransforms.so.1 => /usr/lib/libvtkCommonTransforms.so.1 (0x00007f81ec0b0000)
libvtkCommonSystem.so.1 => /usr/lib/libvtkCommonSystem.so.1 (0x00007f81ec098000)
libvtkCommonMath.so.1 => /usr/lib/libvtkCommonMath.so.1 (0x00007f81ec076000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f81ec055000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f81ec04e000)

Additional info:

~$ pacman -Q vtk
vtk 8.2.0-1

The issue seems to be comparable to https://bugs.archlinux.org/task/61601 .
I'm aware that installing double-conversion will fix this issue.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:09 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/vtk/issues/2
Comment by Bruno Pagani (ArchangeGabriel) - Saturday, 09 February 2019, 11:33 GMT
Right, this is because namcap doesn’t support very well both optdeps and transitive dependencies, so since qt5-x11extras depends (transitively) on double-conversion, this last one was not listed as missing.

Anyway, with the modular structure of VTK and the high number of optdeps, we might need to rethink how we do this. Maybe ldd’ing every vtk .so file, see which one needs what, and use this to tell which optdep is required for what?
Comment by luca penasa (luke_penn) - Friday, 26 November 2021, 19:02 GMT
As an additional note that I hope it might help. Due the the fact that vtk expects to find several libraries installed (if it was compiled with support for them) also vtk python bindings easily fail when these are missing.

Some of them are gl2ps libharu adios2 cgns liblas fmt tbb jsoncpp libxcursor glew ospray. to test it out "python -c "import vtk"" on a clean arch (e.g. via docker) might be useful.
For example on a clean install:

pacman -Sy vtk python --needed
python -c "import vtk"

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.9/site-packages/vtk.py", line 31, in <module>
all_m = importlib.import_module('vtkmodules.all')
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/lib/python3.9/site-packages/vtkmodules/all.py", line 7, in <module>
from .vtkCommonCore import *
ImportError: libtbb.so.2: cannot open shared object file: No such file or directory

It would not make sense to install vtk and its python binding if they do not import.

luca
Comment by Bruno Pagani (ArchangeGabriel) - Friday, 26 November 2021, 20:52 GMT
tbb was missing for Core indeed, that was reported at https://bugs.archlinux.org/task/72727 and is fixed in [staging]. I need to have a look at the other ones.
Comment by bill-auger (bill-auger) - Sunday, 06 February 2022, 21:49 GMT
others have reported similar errors, for various missing deps (pugixml not already mentioned in this BR)
- the exact error message will depend on which of vtk's true dependencies are installed or not

eg:
$ python -c 'import vtk'
ImportError: libpugixml.so.1: cannot open shared object file: No such file or directory

or with 'pugixml' installed:
ImportError: libfmt.so.8: cannot open shared object file: No such file or directory

or with 'pugixml' and 'fmt' installed:
ImportError: libospray.so.2: cannot open shared object file: No such file or directory

'openvr', 'ospray', and 'pugixml' are all in optdepends of 'vtk' - 'fmt' is not
Comment by Bruno Pagani (ArchangeGabriel) - Friday, 18 March 2022, 15:01 GMT
@bill-auger From my understand, starting with VTK9 you are not supposed to import plain `vtk` as that tries to load all the modules. If we try to support the case of requesting plain VTK at build time or import in Python, we might end up putting everything back in the list…
Comment by Bruno Pagani (ArchangeGabriel) - Friday, 18 March 2022, 15:33 GMT
So I’ve confirmed that:
– we were actually missing a new dependency for the Core, pugixml;
– `import vtk` actually runs `import vtkmodules.all`, so you would need all dependencies in that case.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...