FS#43034 - [vtk] `package require vtk` results in error: "can't find package vtk"

Attached to Project: Community Packages
Opened by Alain Kalker (ackalker) - Sunday, 07 December 2014, 13:11 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Wednesday, 21 July 2021, 22:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Bruno Pagani (ArchangeGabriel)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Doing the following results in an error:

$ vtk
Enter: "package require vtk" to load VTK commands
% package require vtk
can't find package vtk

Investigating a little further, I found that VTK installs its Tcl support files in /usr/lib/tcltk/vtk-6.1/ .

Looking at `vtk`'s $auto_path, I see:

$ vtk
% puts $auto_path
/usr/lib/tcl8.6 /usr/lib /usr/lib/tk8.6 /usr/lib/tk8.6/ttk /usr

i.e. the directory containing VTK's Tcl files is not on this path.

From src/VTK-6.1.0/CMakeLists.txt I find that VTK_INSTALL_TCL_DIR controls where the files are installed, perhaps it is a good idea to configure this variable.

Also, because Arch Linux's Tcl is so much more recent than the version which VTK claims to support best, it may be wise to have a look at:
http://www.vtk.org/Wiki/VTK/FAQ#What_version_of_Tcl.2FTk_should_I_use_with_VTK.3F
for some other changes that may be needed.

Additional info:
* package version(s)
vtk 6.1.0-7
tcl 8.6.3-1
tk 8.6.3-1
* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Bruno Pagani (ArchangeGabriel)
Wednesday, 21 July 2021, 22:49 GMT
Reason for closing:  None
Additional comments about closing:  There’s not even a vtk binary anymore.
Comment by Alain Kalker (ackalker) - Sunday, 07 December 2014, 13:17 GMT
@Andrzej
I'm very sorry if it appears that we (users) are pestering you with VTK bug reports all the time, forcing you to rebuild VTK time after time.
I feel your pain. Please know that by getting the package in good shape will mean much less maintenance hassle in the future :-)
Comment by Alain Kalker (ackalker) - Sunday, 07 December 2014, 13:23 GMT
Sadly, while trying to work around the issue, there appear to be more problems:

$ TCLLIBPATH=/usr/lib/tcltk vtk
Enter: "package require vtk" to load VTK commands
% package require vtk
couldn't load file "/usr/lib/libvtkIOGeometryTCL-6.1.so": /usr/lib/libvtkIOGeometry-6.1.so.1: undefined symbol: _ZNK4Json5ValueixEi
attempt to provide package vtkIOGeometryTCL 6.1 failed: no version of package vtkIOGeometryTCL provided
attempt to provide package vtkiogeometry 6.1 failed: no version of package vtkiogeometry provided
attempt to provide package vtk 6.1 failed: no version of package vtk provided
Comment by Alain Kalker (ackalker) - Sunday, 07 December 2014, 13:30 GMT
Ha! :-)

Now it was me who fell headlong into a trap: it appears I had the package jsoncpp-pc installed from AUR, which only provides but doesn't conflict with jsoncpp from [extra].
Removing jsoncpp-pc and installing jsoncpp resolved the issue:

$ TCLLIBPATH=/usr/lib/tcltk vtk
Enter: "package require vtk" to load VTK commands
% package require vtk
6.1

I haven't actually tested the functionality yet, but at least the package loads.
Comment by Andrzej Giniewicz (Giniu) - Monday, 08 December 2014, 10:34 GMT
@Alain: thanks for reports, the more the better, we are after quality after all :) Anyway, I don't know if I will be taking care of it or Ray, because he took the package over in relation to  FS#41923  - we will take care of it soon.
Comment by Alain Kalker (ackalker) - Monday, 08 December 2014, 20:39 GMT
Thanks for your great work :-)
Comment by Ray Rashif (schivmeister) - Wednesday, 29 April 2015, 20:14 GMT
Sorry for not attending to this sooner, I should have probably let Andrzej drop this to AUR and re-uploaded when I needed it. Anyway, this is correct and it is up to us to add in a proper path, not upstream. I will fix this as I go along attending to the other vtk bugs and getting 6.2 ready.
Comment by Alain Kalker (ackalker) - Thursday, 30 April 2015, 09:51 GMT
Thanks for the follow-up :-)
Good luck with your work.
Comment by Ray Rashif (schivmeister) - Wednesday, 10 February 2016, 20:50 GMT
Sorry for forgetting about this. Should be trivial. Anatol, could you have a look? Thanks.
Comment by Anatol Pomozov (anatolik) - Thursday, 11 February 2016, 06:26 GMT
I added '-DVTK_INSTALL_TCL_DIR=/usr/lib/tcl${_tkver}/vtk/' to put tcl files to /usr/lib/tcl8.6/vtk but it still fails.

$ tclsh
% package require vtk
couldn't load file "/usr/lib/libvtkCommonCoreTCL-7.0.so": /usr/lib/libvtkCommonCoreTCL-7.0.so: cannot open shared object file: No such file or directory
attempt to provide package vtkCommonCoreTCL 7.0 failed: no version of package vtkCommonCoreTCL provided
attempt to provide package vtkcommoncore 7.0 failed: no version of package vtkcommoncore provided
attempt to provide package vtk 7.0 failed: no version of package vtk provided

It still looking for shared libs with wrong name. Could it be related to this non-fixed issue http://www.paraview.org/Bug/view.php?id=15279 ?
Comment by Anatol Pomozov (anatolik) - Thursday, 11 February 2016, 20:34 GMT
And the later issue (*.so files naming) seems related to https://bugs.archlinux.org/task/43378

Loading...