Bug 133162 - FAMSuspendMonitor and FAMResumeMonitor are not provided (?)
Summary: FAMSuspendMonitor and FAMResumeMonitor are not provided (?)
Alias: None
Product: Fedora
Classification: Fedora
Component: gamin (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-09-21 23:55 UTC by Aleksey Nogin
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 0.0.12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-05 06:57:43 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Aleksey Nogin 2004-09-21 23:55:01 UTC
I am trying to use gamin instead of FAM on FC2 (I have SELinux
enabled) and a FAM application (OMake - http://omake.metaprl.org/)
that I need to run does not work.  I am using a result of "rpmbuild
--rebuild" on

When I build omake, I get:

omake.a(omake_cnotify.o)(.text+0x11e): In function `om_notify_suspend':
/home/aleksey/metaprl/omake/omake_cnotify.c:180: undefined reference
to `FAMSuspendMonitor'
omake.a(omake_cnotify.o)(.text+0x15a): In function `om_notify_resume':
/home/aleksey/metaprl/omake/omake_cnotify.c:197: undefined reference
to `FAMResumeMonitor'
collect2: ld returned 1 exit status
Error during linking

If I try to use a binary that is compiled against the "real" FAM, I get

omake: Symbol `FamErrlist' has different size in shared object,
consider re-linking

and then it runs fine (which I do not understand - nm on the binary
does show these symbols with a "U").

Comment 1 Daniel Veillard 2004-09-22 09:28:20 UTC
Okay to get an idea of the FAM crappyness, see from the fam-2.6.10
sources include/fam.h (it's the latest version we ever shipped):

*  If an error occurs inside of libfam, a global named FAMErrno is set
*  to a non-zero value and the routine that the error occurred in will
*  return an error value (usually NULL).  FAMErrlist is a global
*  string array (indexed by FAMErrno) that describes the last error
*  that happened;
*  NOTE: currently FAMErrno and FamErrList are unused
extern int FAMErrno;
extern char *FamErrlist[];

*[NOTE: Eventually, there will be a bunch of defines right here
defining what
* errors can happen in using libfam ]

  I.e. basically thy put unimplemented work in progress API 
definitions in the public headers, with an object which size 
could not be defined clearly. I doubt there is any way to avoid the
size message. The good point is that nobody (except your program
apparently uses those).

  For FAMSuspendMonitor() and FAMResumeMonitor() they look very
dubious to me from a semantic perspective, only an event lossy
implementation makes any sense to me, that's why I didn't put an
implementation yet. I could at least put an entry point returning
-1 and signalling it's not implemented.



Comment 2 Jason Hickey 2004-09-26 17:41:01 UTC
Actually, in omake, the calls to FAM{Suspend,Resume} are there so that
the FAM API in OCaml is complete.  However, we never call the
functions.  I agree, they are dubious, and the better plan is probably
just to delete them from omake.

We use FamErrlist[] in the hope that someday we will get sensible
error messages.  I'm not sure of the corresponding error mechanism in
gamin, but it sure would be nice to get proper error reporting.  For
our Win32 FAM-like implementation, the FAMErrno is set properly, so we
actually get better error reporting on Win32 than Linux:/


Comment 3 Daniel Veillard 2004-10-05 06:57:43 UTC
The current versions in rawhide should fix that bug (0.0.14).
I made sure FAMErrno is set on errors, provided strings (not localized
though) and provided entry points for FAM{Suspend,Resume} returning
a non-implemented status.


Note You need to log in before you can comment on or make changes to this bug.