Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

VTK Compiling with Debian



Hello to all the great people at BLU.  I moved to Boston over a year
ago and have been keeping a close watch on the goings on at BLU.  
Great Place!!!  I'll be more active in the future.  I hope someone can
give some guidance.  I need to write some code using C++ ,VTK and
CMake.  I am new to VTK and CMake.  I am having trouble compiling vtk.

System: Pentium 4 w Nvidia GeForce4
OS:  Debian 3.1r0
packages:
vtk-tcl 4.4.2-6,
cmake 2.0.5-1
cpp 3.3.5-1
ilibpng10-0     1.0.18-1       PNG library, older version - runtime
libpng12-0     1.2.8rel-1     PNG library ? runtime

I am trying to work through the tutorials but cannot get pass Step1 Cone.

--I compiled successfully using:
g++ -I/usr/include/vtk -o Cone
/usr/share/vtk/Tutorial/Step1/Cxx/Cone.cxx /usr/lib/libvtkGraphics.so 
/usr/lib/libvtkCommon.so -L /usr/X11R6/lib -lGL -lXt -lX11
/usr/lib/libvtkImaging.so /usr/lib/libvtkRendering.so

( However, upon running, I get a warning of missing DRI option.  It
was removed from XF86Config-4 in order to run in "nvidia" mode. )

--When I try to compile using cmake:
	cmake -i .
	make
I receive the following output:

Building object file Cone.o...
c++ -o Cone.o      -Wno-deprecated -I/usr/X11R6/include
-I/usr/include/vtk -I/usr/include/tcl8.4 -I/usr/include/python2.3   
-c /tmp/Cxx/Cone.cxx
Building executable /tmp/Cxx/Cone...
c++          -Wno-deprecated -I/usr/X11R6/include -fPIC  Cone.o    -o
/tmp/Cxx/Cone -rdynamic -L/usr/lib/vtk -L/usr/X11R6/lib -lvtkRendering
-lvtkGraphics -lvtkImaging -lvtkIO -lvtkFiltering -lvtkCommon
-lpthread -ldl -lm -lvtkDICOMParser -lpng -ljpeg -ltiff -lexpat
-lvtkftgl -lfreetype -lz -lGLU -lGL -lSM -lICE -lSM -lICE -lX11 -lXext
-lX11 -lXext -lXt -lSM -lICE -lX11 -lXext
-Wl,-rpath,/usr/lib/vtk:/usr/X11R6/lib
/usr/bin/ld: cannot find -lpng
collect2: ld returned 1 exit status
make[1]: *** [/tmp/Cxx/Cone] Error 1
make[1]: Leaving directory `/tmp/Cxx'
make: *** [default_target] Error 2

I tried the following temporary fixes to get around the error:

1.edit /usr/lib/vtk/VTKConfig.cmake
  Changed line:
    SET(VTK_PNG_LIBRARIES "/usr/lib/libpng.so;/usr/lib/libz.so")
  to line:
    SET(VTK_PNG_LIBRARIES "/usr/lib/libpng12.so.0;/usr/lib/libz.so")

ACTION:
cmake -i .
make
same  -lpng not found error

2.edit /usr/share/CMake/Modules/FindPNG.cmake
Changed line:
FIND_LIBRARY(PNG_LIBRARY png
...)
to line
  FIND_LIBRARY(PNG_LIBRARY png12
...)

ACTION:
cmake -i .
make
same -lpng not found error

I thank you in advance for any help provided:



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org