For a distro dedicated to HPC ROCKS seems to lack every single debugging tool that I'm familiar with. Here's another one: gdb
--START HERE --
First compile texinfo:
cd ~/tmp
wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.12.tar.gz
tar -xvf texinfo-4.12.tar.gz
cd texinfo-4.12/
./configure
make
sudo make install
ln -s /usr/loca/bin/makeinfo /usr/bin/makeinfo
Then gdb:
cd ~/tmp
wget http://ftp.gnu.org/gnu/gdb/gdb-7.4.tar.gz
tar -xvf gdb-7.4.tar.gz
cd gdb-7.4/
./configure
make
sudo make install
If you haven't symlinked makeinfo above you'll get errors.
Usage:
gdb programme
(gdb) run arg1 arg2
Showing posts with label centos 5.6. Show all posts
Showing posts with label centos 5.6. Show all posts
12 March 2012
100. Compile strace on ROCK 5.4.3
Maybe I've set things up wrong, but I can't find any strace package in the yum repos on my ROCKS 5.4.3 installation.
The compilation is very easy, but I'll show it here for those who feel nervous about compiling their own programmes:
mkdir ~/tmp
cd ~/tmp
The wget takes a while to figure out where to download from -- be patient:
wget http://sourceforge.net/projects/strace/files/latest/download?source=files
unxz strace-4.6.tar.xz
tar -xvf strace-4.6.tar
cd strace-4.6/
./configure
make
sudo make install
How to use:
While I've spent a couple of years with Debian I'm a CentOS newbie, and I keep being confused about the location of the libs -- for my compiles I need to put libs in /usr/lib, but to execute I seem to need to put symlinks in /usr/lib64. strace can help you track where a program is looking for its libs
e.g. to see what the program sinfo is up to
strace -o sinfo.log sinfo
Here is a snippet from sinfo.log:
The compilation is very easy, but I'll show it here for those who feel nervous about compiling their own programmes:
mkdir ~/tmp
cd ~/tmp
The wget takes a while to figure out where to download from -- be patient:
wget http://sourceforge.net/projects/strace/files/latest/download?source=files
unxz strace-4.6.tar.xz
tar -xvf strace-4.6.tar
cd strace-4.6/
./configure
make
sudo make install
How to use:
While I've spent a couple of years with Debian I'm a CentOS newbie, and I keep being confused about the location of the libs -- for my compiles I need to put libs in /usr/lib, but to execute I seem to need to put symlinks in /usr/lib64. strace can help you track where a program is looking for its libs
e.g. to see what the program sinfo is up to
strace -o sinfo.log sinfo
Here is a snippet from sinfo.log:
open("/lib64/libc.so.6", O_RDONLY) = 3
open("/usr/local/lib/sinfo/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/openmpi/lib/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/librt.so.1", O_RDONLY) = 3
open("/usr/local/lib/sinfo/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/opt/openmpi/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib64/libdl.so.2", O_RDONLY) = 3
You can see that it e.g. looks for libdl.so.2 first in /usr/local/lib/sinfo, then in /opt/openmpi/lib/ and finally finds it in /lib64
Subscribe to:
Posts (Atom)