Bug 16099 - Problem compiling PolicyKit 0.9
Summary: Problem compiling PolicyKit 0.9
Status: RESOLVED FIXED
Alias: None
Product: PolicyKit
Classification: Unclassified
Component: libpolkit (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact: David Zeuthen (not reading bugmail)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-25 22:59 UTC by Pierre
Modified: 2011-02-23 06:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Pierre 2008-05-25 22:59:06 UTC
# make
make  all-recursive
make[1]: Entering directory `/tmp/PolicyKit-0.8'
Making all in data
make[2]: Entering directory `/tmp/PolicyKit-0.8/data'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/tmp/PolicyKit-0.8/data'
Making all in src
make[2]: Entering directory `/tmp/PolicyKit-0.8/src'
Making all in kit
make[3]: Entering directory `/tmp/PolicyKit-0.8/src/kit'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/tmp/PolicyKit-0.8/src/kit'
Making all in polkit
make[3]: Entering directory `/tmp/PolicyKit-0.8/src/polkit'
/bin/sh ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src -I../../src -DPACKAGE_LIBEXEC_DIR=\""/usr/local/libexec"\" -DPACKAGE_SYSCONF_DIR=\""/usr/local/etc"\" -DPACKAGE_DATA_DIR=\""/usr/local/share"\" -DPACKAGE_BIN_DIR=\""/usr/local/bin"\" -DPACKAGE_LOCALSTATE_DIR=\""/usr/local/var"\" -DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\" -DPACKAGE_LIB_DIR=\""/usr/local/lib"\" -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DPOLKIT_COMPILATION -DTEST_DATA_DIR=\"../../test/\" -DTEST_BUILD_DIR=\"../..\"  -Iyes/include  -s -O3 -march=i686 -Wall -Wchar-subscripts -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wformat -Wformat-security -MT polkit-sysdeps.lo -MD -MP -MF .deps/polkit-sysdeps.Tpo -c -o polkit-sysdeps.lo polkit-sysdeps.c
 gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src -I../../src -DPACKAGE_LIBEXEC_DIR=\"/usr/local/libexec\" -DPACKAGE_SYSCONF_DIR=\"/usr/local/etc\" -DPACKAGE_DATA_DIR=\"/usr/local/share\" -DPACKAGE_BIN_DIR=\"/usr/local/bin\" -DPACKAGE_LOCALSTATE_DIR=\"/usr/local/var\" -DPACKAGE_LOCALE_DIR=\"/usr/local/share/locale\" -DPACKAGE_LIB_DIR=\"/usr/local/lib\" -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DPOLKIT_COMPILATION -DTEST_DATA_DIR=\"../../test/\" -DTEST_BUILD_DIR=\"../..\" -Iyes/include -s -O3 -march=i686 -Wall -Wchar-subscripts -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wformat -Wformat-security -MT polkit-sysdeps.lo -MD -MP -MF .deps/polkit-sysdeps.Tpo -c polkit-sysdeps.c  -fPIC -DPIC -o .libs/polkit-sysdeps.o
polkit-sysdeps.c:55:25: sys/inotify.h: No such file or directory
make[3]: *** [polkit-sysdeps.lo] Error 1
make[3]: Leaving directory `/tmp/PolicyKit-0.8/src/polkit'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/PolicyKit-0.8/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/PolicyKit-0.8'
make: *** [all] Error 2
Comment 1 David Sainty 2008-12-08 02:00:54 UTC
This problem is still present in PolicyKit 0.9.  The problem exhibits on Linux installations that have a /usr/include/linux/inotify.h, but not a /usr/include/sys/inotify.h.  In my case, a standard EeePC 701 installation.

Unfortunately just disabling inotify support is not enough, polkit-context.c needs some love to compile without HAVE_INOTIFY.

The pain this causes people with this class of installation is probably easily reproducible on any Linux system by temporarily doing:

  mv /usr/include/sys/inotify.h /usr/include/linux/inotify.h

... and trying to build PolicyKit.  But note that /usr/include/linux/inotify.h doesn't appear to be sufficient to build with.  Symlinking the other way gets you a build failure with:

../src/polkit/.libs/libpolkit.so: undefined reference to 'inotify_init'
../src/polkit/.libs/libpolkit.so: undefined reference to 'inotify_add_watch'

... building in polkit-config-file-validate.
Comment 2 David Zeuthen (not reading bugmail) 2009-10-21 10:35:33 UTC
This bug report is for the old version of PolicyKit. Closing as all of the code has been rewritten. Please reopen if the bug report applies to the latest version of PolicyKit. Thanks.
Comment 3 David Sainty 2009-10-21 12:30:09 UTC
Still present in 0.9.  Not sure about 0.9.2.  I'll try and arrange some testing.

This is the solution in Pkgsrc: http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/security/policykit/patches/patch-am?rev=1.2&content-type=text/x-cvsweb-markup
Comment 4 David Sainty 2009-10-21 12:32:27 UTC
Oh, whoops, 0.9 IS the latest :)  I was looking at the policykit-gnome version.
Comment 5 David Sainty 2009-10-21 12:41:37 UTC
Actually, there's more to the Pkgsrc fix than that one patch.  It also needs:

http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/security/policykit/patches/patch-an?rev=1.1&content-type=text/x-cvsweb-markup


Here's the original problem report with a patch against (patches against) 0.9:

http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=40146
Comment 6 David Zeuthen (not reading bugmail) 2011-02-23 06:00:04 UTC
PolicyKit 0.9 is long obsolete. Please use a newer version.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.