Re: [gamin] Re: Building gamin 0.1.6
- From: Mark Carey <mark carey gmail com>
- To: John McCutchan <ttb tentacle dhs org>
- Cc: gamin-list gnome org
- Subject: Re: [gamin] Re: Building gamin 0.1.6
- Date: Sat, 22 Oct 2005 17:19:38 +1300
John,
So a possible solution is,
1. upgrade the inotify.h on my system (use the one that comes with 2.6.13.4)
2. recompile linux kernel 2.6.13.4 against the new header
3. rebuild gamin with the new header
4. rebuild gnome-vfs nautilus
In principal will this work?
Regards,
Mark Carey
On 10/22/05, John McCutchan <ttb tentacle dhs org> wrote:
> Gamin is detecting that you have system inotify header installed and is
> trying to use them. Your system inotify header is obsolete, so gamin
> can't compile against it. Replacing the header file just lets gamin
> compile, but when it runs it is going to try and use the new inotify
> interface.
>
>
> Long story short: You need to be running the version of inotify that
> matches the header file you compiled gamin with.
>
>
> On Sat, 2005-22-10 at 16:41 +1300, Mark Carey wrote:
> > <ignore previous>
> >
> > Hi,
> >
> > Trying to build gamin 0.1.6 as part of Gnome 2.12.1 using GARNOME.
> >
> > Gamin configures just fine, but fails during build with;
> >
> > if cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../libgamin -I../protocol
> > -I../lib -I../libgamin -I/opt/gnome2.12.1/include/glib-2.0
> > -I/opt/gnome2.12.1/lib/glib-2.0/include
> > -DBINDIR=\""/opt/gnome2.12.1/libexec"\" -DG_DISABLE_DEPRECATED
> > -I/opt/gnome2.12.1/include -Wall -Wchar-subscripts
> > -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
> > -Wsign-compare -Wno-sign-compare -O2 -MT gam_inotify.o -MD -MP -MF
> > ".deps/gam_inotify.Tpo" -c -o gam_inotify.o gam_inotify.c; \
> > then mv -f ".deps/gam_inotify.Tpo" ".deps/gam_inotify.Po"; else rm -f
> > ".deps/gam_inotify.Tpo"; exit 1; fi
> > gam_inotify.c: In function `mask_to_string':
> > gam_inotify.c:198: error: `IN_ISDIR' undeclared (first use in this function)
> > gam_inotify.c:198: error: (Each undeclared identifier is reported only once
> > gam_inotify.c:198: error: for each function it appears in.)
> > gam_inotify.c:225: error: `IN_DELETE' undeclared (first use in this function)
> > gam_inotify.c:228: error: `IN_CREATE' undeclared (first use in this function)
> > gam_inotify.c: In function `mask_to_gam_event':
> > gam_inotify.c:252: error: `IN_ISDIR' undeclared (first use in this function)
> > gam_inotify.c:259: error: `IN_MOVE_SELF' undeclared (first use in this function)
> > gam_inotify.c:261: error: `IN_DELETE' undeclared (first use in this function)
> > gam_inotify.c:265: error: `IN_CREATE' undeclared (first use in this function)
> > gam_inotify.c: In function `gam_inotify_mask_to_gam_file_event':
> > gam_inotify.c:286: error: `IN_ISDIR' undeclared (first use in this function)
> > gam_inotify.c:290: error: `IN_DELETE' undeclared (first use in this function)
> > gam_inotify.c:291: error: `IN_CREATE' undeclared (first use in this function)
> > gam_inotify.c:295: error: `IN_MOVE_SELF' undeclared (first use in this function)
> > gam_inotify.c: In function `gam_inotify_mask_to_gam_dir_event':
> > gam_inotify.c:318: error: `IN_ISDIR' undeclared (first use in this function)
> > gam_inotify.c:322: error: `IN_DELETE' undeclared (first use in this function)
> > gam_inotify.c:323: error: `IN_CREATE' undeclared (first use in this function)
> > gam_inotify.c:325: error: `IN_MOVE_SELF' undeclared (first use in this function)
> > gam_inotify.c: In function `gam_inotify_emit_one_event':
> > gam_inotify.c:474: error: `IN_ISDIR' undeclared (first use in this function)
> > gam_inotify.c: In function `gam_inotify_process_event':
> > gam_inotify.c:551: error: `IN_MOVE_SELF' undeclared (first use in this function)
> > gam_inotify.c:572: error: `IN_DELETE' undeclared (first use in this function)
> > gam_inotify.c:572: error: `IN_CREATE' undeclared (first use in this function)
> > gam_inotify.c: In function `gam_inotify_add_subscription':
> > gam_inotify.c:824: error: `IN_DELETE' undeclared (first use in this function)
> > gam_inotify.c:824: error: `IN_CREATE' undeclared (first use in this function)
> > gam_inotify.c:824: error: `IN_MOVE_SELF' undeclared (first use in this function)
> > gam_inotify.c: In function `gam_inotify_rm_watch':
> > gam_inotify.c:1025: warning: unused variable `e'
> > gam_inotify.c: In function `gam_inotify_nolonger_missing':
> > gam_inotify.c:1192: error: `IN_DELETE' undeclared (first use in this function)
> > gam_inotify.c:1192: error: `IN_CREATE' undeclared (first use in this function)
> > gam_inotify.c:1192: error: `IN_MOVE_SELF' undeclared (first use in
> > this function)
> > gam_inotify.c: In function `gam_inotify_nolonger_link':
> > gam_inotify.c:1298: error: `IN_DELETE' undeclared (first use in this function)
> > gam_inotify.c:1298: error: `IN_CREATE' undeclared (first use in this function)
> > gam_inotify.c:1298: error: `IN_MOVE_SELF' undeclared (first use in
> > this function)
> > gam_inotify.c: At top level:
> > gam_inotify.c:197: warning: 'mask_to_string' defined but not used
> > make[4]: *** [gam_inotify.o] Error 1
> > make[4]: Leaving directory `/tmp/garnome-work/gamin/main.d/gamin-0.1.6/server'
> > make[3]: *** [all] Error 2
> > make[3]: Leaving directory `/tmp/garnome-work/gamin/main.d/gamin-0.1.6/server'
> > make[2]: *** [all-recursive] Error 1
> > make[2]: Leaving directory `/tmp/garnome-work/gamin/main.d/gamin-0.1.6'
> > make[1]: *** [all] Error 2
> > make[1]: Leaving directory `/tmp/garnome-work/gamin/main.d/gamin-0.1.6'
> > make: *** [build-/tmp/garnome-work/gamin/main.d/gamin-0.1.6/Makefile] Error 2
> >
> > To work around this problem I can overwrite the file
> > /usr/include/linux/inotify.h with the file included with the linux
> > kernel 2.6.13.4 (include/linux/inotify.h). This allows building
> > to complete.
> >
> > When I try to use the inotify backend from gamin (via nautils and gnome-vfs)
> > stdout spews lines and lines of;
> >
> > <snip>
> >
> > invalid length 10794
> > invalid length 10794
> > invalid length 10794
> > Failed to process 75 bytes from server
> > invalid length 10794
> > invalid length 10794
> > invalid length 10794
> > invalid length 10794
> > invalid length 10794
> > invalid length 10794
> > invalid length 10794
> > end from FAM server connection
> > invalid length 10794
> > invalid length 10794
> > invalid length 10794
> >
> > </snip>
> >
> > System memory usage climbs and climbs until 3 days later no memory
> > left (I presume something somewhere is leaking).
> >
> > When I first built this system inotify used /dev/inotify I understand
> > that it is now using an ioctl to communicate with the kernel.
> >
> > Is there anything I can do to get gamin to build with my existing
> > header file or is it time for a full system rebuild?
> >
> > Any suggestions greatly appreciated.
> >
> > Regards,
> >
> > Mark Carey
> >
> > P.S. The diff between the two header files is significant.
> >
> > $ diff -Nru /usr/include/linux/inotify.h /usr/include/linux/inotify-new.h
> > --- /usr/include/linux/inotify.h 2005-04-10 18:31:44.000000000 +1200
> > +++ /usr/include/linux/inotify-new.h 2005-10-15 18:50:11.000000000 +1300
> > @@ -23,43 +23,42 @@
> > char name[0]; /* stub for possible name */
> > };
> >
> > -/*
> > - * struct inotify_watch_request - represents a watch request
> > - *
> > - * Pass to the inotify device via the INOTIFY_WATCH ioctl
> > - */
> > -struct inotify_watch_request {
> > - int fd; /* fd of filename to watch */
> > - __u32 mask; /* event mask */
> > -};
> > -
> > -/* the following are legal, implemented events */
> > +/* the following are legal, implemented events that user-space can watch for */
> > #define IN_ACCESS 0x00000001 /* File was accessed */
> > #define IN_MODIFY 0x00000002 /* File was modified */
> > -#define IN_ATTRIB 0x00000004 /* File changed attributes */
> > +#define IN_ATTRIB 0x00000004 /* Metadata changed */
> > #define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed */
> > #define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed */
> > #define IN_OPEN 0x00000020 /* File was opened */
> > #define IN_MOVED_FROM 0x00000040 /* File was moved from X */
> > #define IN_MOVED_TO 0x00000080 /* File was moved to Y */
> > -#define IN_DELETE_SUBDIR 0x00000100 /* Subdir was deleted */
> > -#define IN_DELETE_FILE 0x00000200 /* Subfile was deleted */
> > -#define IN_CREATE_SUBDIR 0x00000400 /* Subdir was created */
> > -#define IN_CREATE_FILE 0x00000800 /* Subfile was created */
> > -#define IN_DELETE_SELF 0x00001000 /* Self was deleted */
> > +#define IN_CREATE 0x00000100 /* Subfile was created */
> > +#define IN_DELETE 0x00000200 /* Subfile was deleted */
> > +#define IN_DELETE_SELF 0x00000400 /* Self was deleted */
> > +#define IN_MOVE_SELF 0x00000800 /* Self was moved */
> > +
> > +/* the following are legal events. they are sent as needed to any watch */
> > #define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted */
> > #define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */
> > #define IN_IGNORED 0x00008000 /* File was ignored */
> >
> > -/* special flags */
> > -#define IN_ALL_EVENTS 0xffffffff /* All the events */
> > -#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE)
> > +/* helper events */
> > +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* close */
> > +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO)
> > /* moves */
> >
> > -#define INOTIFY_IOCTL_MAGIC 'Q'
> > -#define INOTIFY_IOCTL_MAXNR 2
> > +/* special flags */
> > +#define IN_ISDIR 0x40000000 /* event occurred against dir */
> > +#define IN_ONESHOT 0x80000000 /* only send event once */
> >
> > -#define INOTIFY_WATCH _IOR(INOTIFY_IOCTL_MAGIC, 1,
> > struct inotify_watch_request)
> > -#define INOTIFY_IGNORE _IOR(INOTIFY_IOCTL_MAGIC, 2, int)
> > +/*
> > + * All of the events - we build the list by hand so that we can add flags in
> > + * the future and not break backward compatibility. Apps will get only the
> > + * events that they originally wanted. Be sure to add new events here!
> > + */
> > +#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \
> > + IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \
> > + IN_MOVED_TO | IN_DELETE | IN_CREATE |
> > IN_DELETE_SELF | \
> > + IN_MOVE_SELF)
> >
> > #ifdef __KERNEL__
> > _______________________________________________
> > Gamin-list mailing list
> > Gamin-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gamin-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]