|
From: Borse, G. <gan...@cr...> - 2008-04-28 10:43:12
|
Hi, I am trying to use valgrind-3.3.0 for investigating a crash in my C++ application running on SLES9 OS. In this case, I have compiled the valgrind binaries on a different development host with the same SLES9 OS. Then I prepared a tar ball of these compiled binaries & shipped them onto the production machine having same SLES9 OS. I had to compile Valgrind source code on a different host because I do not have any compilation tools installed on my production host. I thought of using "-prefix=<Install-dir-path>" while doing "./configure". But I cannot do that also because the directory structure on production host is totally different than development host (this is because user logins are different). I cannot use relative path, because configure script does not allow that. #>./configure --prefix=~/Releases/ configure: error: expected an absolute directory name for --prefix: ~/Releases/ Can you please help me how can I compile valgrind on a different host & use it on a different host (with same OS) having different directory structure? Thanks in advance for all your help & guidance. Regards, Ganesh ============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ============================================================================== |
|
From: Bart V. A. <bar...@gm...> - 2008-04-28 10:50:04
|
On Mon, Apr 28, 2008 at 12:40 PM, Borse, Ganesh <gan...@cr...> wrote: > #>./configure --prefix=~/Releases/ > > configure: error: expected an absolute directory name for --prefix: > ~/Releases/ Hello Ganesh, Did you already try the following: ./configure --prefix=$HOME/Releases && make -s && make -s install You can run this command as an ordinary user, you don't need root privileges when installing Valgrind in a directory under your homedirectory. Bart. |
|
From: Borse, G. <gan...@cr...> - 2008-04-28 11:54:40
|
Bart,
I did compile now with this new command.
When I executed the command provided by you, the binaries (& libs) got
installed in my $HOME/Releases/.
Then I copied it over to my production server. There I tried running it
from /home/user2/Releases/bin directory, but it failed as below:
strace valgrind
...
execve("/usr/local/lib/valgrind/x86-linux/memcheck", ["valgrind"], [/*
68 vars */]) = -1 ENOENT (No such file or directory)
write(2, "valgrind: failed to start tool \'"..., 94valgrind: failed to
start tool 'memcheck' for platform 'x86-linux': No such file or
directory
Did I do anything wrong?
I am thinking of doing the build & install Valgrind in 2 steps:
1) Do build on my development machine:
./configure --prefix=/home/user2/Releases/valgrind330/ && make -s
2) Do install on production server, like:
make install
Will this work?
Thanks,
Ganesh
-----Original Message-----
From: Bart Van Assche [mailto:bar...@gm...]
Sent: 28 April 2008 18:50
To: Borse, Ganesh
Cc: val...@li...
Subject: Re: [Valgrind-users] Error while running valgrind on different
machine than orignal place where it was compiled
On Mon, Apr 28, 2008 at 12:40 PM, Borse, Ganesh
<gan...@cr...> wrote:
> #>./configure --prefix=~/Releases/
>
> configure: error: expected an absolute directory name for --prefix:
> ~/Releases/
Hello Ganesh,
Did you already try the following:
./configure --prefix=$HOME/Releases && make -s && make -s install
You can run this command as an ordinary user, you don't need root
privileges when installing Valgrind in a directory under your
homedirectory.
Bart.
==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
|
|
From: Julian S. <js...@ac...> - 2008-04-28 12:00:22
|
> I am thinking of doing the build & install Valgrind in 2 steps: > 1) Do build on my development machine: > ./configure --prefix=/home/user2/Releases/valgrind330/ && make -s > > 2) Do install on production server, like: > make install > > Will this work? I think the only way you can make this work is to build it on your desktop machine using the --prefix that you need for the production machine, *and* 'make install' it. Then copy the install tree to the exact same location on the production machine. Even simpler is just to build it directly on the production machine. J |
|
From: Borse, G. <gan...@cr...> - 2008-04-29 06:42:08
|
Hi,
I could compile Valgrind on one machine & got it installed on another
machine (with few hacks in install target of Makefile).
But, still the "valgrind --tool=memcheck" command looks for the memcheck
binary in /usr/local/lib/valgrind/x86-linux/
As seen in the strace output:
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40132000
set_thread_area({entry_number:-1 -> 6, base_addr:0x401326c0,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
readlink("/proc/self/exe",
"/app/gce1/Releases/valgrind330/bin/valgrind", 4096) = 43
brk(0) = 0x804d000
brk(0x806e000) = 0x806e000
execve("/usr/local/lib/valgrind/x86-linux/memcheck", ["valgrind"], [/*
68 vars */]) = -1 ENOENT (No such file or directory)
write(2, "valgrind: failed to start tool \'"..., 94valgrind: failed to
start tool 'memcheck' for platform 'x86-linux': No such file or
directory
) = 94
exit_group(1) = ?
I set the LD_LIBRARY_PATH as well as PATH to point to directory which
has valgrind installed.
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/gce1/Releases/valgrind330/lib/val
grind/x86-linux
export PATH=$PATH:/home/gce1/Releases/valgrind330/lib/valgrind/x86-linux
Is there any way that I can tell valgrind to pick the tools (memcheck,
etc) from directory different than /usr/local/bin? Is there any
environment variable for this?
Thanks,
Ganesh
-----Original Message-----
From: Julian Seward [mailto:js...@ac...]
Sent: 28 April 2008 19:55
To: val...@li...
Cc: Borse, Ganesh
Subject: Re: [Valgrind-users] Error while running valgrind on different
machine than orignal place where it was compiled
> I am thinking of doing the build & install Valgrind in 2 steps:
> 1) Do build on my development machine:
> ./configure --prefix=/home/user2/Releases/valgrind330/ && make -s
>
> 2) Do install on production server, like:
> make install
>
> Will this work?
I think the only way you can make this work is to build it on your
desktop machine using the --prefix that you need for the production
machine, *and* 'make install' it. Then copy the install tree to the
exact same location on the production machine.
Even simpler is just to build it directly on the production
machine.
J
==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
|
|
From: Tom H. <to...@co...> - 2008-04-29 07:24:55
|
In message <D55964799EE16D49AA715909B72D5C96CA9B53@ESNG17P32001B.csfb.cs-group.com> Ganesh Borse <gan...@cr...> wrote: > I could compile Valgrind on one machine & got it installed on another > machine (with few hacks in install target of Makefile). Look, it was explained yesterday how you should do it... Here is the step by step version: On build host: # ./configure --prefix=/path/from/root/on/install/host # make # make install DESTDIR=/tmp/valgrind-root # cd /tmp/valgrind-root # tar zcvf /tmp/valgrind.tar.gz . # scp /tmp/valgrind.tar.gz install-host:/tmp On install host: # cd / # tar zxvf /tmp/valgrind.tar.gz # /path/from/root/on/install/host/bin/valgrind ... Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |