public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register'
@ 2012-04-06 20:36 Negreanu Marius
  2012-04-09 12:19 ` Negreanu Marius
  0 siblings, 1 reply; 8+ messages in thread
From: Negreanu Marius @ 2012-04-06 20:36 UTC (permalink / raw)
  To: systemtap

Hi,

on latest master, I'm getting this error:
       uprobes-inode.c:262: error: implicit declaration of function
'uprobe_register'

I can see that STAPCONF_UPROBE_REGISTER_EXPORTED controls when
uprobe_register is defined,
but I don't know where should uprobe_register come from when
STAPCONF_UPROBE_REGISTER_EXPORTED is 1 .


Thanks,
Marius

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

* Re: uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register'
  2012-04-06 20:36 uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register' Negreanu Marius
@ 2012-04-09 12:19 ` Negreanu Marius
  2012-04-09 17:53   ` Josh Stone
  0 siblings, 1 reply; 8+ messages in thread
From: Negreanu Marius @ 2012-04-09 12:19 UTC (permalink / raw)
  To: systemtap

On Fri, Apr 6, 2012 at 11:36 PM, Negreanu Marius <groleo@gmail.com> wrote:
> Hi,
>
> on latest master, I'm getting this error:
>       uprobes-inode.c:262: error: implicit declaration of function
> 'uprobe_register'
>
> I can see that STAPCONF_UPROBE_REGISTER_EXPORTED controls when
> uprobe_register is defined,
> but I don't know where should uprobe_register come from when
> STAPCONF_UPROBE_REGISTER_EXPORTED is 1 .

Heh,
<linux/wait.h> was not included by asm/uprobes.h
and ./runtime/autoconf-old-inode-uprobes.c was failing because of this.

The failing of the autoconf test meant undefined
STAPCONF_UPROBE_REGISTER_EXPORTED .


-- 
Regards!
http://groleo.wordpress.com

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

* Re: uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register'
  2012-04-09 12:19 ` Negreanu Marius
@ 2012-04-09 17:53   ` Josh Stone
  2012-04-09 19:42     ` Negreanu Marius
  0 siblings, 1 reply; 8+ messages in thread
From: Josh Stone @ 2012-04-09 17:53 UTC (permalink / raw)
  To: Negreanu Marius; +Cc: systemtap, Srikar Dronamraju

On 04/09/2012 05:19 AM, Negreanu Marius wrote:
> On Fri, Apr 6, 2012 at 11:36 PM, Negreanu Marius <groleo@gmail.com> wrote:
>> Hi,
>>
>> on latest master, I'm getting this error:
>>       uprobes-inode.c:262: error: implicit declaration of function
>> 'uprobe_register'
>>
>> I can see that STAPCONF_UPROBE_REGISTER_EXPORTED controls when
>> uprobe_register is defined,
>> but I don't know where should uprobe_register come from when
>> STAPCONF_UPROBE_REGISTER_EXPORTED is 1 .
> 
> Heh,
> <linux/wait.h> was not included by asm/uprobes.h
> and ./runtime/autoconf-old-inode-uprobes.c was failing because of this.
> 
> The failing of the autoconf test meant undefined
> STAPCONF_UPROBE_REGISTER_EXPORTED .

Aha, good sleuthing.  If necessary, we can just add that #include to our
autoconf as a workaround.  But if uprobes.h is using definitions from
wait.h, it ought to make the #include itself. (cc srikar)

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

