public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* /usr/bin/staprun hardcoded in latest git
@ 2009-01-04 14:15 Andi Kleen
  2009-01-04 18:30 ` Mark Wielaard
  0 siblings, 1 reply; 9+ messages in thread
From: Andi Kleen @ 2009-01-04 14:15 UTC (permalink / raw)
  To: systemtap


I updated to a recent git version of systemtap. One issue I noticed
is that /usr/sbin/staprun is hardcoded somewhere in stap (I didn't find
it with a quick grep in the source, but according to strings it is in
stapio). I had it installed in /usr/local/bin
and "stap" failed because it couldn't find /usr/bin/staprun.
I worked around it with a symlink, but it should be probably fixed.

The other issue was that the new NSS dependency is somewhat 
annoying. I hope systemtap doesn't plan to descend further
into DLL hell territory.

-Andi

-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: /usr/bin/staprun hardcoded in latest git
  2009-01-04 14:15 /usr/bin/staprun hardcoded in latest git Andi Kleen
@ 2009-01-04 18:30 ` Mark Wielaard
  2009-01-04 18:42   ` Andi Kleen
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Wielaard @ 2009-01-04 18:30 UTC (permalink / raw)
  To: Andi Kleen; +Cc: systemtap

Hi Andi,

On Sun, 2009-01-04 at 15:16 +0100, Andi Kleen wrote:
> I updated to a recent git version of systemtap. One issue I noticed
> is that /usr/sbin/staprun is hardcoded somewhere in stap (I didn't find
> it with a quick grep in the source, but according to strings it is in
> stapio). I had it installed in /usr/local/bin
> and "stap" failed because it couldn't find /usr/bin/staprun.
> I worked around it with a symlink, but it should be probably fixed.

Thanks for the report. stapio gets staprun through:
const char *staprun = getenv ("SYSTEMTAP_STAPRUN") ?: BINDIR "/staprun";
So, you can also work around it by setting SYSTEMTAP_STAPRUN to your
local staprun. But BINDIR should default to '${exec_prefix}/bin' unless
you configure --bindir=/something/else. I am not sure how it could have
been set to /usr/sbin in your case. Maybe config.log gives a hint how
bindir was set?

> The other issue was that the new NSS dependency is somewhat 
> annoying. I hope systemtap doesn't plan to descend further
> into DLL hell territory.

The NSS dependency is only needed for the client/server mode. It would
be good to have a configure --disable-stap-sever for those that don't
need it (or disable building it automagically when NSS isn't found).

Cheers,

Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: /usr/bin/staprun hardcoded in latest git
  2009-01-04 18:30 ` Mark Wielaard
@ 2009-01-04 18:42   ` Andi Kleen
  2009-01-04 19:11     ` Mark Wielaard
  0 siblings, 1 reply; 9+ messages in thread
From: Andi Kleen @ 2009-01-04 18:42 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: Andi Kleen, systemtap

On Sun, Jan 04, 2009 at 07:30:34PM +0100, Mark Wielaard wrote:
> Hi Andi,
> 
> On Sun, 2009-01-04 at 15:16 +0100, Andi Kleen wrote:
> > I updated to a recent git version of systemtap. One issue I noticed
> > is that /usr/sbin/staprun is hardcoded somewhere in stap (I didn't find
> > it with a quick grep in the source, but according to strings it is in
> > stapio). I had it installed in /usr/local/bin
> > and "stap" failed because it couldn't find /usr/bin/staprun.
> > I worked around it with a symlink, but it should be probably fixed.
> 
> Thanks for the report. stapio gets staprun through:
> const char *staprun = getenv ("SYSTEMTAP_STAPRUN") ?: BINDIR "/staprun";
> So, you can also work around it by setting SYSTEMTAP_STAPRUN to your
> local staprun. But BINDIR should default to '${exec_prefix}/bin' unless
> you configure --bindir=/something/else. I am not sure how it could have
> been set to /usr/sbin in your case. Maybe config.log gives a hint how
> bindir was set?

I didn't set bindir explicitely, just --prefix

% grep bindir config.log 
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
% strings stapio | grep usr/bin
/usr/bin/staprun
% strings stapio-mainloop.o | grep usr/bin
/usr/bin/staprun

