[vtkusers] Segmentation Fault
Dingrong Yi
dingryi at sten.sunnybrook.utoronto.ca
Tue Jan 14 13:37:57 EST 2003
Hi David and Tuhin,
Thank you again, but I am still not able to locate the problem.
I do not know if this is relevent to my segmentaion fault. I have
installed vtk-3.2-3.i386.rpm and ScientificPython-2.2 before
srpc025005:/data/VTK> rpm -ql vtk
/usr/lib/libVTKCommon.so
/usr/lib/libVTKContrib.so
/usr/lib/libVTKGraphics.so
/usr/lib/libVTKImaging.so
/usr/lib/libVTKPatented.so
srpc025005:/data/VTK> rpm -ql ScientificPython
/usr/doc/ScientificPython-2.2
....
/usr/include/python1.5/Scientific/PyMPI_API.h
/usr/include/python1.5/Scientific/mpimodule.h
/usr/include/python1.5/Scientific/netcdfmodule.h
/usr/lib/python1.5/site-packages/Scientific/DictWithDefault.py
.....
However, I followd your suggestions and did not find anything wrong.
(1) ldd /data/VTK/bin/vtk
All the executables start with libvtk... are actually located at the same
single location (/data/VTK/bin/...).
(2) I do have two versions of python (python1.5, python2.2), but the
CmakeCache.txt indicates only python1.5 is used for both include and
library
PYTHON_INCLUDE_PATH:PATH=/usr/include/python1.5
PYTHON_LIBRARY:FILEPATH=/usr/lib/python1.5/config/libpython1.5.a
Each time when I compiled VTK4.0, I removed the whole directory of VTK and
restarted from untar, ccmake, make, though did not touch the .cshrc file
for the library path. I really could not figure out how could this have
happened.
Please advice me further.
Many thanks.
Dingrong
On Tue, 14 Jan 2003, David Gobbi wrote:
> Hi Dingrong,
>
> Checking 'which vtk' isn't enough, you also need to make
> sure that the vtk executable is using the right .so files.
> To do that, do
> ldd /data/VTK/bin/vtk <works on Linux only>
> and make sure that all the VTK .so files are being loaded
> from the correct location. If not, then add /data/VTK/bin
> to the LD_LIBRARY_PATH
>
> Also, a big warning about using python-VTK on redhat-7.x:
> Most redhat 7.x distributions have python2.1 or python2.2
> as well as python1.5. Sometimes CMake gets either
> the python header files or the python library from the
> 2.x version instead of from 1.5. Load your CMakeCache.txt
> into a text editor and make sure that all references to
> PYTHON refer to the 1.5 version of python (or conversely,
> make sure they all refer to python2.x and then use python2
> to run your scripts). Changing from one version of python
> to another will require a clean re-build of VTK.
>
> - David
> --
> David Gobbi, MSc dgobbi at imaging.robarts.ca
> Advanced Imaging Research Group
> Robarts Research Institute, University of Western Ontario
>
> On Tue, 14 Jan 2003, Dingrong Yi wrote:
>
> > Hi David,
> > Thank you for your reply. Please continue reading.
> >
> > On Tue, 14 Jan 2003, David Gobbi wrote:
> >
> > > Hi Dingrong,
> > >
> > > The segmentation fault might be a result of having different
> > > copies of VTK on your system, for example on Windows if you
> > > have DLLs sitting around from an old build, this can cause
> > > real problems.
> > >
> > > Check your PATH (or under UNIX your LD_LIBRARY_PATH) to make
> > > sure that it points to only one copy of your VTK DLLs/.so files.
> >
> > I am using linux. When check with which vtk, I get
> > /data/VTK/bin/vtk
> >
> > Does not this enough telling me that PATH setting alright?
> >
> >
> > >
> > > Also, in future emails related to build problems please quote more
> > > information about your system. In particular you should defintely
> > > give
> > > 1) your platform (Windows, Linux, IRIX)
> > Linux
> >
> >
> > > 2) your compiler
> > I have installed
> > CMake1.4.6-x86-linux-static.tar.gz
> > but when I rpm -q gcc I get
> > gcc-2.96-110
> >
> > > 3) which versions of python and tcl you use
> > python-1.5.2-38
> >
> > > 4) what CMake variables you have changed (e.g. for python
> > > builds you should BUILD_SHARED_LIBS on)
> > BUILD_EXAMPLES ON
> > BUILD_SHARED_LIBS ON
> > BUILD_TESTING ON
> > CMAKE_CXX_FLAGS
> > CMAKE_C_FLAGS
> > CMAKE_INSTALL_PREFIX /usr/local
> > DART_ROOT NOTFOUND
> > PYTHON_INCLUDE_PATH /usr/include/python1.5
> > PYTHON_LIBRARY /usr/lib/python1.5/config/libpython1.5.a
> > TCL_INCLUDE_PATH /usr/include
> > TCL_LIBRARY /usr/lib/libtcl.so
> > TCL_LIBRARY_DEBUG NOTFOUND
> > TCL_STUB_LIBRARY /usr/lib/libtclstub.a
> > TCL_STUB_LIBRARY_DEBUG NOTFOUND
> > TCL_TCLSH /usr/bin/tclsh
> > TK_INCLUDE_PATH /usr/include
> > TK_LIBRARY /usr/lib/libtk.so
> > TK_LIBRARY_DEBUG NOTFOUND
> > TK_STUB_LIBRARY /usr/lib/libtkstub.a
> > TK_STUB_LIBRARY_DEBUG NOTFOUND
> > TK_WISH /usr/bin/wish
> > VTK_DATA_ROOT /data/VTK
> > VTK_USE_ANSI_STDLIB OFF
> > VTK_USE_HYBRID OFF
> > VTK_USE_PARALLEL OFF
> > VTK_USE_PATENTED ON
> > VTK_USE_RENDERING ON
> > VTK_USE_VOLUMEPRO OFF
> > VTK_WRAP_JAVA OFF
> > VTK_WRAP_PYTHON ON
> > VTK_WRAP_TCL ON
> >
> >
> > > 5) anything else you think might be relevant
> >
> > When I installed Python & VTK4.n, I once forced installing
> > Mesa-3.4-10.i386.rpm to upgrade a previous version. I followed
> > the procedures "Installing Python & VTK Linux RedHat 7.x"
> > (found at http://www.imaging.robarts.ca/coders/)
> > though my version is newer than 7.x.
> >
> > Thank you David.
> >
> >
> > >
> > > Cheers,
> > > David
> > >
> > > --
> > > David Gobbi, MSc dgobbi at imaging.robarts.ca
> > > Advanced Imaging Research Group
> > > Robarts Research Institute, University of Western Ontario
> > >
> > > On Tue, 14 Jan 2003, Dingrong Yi wrote:
> > >
> > > > Dear VTK Users,
> > > >
> > > > I used to work on VTK (2.4) and I upgraded to VTK4.0
> > > > successfully. However, just before christmas, I upgraded further
> > > > to a nighly released version (in order to use some great
> > > > python classes) which gave me segmentation error whenever I run
> > > > a VTK example. When installed VTK4.n, I also installed some
> > > > packages that for Python. Python worked, but VTK4.n did not.
> > > > What is worse is that now I am NOT able to
> > > > get VTK4.0 running. I can compile the sources successfully and
> > > > have the library files in VTK/bin, but whenever I run the
> > > > example files or my own working code, both will give me
> > > > segmentation error.
> > > >
> > > > Is any one have similar experience or can give me some
> > > > suggestions?
> > > >
> > > > Thanks
> > > >
> > > > Dingrong
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > 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
> > > >
> > >
> > > _______________________________________________
> > > 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