[vtkusers] Problem with VTK on Linux

Berk Geveci geveci at seas.upenn.edu
Fri Jul 21 11:09:43 EDT 2000


	I know for a fact that SGI compiler instantiates templates
	g++ normally would not. If the 

	List<T>::GetElt(unsigned long) const

	method is not in a header file and is compiled into an object
	file, it needs to be instantiated explicitly by something like

	template class List<vizRobotObject>;

	in the same file while using g++. The MIPSPro compiler,
	on the other hand, does not need such an instantiation because
	it can do cross checking between files.

	If this is the problem, a good explanation can be found in
	the book GNU C++ For Linux by Tom Swan (published by QUE).

	I hope this helps.

On Fri, 21 Jul 2000, Daniel J. Blezek, Ph.D. wrote:

> Ian,
> 
>   This sounds less like a VTK issue, and more like a template/library
> problem.  I would suggest writing a small program that links to
> VizmoLib.so.  This will help you track down any undefined symbols.
> Another issue is the perhaps the SGI compiler instanciates more templates
> than gcc.
> 
> -dan
> 
> On Thu, 20 Jul 2000, Ian Remmler wrote:
> 
> > Hi,
> > 
> > I am having an odd problem with a VTK application we are trying to port to
> > Linux.  The application runs fine on Irix, but it doesn't like Linux.
> > 
> > Disclaimer:  I have no experience with VTK or our application, and the
> > person who wrote the application is long gone, so please forgive any
> > ignorance on my part.  I just want to get the thing to work.
> > 
> > As I said the app. works under Irix, using SGI's compiler.  It compiles
> > fine on Linux, but when I try to run it, it won't load our helper c++
> > library.  It says...
> > 
> > Error in startup script: couldn't load file "./VizmoLib.so":
> > ./VizmoLib.so: undefined symbol: GetElt__Ct4List1Z14vizRobotObjectUl
> >     while executing
> > "load ./VizmoLib.so VizmoLib"
> >     ("uplevel" body line 1)
> >     invoked from within
> > "uplevel #0 $auto_index($name)"
> >     (procedure "auto_load" line 13)
> >     invoked from within
> > "auto_load $name [uplevel 1 {namespace current}]"
> >     (autoloading "VizmoLib")
> >     invoked from within
> > "VizmoLib"
> >     (file "./vizmo" line 8)
> > 
> > The symbol GetElt__Ct4List1Z14vizRobotObjectUl translates to... 
> > List<vizRobotObject>::GetElt(unsigned long) const
> > ...if that helps.  I thought perhaps a problem with templates?
> > 
> > Actually, it used to be an overloaded [] operator.  I thought that might
> > be what it didn't like, so I changed it to a normal method GetElt(), but
> > it still barfs.
> > 
> > The script "vizmo" that we use to launch the app follows...
> > 
> > #!/usr/local/bin/vtk
> > set dir .
> > lappend auto_path $dir "/home/user/xxx/Vizmo"
> > package require VizmoLib
> > puts stdout "Please wait: Vizmo 3D initializing..."
> > VizmoLib
> > source /home/user/xxx/dsmft/Vizmo/VizmoView.tcl
> > set userProfile "~/vizmo.init"
> > 
> > if [catch { source $userProfile} initResult ] {
> >         puts stdout "No User Profile specified..."
> > }
> > puts stdout "User Profile loaded..."
> > 
> > Here's what our Linux setup looks like:
> > 
> > System:		Pentium III
> > OS:		Redhat 6.1 with some upgrades
> > gcc:		2.95.1
> > binutils:	2.9.5.0.22
> > glibc:		2.1.2
> > vtk:		CVS as of about a week ago
> > tcl/tk:		8.0 and 8.3
> > 
> > If any other info would be helpful, I'm sure I can dig it up.
> > 
> > Thanks,
> > 	- Ian.
> > 
> > 
> > _______________________________________________
> > This is the private VTK discussion list. 
> > Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
> > 
> 
> --
> Daniel Blezek, Ph.D.
> blezek at crd.ge.com
> Computer Graphics and Systems Program
> Electronic Systems Lab
> GE Corporate Research & Development
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> 





More information about the vtkusers mailing list