> > The other issue was that the new NSS dependency is somewhat 
> > annoying. I hope systemtap doesn't plan to descend further
> > into DLL hell territory.
> 
> The NSS dependency is only needed for the client/server mode. It would
> be good to have a configure --disable-stap-sever for those that don't
> need it (or disable building it automagically when NSS isn't found).

Both would be a good idea.

-Andi
-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: /usr/bin/staprun hardcoded in latest git
  2009-01-04 18:42   ` Andi Kleen
@ 2009-01-04 19:11     ` Mark Wielaard
  2009-01-04 19:31       ` Andi Kleen
  2009-01-05 16:09       ` Dave Brolley
  0 siblings, 2 replies; 9+ messages in thread
From: Mark Wielaard @ 2009-01-04 19:11 UTC (permalink / raw)
  To: Andi Kleen; +Cc: systemtap, Dave Brolley

Hi Andi,

On Sun, 2009-01-04 at 19:56 +0100, Andi Kleen wrote:
> I didn't set bindir explicitely, just --prefix
> 
> % grep bindir config.log 
> bindir='${exec_prefix}/bin'
> sbindir='${exec_prefix}/sbin'

And I assume:
$ grep prefix=\' config.log
exec_prefix='${prefix}'
prefix='/usr/local'

> % strings stapio | grep usr/bin
> /usr/bin/staprun
> % strings stapio-mainloop.o | grep usr/bin
> /usr/bin/staprun

hmmm. Even even with --prefix=/usr/local I am unable to replicate :{
Could you rm stapio-mainloop.o && make stapio-mainloop.o ?
With --prefix=/usr/local it should give:
gcc -DHAVE_CONFIG_H -I.  -DBINDIR='"/usr/local/bin"'
-DPKGDATADIR='"/usr/local/share/systemtap"'
-DPKGLIBDIR='"/usr/local/libexec/systemtap"' [...]

> > > The other issue was that the new NSS dependency is somewhat 
> > > annoying. I hope systemtap doesn't plan to descend further
> > > into DLL hell territory.
> > 
> > The NSS dependency is only needed for the client/server mode. It would
> > be good to have a configure --disable-stap-sever for those that don't
> > need it (or disable building it automagically when NSS isn't found).
> 
> Both would be a good idea.

If Dave doesn't have time to add that, I can add something like that.
Dave, what do you think?

Cheers,

Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: /usr/bin/staprun hardcoded in latest git
  2009-01-04 19:11     ` Mark Wielaard
@ 2009-01-04 19:31       ` Andi Kleen
  2009-01-05  9:59         ` Mark Wielaard
  2009-01-05 16:09       ` Dave Brolley
  1 sibling, 1 reply; 9+ messages in thread
From: Andi Kleen @ 2009-01-04 19:31 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: Andi Kleen, systemtap, Dave Brolley

On Sun, Jan 04, 2009 at 08:11:07PM +0100, Mark Wielaard wrote:
> Hi Andi,
> 
> On Sun, 2009-01-04 at 19:56 +0100, Andi Kleen wrote:
> > I didn't set bindir explicitely, just --prefix
> > 
> > % grep bindir config.log 
> > bindir='${exec_prefix}/bin'
> > sbindir='${exec_prefix}/sbin'
> 
> And I assume:
> $ grep prefix=\' config.log
> exec_prefix='${prefix}'
> prefix='/usr/local'

Nearly, i use prefix=/pkg/systemtap-date and then symlink to usr/local/bin

> 
> > % strings stapio | grep usr/bin
> > /usr/bin/staprun
> > % strings stapio-mainloop.o | grep usr/bin
> > /usr/bin/staprun
> 
> hmmm. Even even with --prefix=/usr/local I am unable to replicate :{
> Could you rm stapio-mainloop.o && make stapio-mainloop.o ?
> With --prefix=/usr/local it should give:
> gcc -DHAVE_CONFIG_H -I.  -DBINDIR='"/usr/local/bin"'
> -DPKGDATADIR='"/usr/local/share/systemtap"'
> -DPKGLIBDIR='"/usr/local/libexec/systemtap"' [...]

Ah indeed that fixes it. So it looks like just the dependencies
are broken?

-Andi

-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: /usr/bin/staprun hardcoded in latest git
  2009-01-04 19:31       ` Andi Kleen
@ 2009-01-05  9:59         ` Mark Wielaard
  2009-01-05 12:42           ` Andi Kleen
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Wielaard @ 2009-01-05  9:59 UTC (permalink / raw)
  To: Andi Kleen; +Cc: systemtap, Dave Brolley

Hi Andi,

On Sun, 2009-01-04 at 20:45 +0100, Andi Kleen wrote:
> On Sun, Jan 04, 2009 at 08:11:07PM +0100, Mark Wielaard wrote:
> > hmmm. Even even with --prefix=/usr/local I am unable to replicate :{
> > Could you rm stapio-mainloop.o && make stapio-mainloop.o ?
> > With --prefix=/usr/local it should give:
> > gcc -DHAVE_CONFIG_H -I.  -DBINDIR='"/usr/local/bin"'
> > -DPKGDATADIR='"/usr/local/share/systemtap"'
> > -DPKGLIBDIR='"/usr/local/libexec/systemtap"' [...]
> 
> Ah indeed that fixes it. So it looks like just the dependencies
> are broken?

Glad to have your issue worked out. And yes, if you reconfigure in an
build dir then currently you will have to do a make clean first. We
could instead of passing BINDIR and friends through AM_CPPFLAGS in
Makefile.am, add them to config.h and include that in the relevant .c
files. Then a reconfigure should trigger a rebuild of the .o files. Does
that make sense to others? Or is that too tricky for the runtime .c
files?

Cheers,

Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: /usr/bin/staprun hardcoded in latest git
  2009-01-05  9:59         ` Mark Wielaard
@ 2009-01-05 12:42           ` Andi Kleen
  2009-01-11 13:47             ` Mark Wielaard
  0 siblings, 1 reply; 9+ messages in thread
From: Andi Kleen @ 2009-01-05 12:42 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: Andi Kleen, systemtap, Dave Brolley

On Mon, Jan 05, 2009 at 10:58:43AM +0100, Mark Wielaard wrote:
> Hi Andi,
> 
> On Sun, 2009-01-04 at 20:45 +0100, Andi Kleen wrote:
> > On Sun, Jan 04, 2009 at 08:11:07PM +0100, Mark Wielaard wrote:
> > > hmmm. Even even with --prefix=/usr/local I am unable to replicate :{
> > > Could you rm stapio-mainloop.o && make stapio-mainloop.o ?
> > > With --prefix=/usr/local it should give:
> > > gcc -DHAVE_CONFIG_H -I.  -DBINDIR='"/usr/local/bin"'
> > > -DPKGDATADIR='"/usr/local/share/systemtap"'
> > > -DPKGLIBDIR='"/usr/local/libexec/systemtap"' [...]
> > 
> > Ah indeed that fixes it. So it looks like just the dependencies
> > are broken?
> 
> Glad to have your issue worked out. And yes, if you reconfigure in an
> build dir then currently you will have to do a make clean first. We

The reason I didn't do this is because make clean reruns configure
first and that failed for me due to missing dependencies.

-Andi

-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: /usr/bin/staprun hardcoded in latest git
  2009-01-04 19:11     ` Mark Wielaard
  2009-01-04 19:31       ` Andi Kleen
@ 2009-01-05 16:09       ` Dave Brolley
  1 sibling, 0 replies; 9+ messages in thread
From: Dave Brolley @ 2009-01-05 16:09 UTC (permalink / raw)
  To: Mark Wielaard; +Cc: Andi Kleen, systemtap

Mark Wielaard wrote:
>
>>> The NSS dependency is only needed for the client/server mode. It would
>>> be good to have a configure --disable-stap-sever for those that don't
>>> need it (or disable building it automagically when NSS isn't found).
>>>       
>> Both would be a good idea.
>>     
>
> If Dave doesn't have time to add that, I can add something like that.
> Dave, what do you think?
>
>   
Mark, I could likely figure it out, but if you know how to add this 
check, then please go ahead.

Thanks,
Dave

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: /usr/bin/staprun hardcoded in latest git
  2009-01-05 12:42           ` Andi Kleen
@ 2009-01-11 13:47             ` Mark Wielaard
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Wielaard @ 2009-01-11 13:47 UTC (permalink / raw)
  To: Andi Kleen; +Cc: systemtap, Dave Brolley

Hi Andi,

On Mon, 2009-01-05 at 13:56 +0100, Andi Kleen wrote:
> > Glad to have your issue worked out. And yes, if you reconfigure in an
> > build dir then currently you will have to do a make clean first. We
> 
> The reason I didn't do this is because make clean reruns configure
> first and that failed for me due to missing dependencies.

A couple of changes to the configure logic went in and if things were
done correctly you should now only get a warning if the nss/nspr
libraries weren't found, but no error, it will just not build the
stap-client/-server parts. Also there is now a direct dependency on the
prefix location now, through config.h, so stuff that has a location in
should automagically be rebuilt on a make.

If there are any other hard requirements or dependencies missing let us
know and we will make sure they are not blocking.

Thanks,

Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-01-11 13:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-04 14:15 /usr/bin/staprun hardcoded in latest git Andi Kleen
2009-01-04 18:30 ` Mark Wielaard
2009-01-04 18:42   ` Andi Kleen
2009-01-04 19:11     ` Mark Wielaard
2009-01-04 19:31       ` Andi Kleen
2009-01-05  9:59         ` Mark Wielaard
2009-01-05 12:42           ` Andi Kleen
2009-01-11 13:47             ` Mark Wielaard
2009-01-05 16:09       ` Dave Brolley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).