* Re: uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register'
  2012-04-09 17:53   ` Josh Stone
@ 2012-04-09 19:42     ` Negreanu Marius
  2012-04-09 19:54       ` Josh Stone
  0 siblings, 1 reply; 8+ messages in thread
From: Negreanu Marius @ 2012-04-09 19:42 UTC (permalink / raw)
  To: Josh Stone; +Cc: systemtap, Srikar Dronamraju

On Mon, Apr 9, 2012 at 8:52 PM, Josh Stone <jistone@redhat.com> wrote:
> On 04/09/2012 05:19 AM, Negreanu Marius wrote:
>> On Fri, Apr 6, 2012 at 11:36 PM, Negreanu Marius <groleo@gmail.com> wrote:
>>> Hi,
>>>
>>> on latest master, I'm getting this error:
>>>       uprobes-inode.c:262: error: implicit declaration of function
>>> 'uprobe_register'
>>>
>>> I can see that STAPCONF_UPROBE_REGISTER_EXPORTED controls when
>>> uprobe_register is defined,
>>> but I don't know where should uprobe_register come from when
>>> STAPCONF_UPROBE_REGISTER_EXPORTED is 1 .
>>
>> Heh,
>> <linux/wait.h> was not included by asm/uprobes.h
>> and ./runtime/autoconf-old-inode-uprobes.c was failing because of this.
>>
>> The failing of the autoconf test meant undefined
>> STAPCONF_UPROBE_REGISTER_EXPORTED .
>
> Aha, good sleuthing.  If necessary, we can just add that #include to our
> autoconf as a workaround.  But if uprobes.h is using definitions from
> wait.h, it ought to make the #include itself. (cc srikar)

kernel uprobes.h is using a wait_queue but forgets include wait.h directly;
so it's the kernel duty to have the includes done right; otherwise, I guess
all #include <uprobes.h> that are done in the autoconf*.c would have
to be prepended
by the missing includes.


Thanks,
Marius

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

* Re: uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register'
  2012-04-09 19:42     ` Negreanu Marius
@ 2012-04-09 19:54       ` Josh Stone
  2012-04-09 20:17         ` Negreanu Marius
  0 siblings, 1 reply; 8+ messages in thread
From: Josh Stone @ 2012-04-09 19:54 UTC (permalink / raw)
  To: Negreanu Marius; +Cc: systemtap, Srikar Dronamraju

On 04/09/2012 12:42 PM, Negreanu Marius wrote:
> On Mon, Apr 9, 2012 at 8:52 PM, Josh Stone <jistone@redhat.com> wrote:
>> On 04/09/2012 05:19 AM, Negreanu Marius wrote:
>>> On Fri, Apr 6, 2012 at 11:36 PM, Negreanu Marius <groleo@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> on latest master, I'm getting this error:
>>>>       uprobes-inode.c:262: error: implicit declaration of function
>>>> 'uprobe_register'
>>>>
>>>> I can see that STAPCONF_UPROBE_REGISTER_EXPORTED controls when
>>>> uprobe_register is defined,
>>>> but I don't know where should uprobe_register come from when
>>>> STAPCONF_UPROBE_REGISTER_EXPORTED is 1 .
>>>
>>> Heh,
>>> <linux/wait.h> was not included by asm/uprobes.h
>>> and ./runtime/autoconf-old-inode-uprobes.c was failing because of this.
>>>
>>> The failing of the autoconf test meant undefined
>>> STAPCONF_UPROBE_REGISTER_EXPORTED .
>>
>> Aha, good sleuthing.  If necessary, we can just add that #include to our
>> autoconf as a workaround.  But if uprobes.h is using definitions from
>> wait.h, it ought to make the #include itself. (cc srikar)
> 
> kernel uprobes.h is using a wait_queue but forgets include wait.h directly;
> so it's the kernel duty to have the includes done right; otherwise, I guess
> all #include <uprobes.h> that are done in the autoconf*.c would have
> to be prepended
> by the missing includes.

AFAICS, the current development version of uprobes no longer uses
wait_queue.  So we could add the #include for compatibility with that
interim version, but upstream it won't matter.

That particular autoconf that tripped you up is only intended for
compatibility as well, so I guess we might as well do this.  Can you
test and confirm, is it enough just to add "#include <linux/wait.h>" to
autoconf-old-inode-uprobes.c to get things working?

Josh

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

