Saturday, July 25, 2009

» Packman: gamin: fix ABI compatibility with fam

There seems to be a very annoying ABI incompatibility between gamin and fam, which are packages that both implement the same API (gamin uses inotify and has per-user daemons, while fam has better NFS support). That incompatibility is in the externalized FamErrlist char* array, where fam exports an useless char*[1] and gamin has more than one array element in it, as well as having typed as const char*[]. While the latter isn't causing any problems, the former does, which manifests itself through the following warning message at runtime:
Symbol `FamErrlist' has different size in shared object, consider re-linking
Apparently, it's not just a warning, but it also causes failures and crashes. In the Packman repository, we ship the gamin package, while the openSUSE distribution only includes (and prefers) fam, precisely because of its better NFS support. All openSUSE packages and all packages that are built in the openSUSE Build Service are compiled and linked against fam. But if you have the Packman repository in your preferred package manager (e.g. zypper, smart or yum), you might end up with installing gamin and removing fam (because the gamin package in the Packman repository obsoletes and provides fam). I have just committed a patch against the Packman gamin packages that changes the size of that FamErrlist array to have the same size as in fam, which effectively solves the warning messages, and should also fix the crashes. The fix is included in gamin-0.1.10-0.pm.3 and above. As an alternative, if you can't or don't want to upgrade the gamin package, do as follows to remove gamin and re-install fam instead:
rpm -e --nodeps gamin rpm -q gamin-devel && rpm -e --nodeps gamin-devel zypper install fam zypper addlock gamin zypper addlock gamin-devel
Note that all of those commands must be executed as root, and the last two commands prevent from ever installing the packages gamin and gamin-devel again (at least with zypper). UPDATE: removed the Obsoletes:fam directive in gamin-0.1.10-0.pm.4

Labels: ,

0 Comments:

Post a Comment

<< Home