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:jseward@...]
Sent: 28 April 2008 19:55
To: valgrind-users@...
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
==============================================================================
|