[Therion] Therion fails to compile with vtk 6
wookey at wookware.org
Thu Dec 18 20:00:48 CET 2014
+++ Bill Gee [2014-12-18 11:02 -0600]:
> Hi Olly -
> I finally got some time today to spend on this. It is still not working, but
> the needle has been moved! Once again I get a different error. I think
> progress is being made ...
> On my Fedora 21 system vtk is version 6.1.0. It is installed in
> /usr/lib64/vtk and /usr/include/vtk.
/lib64 was such a bad idea! But too late to fix now I suspect.
> When I ran make with these two paths
> specified on the command line, I got the same result as below. Six libraries
> with names ending in "-6.1" could not be found.
That'll be debian packaging vtk so that 5.8 and 6.1 can be
co-installed, but I guess fedora has just the one version, so no
versionning in the library names.
> I modified the loch Makefile as shown here. I used hard-coded pathnames for
> VTKPATH and VTKLIBPATH. I also remove "-6.1" from the library names in the
> VTKLIBS line.
> # VTKPATH = $(shell tclsh ./getvtkver.tcl incpath)
we should probably try and fix this up so that it actually works on
both debian- and fedora- type distros.
Therion could really do with using cmake or something rather than
handmade makefiles, tcl scripts, and perl scripts. That getvtkver is
doing exactly the sort of thing that cmake does for you in a standard
> This runs almost all the way through. At the end it complains about an
> undefined symbol reference. Here are the last few lines of output:
> 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/lib64/vtk -
> lvtkCommonExecutionModel -lvtkCommonDataModel -lvtkCommonCore -lvtkFiltersCore
> -lvtkFiltersHybrid -lvtkIOLegacy -lfreetype -lGLU -lpthread -lz -s
> /usr/bin/ld: .././loch/lxRender.o: undefined reference to symbol
> /lib64/libpng16.so.16: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> Makefile:129: recipe for target '.././loch/loch' failed
> make: *** [.././loch/loch] Error 1
> This looks to me like vtk is no longer a problem. Now it is something to do
> with libpng16.
Right - you don't seem to have included libpng on the link command
line. I think you just need -lpng in there.
The error is telling you that the symbol you want
('png_write_row@@PNG16_0') is in the library /lib64/libpng16.so.16
(which is found), but as you didn't ask to link it, it can only
Principal hats: Linaro, Debian, Wookware, ARM
More information about the Therion