This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: location definition of stp_check
- From: Martin Hunt <hunt at redhat dot com>
- To: "Gui,Jian" <guij at cn dot ibm dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Tue, 28 Feb 2006 09:33:04 -0800
- Subject: Re: location definition of stp_check
- Organization: Red Hat Inc.
- References: <008701c63c48$865c36e0$2585b509@IBM528414E28E4>
On Tue, 2006-02-28 at 17:22 +0800, Gui,Jian wrote:
> Hi,
>
> I wanted to build and run stpd in its source directory without
> installing it. I've copied stp_check and set its attribute to
> executable but I still got the error:
> [root@localhost stpd]# ./stpd stap_9762.ko
> stp_check: No such file or directory
> Could not execute stp_check
>
> It is originated by the following statement in main():
> execlp(stp_check, stp_check, NULL)
> while stp_check is defined as:
> #ifdef PKGLIBDIR
> char *stp_check=PKGLIBDIR "/stp_check";
> #else
> char *stp_check="stp_check";
> #endif
>
> I think normally "." is not included in $PATH and
> execlp("stp_check", "stp_check", NULL) always fails,
> therefore we can change it like:
> #ifdef PKGLIBDIR
> char *stp_check=PKGLIBDIR "/stp_check";
> #else
> char *stp_check="./stp_check";
> #endif
Execing just "stp_check" looks for stp_check in your path. You put
stp_check in ".", which is not in your path. Try /usr/local/bin, ~/bin,
anywhere in your PATH.
Changing it as you suggest would require stp_check always be in your
current directory, which doesn't sound like a good thing.
Martin