May be this is well-known issue, but...

The build of kde 3.5.10 with glibc 2.7 and kernel 2.6.27.4 fail.

The reason is wrong inclusion of inotify interface in KDE: it is
the mix of kernel and glibc headers.

Includes in kdelibs-3.5.10/kio/kio/kdirwatch.cpp and
kdepim-3.5.10/kmail/editorwatcher.cpp use

...
#include <fcntl.h>
#include <linux/inotify.h>
...

This lead to names collision (flock, flock64), due to simultaneous inclusion
of bits/fcntl.h and asm-generic/fcntl.h.

This happens because in kernel 2.6.27.4 in linux/inotify.h was added
line '#include <linux/fcntl.h>' for fcntl flags.

IMO correct access to inotify interface via glibc headers:

...
#include <fcntl.h>
#include <sys/inotify.h>
...

and usage inotify_* functions from glibc instead of inlined proxy
functions. Following sed scripts fix build problem for me:

...
  cd $BLFS_BUILD/kdelibs-3.5.10
  ./configure --prefix=$KDE_PREFIX --sysconfdir=/etc/kde --disable-debug 
--disable-dependency-tracking
  sed -i -e 's|linux/inotify|sys/inotify|' \
         -e '/^static inline int inotify_init/,/^}/d' \
         -e '/^static inline int inotify_add_watch/,/^}/d' \
         -e '/^static inline int inotify_rm_watch/,/^}/d' kio/kio/kdirwatch.cpp
  LD_LIBRARY_PATH="$QTDIR/lib" make
  make install

...

  cd $BLFS_BUILD/kdepim-3.5.10
  LDFLAGS="-L${QTDIR}/lib -L${KDE_PREFIX}/lib" ./configure --prefix=$KDE_PREFIX 
--sysconfdir=/etc/kde --disable-debug --disable-dependency-tracking
  sed -i "s@ \*/@&\n#define HAVE_FOPENCOOKIE@" 
libkdenetwork/libgpgme-copy/{assuan,gpgme}/funopen.c
  sed -i -e 's|linux/inotify|sys/inotify|' \
         -e '/^static inline int inotify_init/,/^}/d' \
         -e '/^static inline int inotify_add_watch/,/^}/d' \
         -e '/^static inline int inotify_rm_watch/,/^}/d' 
kmail/editorwatcher.cpp
  LD_LIBRARY_PATH="$QTDIR/lib" make
  make install
...


--

   - ptr
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to