Bug 133162 - FAMSuspendMonitor and FAMResumeMonitor are not provided (?)
FAMSuspendMonitor and FAMResumeMonitor are not provided (?)
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gamin (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Veillard
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-21 19:55 EDT by Aleksey Nogin
Modified: 2007-11-30 17:10 EST (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Aleksey Nogin 2004-09-21 19:55:01 EDT
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
http://www.gnome.org/~veillard/gamin/SRPMS/gamin-0.0.10-1.src.rpm

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 05:28:20 EDT
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):

--------------------------------------
/*****************************************************************************
*  ERROR HANDLING
*
*  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.

  Accepted,

Daniel
  
Comment 2 Jason Hickey 2004-09-26 13:41:01 EDT
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:/

Jason
Comment 3 Daniel Veillard 2004-10-05 02:57:43 EDT
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.

Daniel

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