Re: Trying to build incron on Debian

From: <lukas_at_aiken.cz>
Date: Mon, 25 Aug 2008 23:32:16 +0200

Hmmm, this seems to be a compiler bug. I made a test now (on Debian with
GCC 4.1.2) and can confirm this error. Additionaly, it is probably the
same as reported as the issue #0000114 which is still open. It occurs
because "#ifdef __NR_inotify_init" is evaluated as "TRUE" but
__NR_inotify_init (which defined the syscall number for inotify_init())
is really not defined at this point. As a work-around, you can remove or
"comment" these conditional preprocessor directives and use only the
line inside (#include <sys/inotify-syscalls.h>). This is the only way
which can be done with this problem now.

Lukas

>
> I am writing an article on inotify and tools based on its kernel
> functions (inotify-tools, incron).
>
> I am trying to build incron on Debian 4.0, but get these errors after
> installing inotify.h and inotify-syscalls.h in /usr/include/sys.
>
> server1% make
> g++ -c -O2 -g0 -Wall -pipe -o icd-main.o icd-main.cpp
> g++ -c -O2 -g0 -Wall -pipe -o incrontab.o incrontab.cpp
> g++ -c -O2 -g0 -Wall -pipe -o inotify-cxx.o inotify-cxx.cpp
> inotify-cxx.cpp: In member function ‘void
> InotifyWatch::SetMask(uint32_t)’:
> inotify-cxx.cpp:228: error: ‘inotify_add_watch’ was not declared in
> this scope
> inotify-cxx.cpp: In member function ‘void
> InotifyWatch::SetEnabled(bool)’:
> inotify-cxx.cpp:251: error: ‘inotify_add_watch’ was not declared in
> this scope
> inotify-cxx.cpp:259: error: ‘inotify_rm_watch’ was not declared in
> this scope
> inotify-cxx.cpp: In constructor ‘Inotify::Inotify()’:
> inotify-cxx.cpp:297: error: ‘inotify_init’ was not declared in this scope
> inotify-cxx.cpp: In member function ‘void Inotify::Add(InotifyWatch*)’:
> inotify-cxx.cpp:344: error: ‘inotify_add_watch’ was not declared in
> this scope
> inotify-cxx.cpp: In member function ‘void
> Inotify::Remove(InotifyWatch*)’:
> inotify-cxx.cpp:392: error: ‘inotify_rm_watch’ was not declared in
> this scope
> inotify-cxx.cpp: In member function ‘void Inotify::RemoveAll()’:
> inotify-cxx.cpp:414: error: ‘inotify_rm_watch’ was not declared in
> this scope
>
> Any ideas?
>
> Martin
>
Received on Mon Aug 25 2008 - 23:32:32 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST