kdelibs 3.5.10 in einem LFS kompilieren
Ich baue derzeit in einer VirtualBox-VM ein Linux From Scratch auf. Zum Einen zum Lernen, zum andern möchte ich dort ein KDE 3.5.10 bauen. Solch eine VM ist leicht zu sichern. KDE 3.5 war toll, hat also irgendwo auch nostalgische Gründe. 
Jedenfalls kommt es beim Bau der kdelibs zu einem Error während
Erstmal der Fehler:
Die Lösung ist folgende: Nach dem
Danach gehts wie gewohnt mit
Beim Paket
Danach sollte das Kompilieren funktionieren.
Jedenfalls kommt es beim Bau der kdelibs zu einem Error während
make. Es hat mich einige Zeit gekostet, einen Fix in der Mailing Liste für das Problem zu finden, daher möchte ich das hier mal dokumentieren. Diese Lösung stammt von Petr Ovtchenkov.Erstmal der Fehler:
/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 -D_LARGEFILE64_SOURCE -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long -Wundef -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 -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -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'
Die Lösung ist folgende: Nach dem
configure führt man folgendes sed-Kommando aus: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
Danach gehts wie gewohnt mit
make weiter.Beim Paket
kdepim siehts genauso aus. Auch hier wird nach dem configure folgendes ausgeführt: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
Danach sollte das Kompilieren funktionieren.