I ran into a problem building kdelibs tonight and I'm not sure how to address 
the problem.  I got:

/bin/sh ../../libtool --silent --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H 
-I. -I../.. -I../../dcop -I../../kdecore -I../../kio/kssl -I../../kjs -I../.. 
-I./.. -I../../kdecore/network -I./../kssl -I../kssl -I./../../interfaces 
-I../../dcop -I../../libltdl -I../../kdefx -I../../kdecore -I../../kdecore 
-I../../kdecore/network -I../../kdeui -I../../kio -I../../kio/kio 
-I../../kio/kfile -I../.. -I/opt/qt/include -I. -I/opt/kde-3.5.10/include 
-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W 
-Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -Wformat-security 
-Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new 
-DQT_NO_TRANSLATION  -c -o libksycoca_la.all_cpp.lo libksycoca_la.all_cpp.cpp
In file included from /usr/include/asm/fcntl.h:1,
                  from /usr/include/linux/fcntl.h:4,
                  from /usr/include/linux/inotify.h:11,
                  from kdirwatch.cpp:74,
                  from libksycoca_la.all_cpp.cpp:2:
/usr/include/asm-generic/fcntl.h:117: error: redefinition of 'struct flock'
/usr/include/bits/fcntl.h:145: error: previous definition of 'struct flock'
/usr/include/asm-generic/fcntl.h:140: error: redefinition of 'struct flock64'
/usr/include/bits/fcntl.h:160: error: previous definition of 'struct flock64'

There was an earlier report of the same thing (Oct 30) by Petr Ovtchenkov:

and a discussion on the kernel list (Sep 16/17):

I'm not sure the fix by Petr Ovtchenkov is the right thing to do, but I can't 
find anywhere where the kernel headers were changed after  I also 
can't find any KDE bug filed that addresses the problem.

Basically Petr's approach is to remove the following lines:

static inline int inotify_init (void)
   return syscall (__NR_inotify_init);

static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
   return syscall (__NR_inotify_add_watch, fd, name, mask);

static inline int inotify_rm_watch (int fd, __u32 wd)
   return syscall (__NR_inotify_rm_watch, fd, wd);

and replace #include <linux/inotify.h> with #include <sys/inotify.h>
where the above calls are defined. The functions are found in /lib/libc-2.8.so.

Does anyone have any thoughts on this?

   -- Bruce
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to