# sysutils/policykit with kqueue inotify conflict



## pranayama (Feb 21, 2012)

Yesterday I do `pkg_delete -a` and now generally rebuilding the whole /usr/local system. Installation of portmaster and bash gone well, but when trying to install xorg-server the policykit port fails to build. At the end I ended to manually edit the config.h file and disable inotify. Naturally I suspect on some update that will be overwritten.

Does somebody have an idea what causes this problem and how to avoid it? The port does not offer me the usual config menu for ports requiring user configuration.


----------



## SirDice (Feb 22, 2012)

Post the full error message.


----------



## pranayama (Feb 22, 2012)

The error was in polkit-context.c

```
polkit-context.c: In function 'polkit_context_init':
polkit-context.c:167: error: storage size of 'ev' isn't known
polkit-context.c:232: error: 'PolKitContext' has no member named 'kqueue_fd'
```
And some more of that kind.

The problem is that this file has

```
#ifdef HAVE_INOTIFY
#include <some_inotify_header>
#elif HAVE_KQUEUE
#include <sys/event.h>
#include <sys/time.h>
#endif
```
and later on (still in polkit-context.c)

```
#ifdef HAVE_KQUEUE
struct kevent ev;
#endif
```
It's pretty much configure error.
From config.h

```
/* Enable Linux inotify() usage */
#define HAVE_INOTIFY 1
/* Enable BSD kqueue() usage */
#define HAVE_KQUEUE 1
```


----------



## SirDice (Feb 23, 2012)

I just did a fresh update of my ports tree. x11/xorg-minimal, which includes sysutils/policykit, builds just fine.

Are you sure it's not some option you turned on or off?


----------



## pranayama (Feb 23, 2012)

The policykit port itself does not have options, and does not complain at all until the compiler error occur. Not 100% sure, think that bash has inotify option, but that will mean just having inotify headers/libs is incompatible with minimal X installation.


----------



## SirDice (Feb 24, 2012)

What options did you enable for devel/gamin?


----------



## pranayama (Feb 25, 2012)

Options for devel/gamin are unmodified. But I reinstalled it at some point. I just tried
[CMD=""]cd /usr/local/include/sys && mv inotify.h inotify.h.back[/CMD]
and sysutils/policykit builds just fine. Will try to get rid of libinotify at some point.


----------

