VTK linking not working

85 views
Skip to first unread message

david.t...@utsouthwestern.edu

unread,
May 26, 2016, 4:07:21 PM5/26/16
to Icy imaging

Hi,

We are trying to get icy up and running on our HPC cluster here, which is using RedHat Enterprise Linux 6.7. The included VTK libs require GLIBC 2.14, newer than RHEL provides, so we build our own VTK.

I've verified VTK is in the LD_LIBRARY_PATH and VTK_WRAP_JAVA was set on build, so it does have java bindings and the vtk.jar present. LD_LIBRARY_PATH is as below: 

02:54 PM $ echo $LD_LIBRARY_PATH
/cm/shared/apps/java/oracle/jdk1.7.0_51/lib:/cm/shared/apps/vtk/6.3.0-intel/lib:/cm/shared/apps/slurm/2.5.7/lib64/slurm:/cm/shared/apps/slurm/2.5.7/lib64

As soon as I try to use a VTK plugin I get linking errors, e.g. if I open a TIFF stack and the try Other Plugins -> tutorial -> vtk -> VTKPainterExample:

java.lang.UnsatisfiedLinkError: vtk.vtkEarthSource.VTKInit()J
at vtk.vtkEarthSource.VTKInit(Native Method)
at vtk.vtkObjectBase.<init>(vtkObjectBase.java:43)
at vtk.vtkObject.<init>(vtkObject.java:94)
at vtk.vtkAlgorithm.<init>(vtkAlgorithm.java:510)
at vtk.vtkPolyDataAlgorithm.<init>(vtkPolyDataAlgorithm.java:78)
at vtk.vtkEarthSource.<init>(vtkEarthSource.java:66)
</snip>

VTK was built with the relevant module (geovis) that supplies vtkEarthSource it's trying to get here.

Any hints for debugging this - or are there additional requirements of the VTK build?

Many Thanks,

Dave Trudgian

david.t...@utsouthwestern.edu

unread,
May 26, 2016, 4:09:05 PM5/26/16
to Icy imaging
Sorry - should mention this is latest icy 1.8.1.0 and VTK 6.3.0

Stephane

unread,
May 27, 2016, 7:50:32 AM5/27/16
to Icy imaging
Hi David,

I was about to ask for the VTK version ;) It's true that provided VTK library in Icy is certified for Ubuntu (and derived) distributions and may not work on other distribs (we just can't compile for each possible distribution).
Icy is also using VTK 6.3 internally so it should work... Something you can try is to replace directly the VTK library inside the Icy "lib/linux64/vtk" folder with the ones you compiled (make a backup before). Files should have the same name so you may need to remove the version extension or at least have symbolic link with original name, note that if you use the INSTALL_FOR_JAVA build switch it should remove the version extension for you.

Best,

- Stephane

david.t...@utsouthwestern.edu

unread,
Jun 2, 2016, 11:24:47 AM6/2/16
to Icy imaging
Hi Stephane,

Thanks for the info. I built VTK again with the INSTALL_FOR_JAVA oprtion ON, so it does version-less .so files as suggested. Then copied these into the lib/unix64/vtk folder in the icy distribution.

Trying the VTKPainterExamples I now have success.

However - the default icy.sh seems to call an updater.jar that updated vtk, wiping the libs out at some point. I guess I'll just change icy.sh to call icy.jar directly and all will be good.

Thanks,

DT

Stephane

unread,
Jun 3, 2016, 4:38:46 AM6/3/16
to Icy imaging
Hi David,

Oh indeed the auto update can replace you own lib files. I guess it detects the files has been modified and try to fix "corrupted" files by updating them with the last available version. In the meantime you can just disable the auto update in Icy Preferences (you can still update by using manual update) :)

Best,

- Stephane
Reply all
Reply to author
Forward
0 new messages