[Therion] Therion fails to compile with vtk 6

Olly Betts olly at survex.com
Tue Dec 16 04:15:37 CET 2014


On Mon, Dec 15, 2014 at 07:32:53PM -0600, Bill Gee wrote:
> I took a stab at changing the loch Makefile manually.  It still fails, but now 
> it has yet another message.  Here is the last few bits from the compile run.
> 
> ==================/usr/lib64/
> gcc -c -Wall -D_GNU_SOURCE -DLOCH -DLXLINUX  -I/usr/lib64/wx/include/gtk2-
> unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -
> D_LARGE_FILES -D__WXGTK__ -pthread  -o .././loch/img.o img.c
> c++ -o .././loch/loch -Wall .././loch/lxR2P.o .././loch/lxTR.o 
> .././loch/lxOGLFT.o .././loch/lxSetup.o .././loch/lxRender.o .././loch/lxWX.o 
> .././loch/lxImgIO.o .././loch/lxLRUD.o .././loch/lxFile.o .././loch/lxSTree.o 
> .././loch/lxData.o .././loch/lxMath.o .././loch/lxSView.o .././loch/lxSScene.o 
> .././loch/lxGUI.o .././loch/lxGLC.o .././loch/lxOptDlg.o 
> .././loch/lxAboutDlg.o .././loch/img.o -lwx_gtk2u_gl-2.8 -pthread -Wl,-z,relro   
> -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -
> lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -
> lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8  -L/usr/lib/vtk-5.4 -
> lvtkCommonExecutionModel-6.1 -lvtkCommonDataModel-6.1 -lvtkCommonCore-6.1 -
> lvtkFiltersCore-6.1 -lvtkFiltersHybrid-6.1 -lvtkIOLegacy-6.1 -lfreetype -lGLU 
> -lpthread -lz  -s
> /usr/bin/ld: cannot find -lvtkCommonExecutionModel-6.1
> /usr/bin/ld: cannot find -lvtkCommonDataModel-6.1
> /usr/bin/ld: cannot find -lvtkCommonCore-6.1
> /usr/bin/ld: cannot find -lvtkFiltersCore-6.1
> /usr/bin/ld: cannot find -lvtkFiltersHybrid-6.1
> /usr/bin/ld: cannot find -lvtkIOLegacy-6.1
> collect2: error: ld returned 1 exit status
> make[1]: *** [.././loch/loch] Error 1
> make[1]: Leaving directory `/home/bgee/Installs/therion/loch'
> make: *** [loch/loch] Error 2
> ======================
> 
> I noticed a section at the top of the Loch Makefile where it is using some tcl 
> programs to find where vtk is installed.  This starts on line 14.  On my 
> systems the three tcl programs return data as if vtk 5.4 were installed.  The 
> system has no trace of vtk 5.4 left on it.  The two directories returned for 
> VTKPATH and VTKLIBPATH do not exist.  Will this cause any problems?

Looking at getvtkver.tcl it assumes 5.4 if it can't find a vtk install,
so I suspect that's what is happening for you.

On Debian unstable, VTKPATH is /usr/include/vtk-6.1 (correct) but
VTKLIBPATH is /usr/lib/vtk-6.1 (wrong).  But the latter doesn't matter,
as the libraries are in /usr/lib/x86_64-linux-gnu which is on the
default linker search path, so are found anyway.

It looks like your build finds the headers (so VTKPATH isn't a problem)
but fails to find the libraries when it comes to link.  If you can
determine the correct directory, you can probably override by passing it
on the command line, like so:

make VTKLIBPATH=/usr/lib64/vtk6.1

Cheers,
    Olly



More information about the Therion mailing list