This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: location definition of stp_check


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]