Reputation: 13
On Ubuntu 18.04 the executable cannot find the vtk dependencies even though everything works on Fedora 28. Is it necessary to rebuild the executable on Ubuntu or should it work straightforward, and if so how to make it work?
I am very lost. The commands are as follows...
marvin@X1-18:~/Applications/UVLM/release$ uname -a
Linux X1-18 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
marvin@X1-18:~/Applications/UVLM/release$ which vtk
marvin@X1-18:~/Applications/UVLM/release$ which vtk7
/usr/bin/vtk7
marvin@X1-18:~/Applications/UVLM/release$ which vtk6
/usr/bin/vtk6
marvin@X1-18:~/Applications/UVLM/release$ sudo apt install vtk7
Reading package lists... Done
Building dependency tree
Reading state information... Done
vtk7 is already the newest version (7.1.1+dfsg1-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
marvin@X1-18:~/Applications/UVLM/release$ ldd uvlm
linux-vdso.so.1 (0x00007ffd28927000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007ff03857b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff03835c000)
libvtkViewsContext2D.so.1 => not found
libvtkIOGeometry.so.1 => not found
libvtkRenderingContextOpenGL2.so.1 => not found
libvtkViewsCore.so.1 => not found
libvtkInteractionWidgets.so.1 => not found
libvtkInteractionStyle.so.1 => not found
libvtkIOLegacy.so.1 => not found
libvtkIOCore.so.1 => not found
libvtkRenderingContext2D.so.1 => not found
libvtkRenderingFreeType.so.1 => not found
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff0380a8000)
libvtkRenderingOpenGL2.so.1 => not found
libvtkRenderingCore.so.1 => not found
libvtkFiltersSources.so.1 => not found
libvtkFiltersGeneral.so.1 => not found
libvtkFiltersCore.so.1 => not found
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007ff037ea0000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007ff037c85000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff03794c000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007ff03773a000)
libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007ff0374d1000)
libvtkCommonExecutionModel.so.1 => not found
libvtkCommonDataModel.so.1 => not found
libvtkCommonMisc.so.1 => not found
libvtkCommonTransforms.so.1 => not found
libvtkCommonMath.so.1 => not found
libvtkCommonCore.so.1 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff037143000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff036da5000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff036b8d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff03679c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff036598000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff0387ab000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007ff036366000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff036149000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007ff035f42000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007ff035d2d000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff035b05000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff0358fd000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff0356f9000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff0354f3000)
marvin@X1-18:~/Applications/UVLM/release$ ./uvlm
./uvlm: error while loading shared libraries: libvtkViewsContext2D.so.1: cannot open shared object file: No such file or directory
marvin@X1-18:~/Applications/UVLM/release$
also, there is a copy of the libs with the correct naming in the folder and there is the installed vtk (and my own compiled versions)
marvin@X1-18:~/Applications/UVLM/release$ find /usr -name 'libvtkViewsCore.so*'
marvin@X1-18:~/Applications/UVLM/release$ find /usr -name 'libvtkViewsCore.so.1*'
marvin@X1-18:~/Applications/UVLM/release$ find /usr -name 'libvtkViewsCore*'
/usr/lib/x86_64-linux-gnu/libvtkViewsCore-6.3.so.6.3.0
/usr/lib/x86_64-linux-gnu/libvtkViewsCoreTCL-6.3.so.6.3
/usr/lib/x86_64-linux-gnu/libvtkViewsCoreTCL-7.1.so.7.1
/usr/lib/x86_64-linux-gnu/libvtkViewsCoreTCL-7.1.so.7.1.1
/usr/lib/x86_64-linux-gnu/libvtkViewsCoreTCL-6.3.so.6.3.0
/usr/lib/x86_64-linux-gnu/libvtkViewsCorePython27D-6.3.so.6.3
/usr/lib/x86_64-linux-gnu/libvtkViewsCorePython36D-7.1.so.7.1
/usr/lib/x86_64-linux-gnu/libvtkViewsCore-7.1.so.7.1.1
/usr/lib/x86_64-linux-gnu/libvtkViewsCore-7.1.so.7.1
/usr/lib/x86_64-linux-gnu/libvtkViewsCorePython36D-7.1.so.7.1.1
/usr/lib/x86_64-linux-gnu/libvtkViewsCore-6.3.so.6.3
/usr/lib/x86_64-linux-gnu/libvtkViewsCorePython27D-6.3.so.6.3.0
marvin@X1-18:~/Applications/UVLM/release$ ls
libvtkalglib.so.1 libvtkFiltersExtraction.so.1 libvtkImagingHybrid.so.1 libvtkRenderingContext2D.so.1
libvtkCommonColor.so.1 libvtkFiltersGeneral.so.1 libvtkImagingSources.so.1 libvtkRenderingContextOpenGL2.so.1
libvtkCommonComputationalGeometry.so.1 libvtkFiltersGeometry.so.1 libvtkInteractionStyle.so.1 libvtkRenderingCore.so.1
libvtkCommonCore.so.1 libvtkFiltersHybrid.so.1 libvtkInteractionWidgets.so.1 libvtkRenderingFreeType.so.1
libvtkCommonDataModel.so.1 libvtkFiltersModeling.so.1 libvtkIOCore.so.1 libvtkRenderingOpenGL2.so.1
libvtkCommonExecutionModel.so.1 libvtkFiltersSources.so.1 libvtkIOGeometry.so.1 libvtkRenderingVolume.so.1
libvtkCommonMath.so.1 libvtkFiltersStatistics.so.1 libvtkIOImage.so.1 libvtksys.so.1
libvtkCommonMisc.so.1 libvtkglew.so.1 libvtkIOLegacy.so.1 libvtkViewsContext2D.so.1
libvtkCommonSystem.so.1 libvtkImagingColor.so.1 libvtkIOXMLParser.so.1 libvtkViewsCore.so.1
libvtkCommonTransforms.so.1 libvtkImagingCore.so.1 libvtkIOXML.so.1 uvlm
libvtkDICOMParser.so.1 libvtkImagingFourier.so.1 libvtkmetaio.so.1 uvlm_old
libvtkFiltersCore.so.1 libvtkImagingGeneral.so.1 libvtkRenderingAnnotation.so.1 uvlm_old_1
Addition after some good inputs this method seems to work with some line by line effort. first two libs replaced.
marvin@X1-18:~/Applications/UVLM/release$ patchelf --replace-needed libvtkViewsContext2D.so.1 libvtkIOGeometry-7.1.so.7.1 uvlm
marvin@X1-18:~/Applications/UVLM/release$ patchelf --replace-needed libvtkIOGeometry.so.1 libvtkIOGeometry-7.1.so.7.1 uvlm
marvin@X1-18:~/Applications/UVLM/release$ ./uvlm ../ParametricDefinition/param_result_workshop_case6.json
./uvlm: error while loading shared libraries: libvtkRenderingContextOpenGL2.so.1: cannot open shared object file: No such file or directory
marvin@X1-18:~/Applications/UVLM/release$ ldd uvlm
linux-vdso.so.1 (0x00007ffc02d56000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007ff20e96e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff20e74f000)
libvtkViewsContext2D-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkViewsContext2D-7.1.so.7.1 (0x00007ff20e53b000)
libvtkIOGeometry-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkIOGeometry-7.1.so.7.1 (0x00007ff20e1f9000)
libvtkRenderingContextOpenGL2.so.1 => not found
libvtkViewsCore.so.1 => not found
libvtkInteractionWidgets.so.1 => not found
libvtkInteractionStyle.so.1 => not found
libvtkIOLegacy.so.1 => not found
libvtkIOCore.so.1 => not found
libvtkRenderingContext2D.so.1 => not found
libvtkRenderingFreeType.so.1 => not found
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff20df45000)
libvtkRenderingOpenGL2.so.1 => not found
libvtkRenderingCore.so.1 => not found
libvtkFiltersSources.so.1 => not found
libvtkFiltersGeneral.so.1 => not found
libvtkFiltersCore.so.1 => not found
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007ff20dd3d000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007ff20db22000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff20d7e9000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007ff20d5d7000)
libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007ff20d36e000)
libvtkCommonExecutionModel.so.1 => not found
libvtkCommonDataModel.so.1 => not found
libvtkCommonMisc.so.1 => not found
libvtkCommonTransforms.so.1 => not found
libvtkCommonMath.so.1 => not found
libvtkCommonCore.so.1 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff20cfe0000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff20cc42000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff20ca2a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff20c639000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff20c435000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff20eb9e000)
libvtkViewsCore-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkViewsCore-7.1.so.7.1 (0x00007ff20c206000)
libvtkRenderingContext2D-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkRenderingContext2D-7.1.so.7.1 (0x00007ff20bfc0000)
libvtkRenderingCore-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkRenderingCore-7.1.so.7.1 (0x00007ff20bae4000)
libvtkCommonCore-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkCommonCore-7.1.so.7.1 (0x00007ff20b5b2000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff20b395000)
libvtkIOCore-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkIOCore-7.1.so.7.1 (0x00007ff20b120000)
libvtkCommonExecutionModel-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkCommonExecutionModel-7.1.so.7.1 (0x00007ff20ae63000)
libvtkCommonDataModel-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkCommonDataModel-7.1.so.7.1 (0x00007ff20a8b6000)
libvtkCommonTransforms-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkCommonTransforms-7.1.so.7.1 (0x00007ff20a686000)
libvtkCommonSystem-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkCommonSystem-7.1.so.7.1 (0x00007ff20a471000)
libvtksys-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtksys-7.1.so.7.1 (0x00007ff20a22b000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007ff209ff9000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007ff209df2000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007ff209bdd000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff2099b5000)
libvtkFiltersGeneral-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkFiltersGeneral-7.1.so.7.1 (0x00007ff209492000)
libvtkRenderingFreeType-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkRenderingFreeType-7.1.so.7.1 (0x00007ff2091d9000)
libvtkCommonColor-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkCommonColor-7.1.so.7.1 (0x00007ff208fbe000)
libvtkFiltersGeometry-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkFiltersGeometry-7.1.so.7.1 (0x00007ff208d20000)
libvtkFiltersSources-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkFiltersSources-7.1.so.7.1 (0x00007ff208a49000)
libvtkFiltersCore-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkFiltersCore-7.1.so.7.1 (0x00007ff20838b000)
libvtkCommonComputationalGeometry-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkCommonComputationalGeometry-7.1.so.7.1 (0x00007ff20813d000)
libvtkCommonMath-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkCommonMath-7.1.so.7.1 (0x00007ff207f19000)
libvtkCommonMisc-7.1.so.7.1 => /usr/lib/x86_64-linux-gnu/libvtkCommonMisc-7.1.so.7.1 (0x00007ff207cff000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff207af7000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff2078f3000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff2076ed000)
Upvotes: 0
Views: 1607
Reputation: 7582
There is libvtkViewsContext2D-7.1.so.7.1
in libvtk7.1
. If the problem is only with the library name then change the dependency of the executable:
$ patchelf --replace-needed libvtkViewsContext2D.so.1 libvtkViewsContext2D-7.1.so.7.1 uvlm
Or edit the search path of the executable:
$ patchelf --set-rpath /path/to/libs uvlm
Or override the search path during launch:
$ LD_LIBRARY_PATH=/path/to/libs uvlm
Upvotes: 1