|
From: Yao Qi <qiy...@cn...> - 2005-10-27 10:15:58
|
Hi, valgrind-developers,
I just start to use valgrind from scratch and I met a problem when I set
VALGRIND_LIB per README_DEVELOPERS as follows. Maybe someone of you could
clarify for me. Thanks in advance.
At the fifth line of README_DEVELOPERS, it is said that "run
coregrind/valgrind with the VALGRIND_LIB environment variable set, where <dir>
is the root of the source tree".
I set VALGRIND_LIB like this,
[qiyao@localhost valgrind]$ export VALGRIND_LIB=/home/qiyao/valgrind
and run valgrind like this,
[qiyao@localhost valgrind]$ coregrind/valgrind
valgrind: failed to start tool 'memcheck': Permission denied
I strace its execution and found that I evaluate the wrong value to VALGRIND_LIB,
[qiyao@localhost valgrind]$ strace coregrind/valgrind
......
execve("/home/qiyao/valgrind/memcheck", ["coregrind/valgrind"], [/* 24 vars */]) = -1
EACCES (Permission denied)
execve failed since /home/qiyao/valgrind/memcheck is just a *directory* instead of
an executable, so I reset VALGRIND_LIB like this,
[qiyao@localhost valgrind]$ export VALGRIND_LIB=/home/qiyao/valgrind/memcheck
and ./coregrind/valgrind works.
My rough idea to it is that either README_DEVELOPERS of this part is ambiguous or
there is a 'bug' in coregrind/launcher.c not to interpret VALGRIND_LIB very well.
140 toolfile = malloc(strlen(valgrind_lib) + strlen(toolname) + 2);
141 if (toolfile == NULL)
142 barf("malloc of toolfile failed.");
143 sprintf(toolfile, "%s/%s", valgrind_lib, toolname);
I am thinking of whether there is any solution for this in source code side? Would
anyone like to take a look? Any suggestions and comments are highly appreciated!
--
Regards, Yao
Yao Qi
|
|
From: Tom H. <to...@co...> - 2005-10-27 10:52:37
|
In message <436...@cn...>
Yao Qi <qiy...@cn...> wrote:
> I just start to use valgrind from scratch and I met a problem when I set
> VALGRIND_LIB per README_DEVELOPERS as follows. Maybe someone of you could
> clarify for me. Thanks in advance.
>
> At the fifth line of README_DEVELOPERS, it is said that "run
> coregrind/valgrind with the VALGRIND_LIB environment variable set, where <dir>
> is the root of the source tree".
Why not just install it properly? Then you won't have to muck around
with such internal details...
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Tom H. <to...@co...> - 2005-10-27 10:57:46
|
In message <436...@cn...>
Yao Qi <qiy...@cn...> wrote:
> I just start to use valgrind from scratch and I met a problem when I set
> VALGRIND_LIB per README_DEVELOPERS as follows. Maybe someone of you could
> clarify for me. Thanks in advance.
>
> At the fifth line of README_DEVELOPERS, it is said that "run
> coregrind/valgrind with the VALGRIND_LIB environment variable set, where <dir>
> is the root of the source tree".
>
> I set VALGRIND_LIB like this,
> [qiyao@localhost valgrind]$ export VALGRIND_LIB=/home/qiyao/valgrind
> and run valgrind like this,
> [qiyao@localhost valgrind]$ coregrind/valgrind
> valgrind: failed to start tool 'memcheck': Permission denied
I just read README_DEVELOPERS again and you haven't actually done what
it said - you are supposed to point VALGRIND_LIB at the .in_place
directory. I've just tried that and it seems to work for me.
That said I still say it's easier just to install it - it's what I do
all the time, configure with --prefix pointing at a temporary area and
do a make install and run the installed version.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Nicholas N. <nj...@cs...> - 2005-10-27 14:52:05
|
On Thu, 27 Oct 2005, Tom Hughes wrote: > That said I still say it's easier just to install it - it's what I do > all the time, configure with --prefix pointing at a temporary area and > do a make install and run the installed version. I like the in-place builds because it's quicker to "make" than "make install". N |
|
From: Yao Qi <qiy...@cn...> - 2005-10-28 06:18:29
|
Tom Hughes wrote: > In message <436...@cn...> > Yao Qi <qiy...@cn...> wrote: > > >>I just start to use valgrind from scratch and I met a problem when I set >>VALGRIND_LIB per README_DEVELOPERS as follows. Maybe someone of you could >>clarify for me. Thanks in advance. >> >>At the fifth line of README_DEVELOPERS, it is said that "run >>coregrind/valgrind with the VALGRIND_LIB environment variable set, where <dir> >>is the root of the source tree". >> >>I set VALGRIND_LIB like this, >>[qiyao@localhost valgrind]$ export VALGRIND_LIB=/home/qiyao/valgrind >>and run valgrind like this, >>[qiyao@localhost valgrind]$ coregrind/valgrind >>valgrind: failed to start tool 'memcheck': Permission denied > > > I just read README_DEVELOPERS again and you haven't actually done what > it said - you are supposed to point VALGRIND_LIB at the .in_place > directory. I've just tried that and it seems to work for me. I have tried again to export VALGRIND_LIB at .in_place directory and coregrind/valgrind works. Thank you. > > That said I still say it's easier just to install it - it's what I do > all the time, configure with --prefix pointing at a temporary area and > do a make install and run the installed version. I just want to have a try when I read README_DEVELOPERS, and I have tried --prefix option, thanks again. > > Tom > -- Regards, Yao Yao Qi |