* Re: uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register'
  2012-04-09 19:54       ` Josh Stone
@ 2012-04-09 20:17         ` Negreanu Marius
  2012-04-10  9:24           ` Negreanu Marius
  0 siblings, 1 reply; 8+ messages in thread
From: Negreanu Marius @ 2012-04-09 20:17 UTC (permalink / raw)
  To: Josh Stone; +Cc: systemtap, Srikar Dronamraju

On Mon, Apr 9, 2012 at 10:54 PM, Josh Stone <jistone@redhat.com> wrote:
> On 04/09/2012 12:42 PM, Negreanu Marius wrote:
>> On Mon, Apr 9, 2012 at 8:52 PM, Josh Stone <jistone@redhat.com> wrote:
>>> On 04/09/2012 05:19 AM, Negreanu Marius wrote:
>>>> On Fri, Apr 6, 2012 at 11:36 PM, Negreanu Marius <groleo@gmail.com> wrote:
>>>>> Hi,
>>>>>
>>>>> on latest master, I'm getting this error:
>>>>>       uprobes-inode.c:262: error: implicit declaration of function
>>>>> 'uprobe_register'
>>>>>
>>>>> I can see that STAPCONF_UPROBE_REGISTER_EXPORTED controls when
>>>>> uprobe_register is defined,
>>>>> but I don't know where should uprobe_register come from when
>>>>> STAPCONF_UPROBE_REGISTER_EXPORTED is 1 .
>>>>
>>>> Heh,
>>>> <linux/wait.h> was not included by asm/uprobes.h
>>>> and ./runtime/autoconf-old-inode-uprobes.c was failing because of this.
>>>>
>>>> The failing of the autoconf test meant undefined
>>>> STAPCONF_UPROBE_REGISTER_EXPORTED .
>>>
>>> Aha, good sleuthing.  If necessary, we can just add that #include to our
>>> autoconf as a workaround.  But if uprobes.h is using definitions from
>>> wait.h, it ought to make the #include itself. (cc srikar)
>>
>> kernel uprobes.h is using a wait_queue but forgets include wait.h directly;
>> so it's the kernel duty to have the includes done right; otherwise, I guess
>> all #include <uprobes.h> that are done in the autoconf*.c would have
>> to be prepended
>> by the missing includes.
>
> AFAICS, the current development version of uprobes no longer uses
> wait_queue.  So we could add the #include for compatibility with that
> interim version, but upstream it won't matter.
>
> That particular autoconf that tripped you up is only intended for
> compatibility as well, so I guess we might as well do this.
Good point !

> Can you
> test and confirm, is it enough just to add "#include <linux/wait.h>" to
> autoconf-old-inode-uprobes.c to get things working?

I'll be able to test this tomorow (which is 9hrs away for me)
and I'll get back with the results.

Thanks,
Marius
results.

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

* Re: uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register'
  2012-04-09 20:17         ` Negreanu Marius
@ 2012-04-10  9:24           ` Negreanu Marius
  2012-04-10 15:09             ` Frank Ch. Eigler
  0 siblings, 1 reply; 8+ messages in thread
From: Negreanu Marius @ 2012-04-10  9:24 UTC (permalink / raw)
  To: Josh Stone; +Cc: systemtap, Srikar Dronamraju

