ITK/GDBPretty/Installation/Linux: Difference between revisions
Line 281: | Line 281: | ||
su - | su - | ||
cd /usr/local/bin | cd /usr/local/bin | ||
ln -s | ln -s /home/user/vv-src/build/bin/vv | ||
exit | exit | ||
Replace ''user'' with your username. | |||
==== GDB setup ==== | ==== GDB setup ==== |
Revision as of 06:01, 18 November 2010
Fedora 14 example
Install package dependencies
yum install gcc gcc-c++ git texinfo ncurses-devel flex bison python-devel
Build custom GDB
Build it
cd ~ mkdir gdb cd gdb git clone git://gitorious.org/~thewtex/gdb-python/archer-thewtex-python.git source mkdir build install cd build ../source/configure --prefix=$(cd ../install && pwd) make -j2 all make install
Put it at the top of the system PATH
su - cd /usr/local/bin ln -s /home/user/gdb/install/bin/gdb exit
Replace user with your username.
Logout and login to a new shell to ensure the system follows the new path.
Install custom pretty-printers
Basic pretty-printers
yum install python-matplotlib cmake
Place the following in ~/.gdbinit
# # C++ related beautifiers (optional) # set print pretty on set print object on set print static-members on set print vtbl on set print demangle on set demangle-style gnu-v3 set print sevenbit-strings off set multiple-symbols ask # working with arrays set print array on set print elements 70 # # gdb-pretty # python import sys sys.path.insert( 0, '/home/user/gdb/gdb-pretty' ) sys.path.insert( 0, '/home/user/gdb/gdb-pretty/itk/source' ) import gdb.pretty gdb.pretty.register( 'libstdcxx.v6.printers', None ) end require command view require command alias
Replace user with your username.
mkdir ~/gdb/gdb-pretty
libstdcxx pretty-printers
cd ~/gdb/gdb-pretty git clone http://git.gitorious.org/gdb-pretty/gdb-pretty-libstdcxx.git libstdcxx
Try running the example
cd libstdcxx/examples less readme.rst ...
Pretty printers in the Fedora repository
VTK is packaged poorly, so you need the vtk-devel package to import vtk in Python.
yum install Mayavi paraview vtk-devel
Install VV
Install dependencies,
yum install gengetopt qt-devel wget cmake mesa-libGL-devel libXt-devel mesa-libOSMesa-devel
Build VTK 5.6 from source.
cd ~/ wget http://www.vtk.org/files/release/5.6/vtk-5.6.1.tar.gz tar xvzf vtk-5.6.1.tar.gz mkdir VTK/build cd VTK/build cmake -DVTK_USE_QT=ON -DBUILD_TESTING=OFF .. make
Build ITK from source.
cd ~/ wget http://voxel.dl.sourceforge.net/sourceforge/itk/InsightToolkit-3.20.0.tar.gz tar xvzf InsightToolkit-3.20.0.tar.gz cd InsightToolkit-3.20.0 mkdir build cd build cmake -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DITK_USE_REVIEW=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo .. make -j2
Download vvSource-1.1.tar.gz from the VV homepage.
cd ~/ mv ~/Documents/vvSource-1.1.tar.gz ~/ tar xvzf vvSource-1.1.tar.gz cd vv-src/build cmake -DITK_DIR=~/InsightToolkit-3.20.0/build -DVTK_DIR=~/VTK/build .. make -j2
Copy the executable to the system PATH, e.g.
mkdir ~/bin cd ~/bin ln -s ~/vv-src/build/bin/vv
GDB setup
cd ~/gdb/gdb-pretty git clone http://git.gitorious.org/gdb-pretty/gdb-pretty-science.git science cd science mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=~/gdb/install .. make install
ITK pretty-printers
cd ~/gdb/gdb-pretty git clone git://gitorious.org/gdb-pretty/gdb-pretty-itk.git itk
Try running the example
cd itk/examples less readme.rst
Debian Squeeze
Install basic package dependencies
aptitude install build-essential git texinfo flex bison libncurses5-dev python-dev
Build custom GDB
Build it
cd ~ mkdir gdb cd gdb git clone git://gitorious.org/~thewtex/gdb-python/archer-thewtex-python.git source mkdir build install cd build ../source/configure --prefix=$(cd ../install && pwd) make -j2 all make install
Put it at the top of the system PATH
su - cd /usr/local/bin ln -s /home/user/gdb/install/bin/gdb exit
Replace user with your username.
Install custom pretty-printers
Basic pretty-printers
aptitude install python-matplotlib cmake ipython
Place the following in ~/.gdbinit
# # C++ related beautifiers (optional) # set print pretty on set print object on set print static-members on set print vtbl on set print demangle on set demangle-style gnu-v3 set print sevenbit-strings off set multiple-symbols ask # working with arrays set print array on set print elements 70 # # gdb-pretty # python import sys sys.path.insert( 0, '/home/user/gdb/gdb-pretty' ) sys.path.insert( 0, '/home/user/gdb/gdb-pretty/itk/source' ) import gdb.pretty gdb.pretty.register( 'libstdcxx.v6.printers', None ) end require command view require command alias
Replace user with your username.
mkdir ~/gdb/gdb-pretty
libstdcxx pretty-printers
cd ~/gdb/gdb-pretty git clone http://git.gitorious.org/gdb-pretty/gdb-pretty-libstdcxx.git libstdcxx
Try running the example
cd libstdcxx/examples less readme.rst ...
Pretty printers in the Debian repository
aptitude install mayavi2 paraview
Install VV
Install dependencies,
aptitude install gengetopt libxt-dev
Build VTK 5.6 from source.
cd ~/ wget http://www.vtk.org/files/release/5.6/vtk-5.6.1.tar.gz tar xvzf vtk-5.6.1.tar.gz mkdir VTK/build cd VTK/build cmake -DVTK_USE_QT=ON -DBUILD_TESTING=OFF .. make -j2
Build ITK from source.
cd ~/ wget http://voxel.dl.sourceforge.net/sourceforge/itk/InsightToolkit-3.20.0.tar.gz tar xvzf InsightToolkit-3.20.0.tar.gz cd InsightToolkit-3.20.0 mkdir build cd build cmake -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DITK_USE_REVIEW=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo .. make -j2
Download vvSource-1.1.tar.gz from the VV homepage.
cd ~/ mv ~/Documents/vvSource-1.1.tar.gz ~/ tar xvzf vvSource-1.1.tar.gz cd vv-src/build cmake -DITK_DIR=~/InsightToolkit-3.20.0/build -DVTK_DIR=~/VTK/build .. make -j2
Copy the executable to the system PATH, e.g.
su - cd /usr/local/bin ln -s /home/user/vv-src/build/bin/vv exit
Replace user with your username.
GDB setup
cd ~/gdb/gdb-pretty git clone http://git.gitorious.org/gdb-pretty/gdb-pretty-science.git science cd science mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=~/gdb/install .. make install