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: uprobes-inode.c:262: error: implicit declaration of function 'uprobe_register'


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.


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