This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: stap and make/gcc in non standard path
- From: David Smith <dsmith at redhat dot com>
- To: Michael Obster <michael at obster dot org>
- Cc: systemtap at sources dot redhat dot com
- Date: Fri, 22 Dec 2006 09:34:40 -0600
- Subject: Re: stap and make/gcc in non standard path
- References: <20061222153716.vxwcwr3j4gwo0gkw@ssl.spitfire-media.de>
Michael Obster wrote:
Hi,
I have some problems with running stap on teh target platform. There is
a special env for using make and gcc which are installed in a special path.
Both are found in /opt/systemtap/bin.
ENV-variables PATH is set to /opt/systemtap/bin... and
LD_LIBRARY_PATH=/opt/systemtap/lib... and calling make or gcc from the
bash is working.
But running stap gives me following output:
Pass 3: translated to C into
"/tmp/stap9yRfaI/stap_7e3d55ff1395fd977a6bf1687b589136_445.c" in
10usr/0sys/5real ms.
Running make -C "/lib/modules/2.6.10_mvlcge40_sit-omm01_V1.1.3/build"
M="/tmp/stap9yRfaI" modules V=1
sh: line 1: make: command not found
Looks like stap doesn't recognize the env-variables? How I can set this
or is this a bug? Creating symlinks or installing under /usr is not
possible on the target.
You are correct, systemtap overrides the path to
'/bin:/sbin:/usr/bin:/usr/sbin' for security reasons.
My quess is that you are some sort of an embedded environment where the
compiler isn't actually there and you are trying to NFS mount it.
If that is the case, one possible solution to your problem would be to
build your module on a system where the compiler is installed in the
proper place, then transfer the module over and run it with staprun.
Note that the compile system doesn't have to be running the same kernel
as the target system, but it does have to have the target kernel
installed (and then you'd use the stap '-r RELEASE' argument).
Another possible solution to your problem is modify main.cxx to add in
your special compiler directory to our override of PATH.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)