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. 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. 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. ============= # VTKVERSION = 5.4 VTKVERSION = $(shell tclsh ./getvtkver.tcl version) # VTKPATH = /usr/local/include/vtk-$(VTKVERSION) # VTKPATH = $(shell tclsh ./getvtkver.tcl incpath) VTKPATH = /usr/include/vtk # VTKLIBPATH = /usr/local/lib/vtk-$(VTKVERSION) # VTKLIBPATH = $(shell tclsh ./getvtkver.tcl libpath) VTKLIBPATH = /usr/lib64/vtk VTKLIBS = -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering - lvtkCommon -lvtkjpeg -lvtkpng -lvtkzlib -lvtksys -lfreetype POSTMAKE = STRIPFLAG = -s [... snip ...] # PLATFORM DEBIAN CXX = c++ CC = gcc POBJECTS = lxR2P.o ## VTKLIBS = -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering - lvtkCommon -lfreetype VTKLIBS = -lvtkCommonExecutionModel -lvtkCommonDataModel -lvtkCommonCore - lvtkFiltersCore -lvtkFiltersHybrid -lvtkIOLegacy -lfreetype ## CXXPFLAGS = -DLXLINUX $(shell wx-config --cxxflags) -Wno-deprecated $(shell freetype-config --cflags) -I$(VTKPATH) CXXPFLAGS = -DLXLINUX $(shell wx-config --cxxflags) $(shell freetype-config -- cflags) -I$(VTKPATH) CCPFLAGS = -DLXLINUX $(shell wx-config --cflags) LXLIBDIR = linux PLIBS = $(shell wx-config --libs --gl-libs) -L$(VTKLIBPATH) $(VTKLIBS) -lGLU - lpthread -lz LXPLATFORM = LINUX ==================== 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 'png_write_row@@PNG16_0' /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. Regards - Bill Gee On Tuesday, December 16, 2014 03:15:37 Olly Betts wrote: > 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