On Mon, Apr 9, 2012 at 11:16 PM, Negreanu Marius <groleo@gmail.com> wrote:
> On Mon, Apr 9, 2012 at 10:54 PM, Josh Stone <jistone@redhat.com> wrote:
>> On 04/09/2012 12:42 PM, Negreanu Marius wrote:
>>> On Mon, Apr 9, 2012 at 8:52 PM, Josh Stone <jistone@redhat.com> wrote:
>>>> On 04/09/2012 05:19 AM, Negreanu Marius wrote:
>>>>> On Fri, Apr 6, 2012 at 11:36 PM, Negreanu Marius <groleo@gmail.com> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> on latest master, I'm getting this error:
>>>>>>       uprobes-inode.c:262: error: implicit declaration of function
>>>>>> 'uprobe_register'
>>>>>>
>>>>>> I can see that STAPCONF_UPROBE_REGISTER_EXPORTED controls when
>>>>>> uprobe_register is defined,
>>>>>> but I don't know where should uprobe_register come from when
>>>>>> STAPCONF_UPROBE_REGISTER_EXPORTED is 1 .
>>>>>
>>>>> Heh,
>>>>> <linux/wait.h> was not included by asm/uprobes.h
>>>>> and ./runtime/autoconf-old-inode-uprobes.c was failing because of this.
>>>>>
>>>>> The failing of the autoconf test meant undefined
>>>>> STAPCONF_UPROBE_REGISTER_EXPORTED .
>>>>
>>>> Aha, good sleuthing.  If necessary, we can just add that #include to our
>>>> autoconf as a workaround.  But if uprobes.h is using definitions from
>>>> wait.h, it ought to make the #include itself. (cc srikar)
>>>
>>> kernel uprobes.h is using a wait_queue but forgets include wait.h directly;
>>> so it's the kernel duty to have the includes done right; otherwise, I guess
>>> all #include <uprobes.h> that are done in the autoconf*.c would have
>>> to be prepended
>>> by the missing includes.
>>
>> AFAICS, the current development version of uprobes no longer uses
>> wait_queue.  So we could add the #include for compatibility with that
>> interim version, but upstream it won't matter.
>>
>> That particular autoconf that tripped you up is only intended for
>> compatibility as well, so I guess we might as well do this.
> Good point !
>
>> Can you
>> test and confirm, is it enough just to add "#include <linux/wait.h>" to
>> autoconf-old-inode-uprobes.c to get things working?
>
> I'll be able to test this tomorow (which is 9hrs away for me)
> and I'll get back with the results.


I confirm that adding the line below fixes the detection of
"STAPCONF_OLD_INODE_UPROBES"
The kernel uprobe patches I'm using are here[1] and the kernel is a 3.0


diff --git a/runtime/autoconf-old-inode-uprobes.c
b/runtime/autoconf-old-inode-uprobes.c
index 1a452c1..d725394 100644
--- a/runtime/autoconf-old-inode-uprobes.c
+++ b/runtime/autoconf-old-inode-uprobes.c
@@ -1,4 +1,5 @@
 #if defined(CONFIG_ARCH_SUPPORTS_UPROBES) && defined(CONFIG_UPROBES)
+#include <linux/wait.h>
 #include <linux/uprobes.h>
 /* Check whether we have the old inode-uprobes api.
  * (It was later changed to uprobe_register and uprobe_unregister.)



[1] : http://repos.fedorapeople.org/repos/jistone/kernel-uprobes/fedora-15/SRPMS/kernel-2.6.40.4-6.uprobes2.fc15.src.rpm

-- 
Regards!
http://groleo.wordpress.com

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

* Re: uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register'
  2012-04-10  9:24           ` Negreanu Marius
@ 2012-04-10 15:09             ` Frank Ch. Eigler
  0 siblings, 0 replies; 8+ messages in thread
From: Frank Ch. Eigler @ 2012-04-10 15:09 UTC (permalink / raw)
  To: Negreanu Marius; +Cc: Josh Stone, systemtap, Srikar Dronamraju

Negreanu Marius <groleo@gmail.com> writes:

> [...]
> I confirm that adding the line below fixes the detection of
> "STAPCONF_OLD_INODE_UPROBES"
> The kernel uprobe patches I'm using are here[1] and the kernel is a 3.0
> [...]

Thank you, merged.

- FChE

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

end of thread, other threads:[~2012-04-10 15:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-06 20:36 uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register' Negreanu Marius
2012-04-09 12:19 ` Negreanu Marius
2012-04-09 17:53   ` Josh Stone
2012-04-09 19:42     ` Negreanu Marius
2012-04-09 19:54       ` Josh Stone
2012-04-09 20:17         ` Negreanu Marius
2012-04-10  9:24           ` Negreanu Marius
2012-04-10 15:09             ` Frank Ch. Eigler

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).