LFS, pre-KDE: kdebindings and kdebase-runtime

kdebindings

Are you running into the following problem when compiling kdebindings? Well, you’re probably not, because you picked a saner distribution than LFS, but here goes anyway!

ASSERT failure in QList::at: “index out of range”, file /qt/trunk/include/QtCore/qlist.h, line 456
/bin/sh: line 1: 7841 Aborted (core dumped)

From http://old.nabble.com/Smokegen-core-dump-td30797484.html, you can fix this with a patch to indexedstring.cpp:

--- generator/parser/indexedstring.cpp.orig 2011-02-23 22:12:38.695255708 +0100
+++ generator/parser/indexedstring.cpp 2011-02-24 02:36:09.035361151 +0100
@@ -195,12 +195,15 @@
}

QByteArray IndexedString::byteArray() const {
+  qDebug() << "strings()->size():" << strings()->size() << ", m_index:" << m_index;
if(!m_index)
return QByteArray();
else if((m_index & 0xffff0000) == 0xffff0000)
return QString(QChar((char)m_index & 0xff)).toUtf8();
-  else
+  else if (m_index < strings()->size())
return strings()->at(m_index).toUtf8(); /*arrayFromItem(globalIndexedStringRepository->itemFromIndex(m_index));*/
+  else
+    return QByteArray();
}

unsigned int IndexedString::hashString(const char* str, unsigned short length) {

I ended up removing the first qDebug() line before the if statement as I don’t need my compiler to be that chatty – I just need this package to compile properly. Reconfigure and attempt to make with:

cmake -DCMAKE_INSTALL_PREFIX=$KDE4_PREFIX \
    -DKDE_DEFAULT_HOME=.kde4 \
    -DSYSCONF_INSTALL_DIR=/etc/kde4 \
    .. &&
make

kdebase-runtime

You can patch away your problems if you run into the following message:

[ 39%] Building CXX object kioslave/nfs/CMakeFiles/kio_nfs.dir/kio_nfs.o
In file included from /sources/kdebase-runtime-4.6.0/kioslave/nfs/kio_nfs.cpp:21:0:
/sources/kdebase-runtime-4.6.0/kioslave/nfs/kio_nfs.h:33:21: fatal error: rpc/rpc.h: No such file or directory
compilation terminated.

First, get libtirpc installed to make this work, but then again, you could have just guessed that you needed it, right? 😉

Used under Creative Commons NC license from zhenech

There are some LFS-specific instructions to follow before libtirpc will compile:

  • Unpack glibc-2.14.1
  • In its directory, execute:
    mkdir -p /usr/include/rpc{,svc}
    cp sunrpc/rpc/*.h /usr/include/rpc
    cp nis/rpcsvc/*.h /usr/include/rpcsvc
  • Compile libtirpc with ./configure --prefix=/usr && make && make install

Then from Sourcemage, linking to an old Bugzilla installation:

diff --git a/kioslave/nfs/CMakeLists.txt b/kioslave/nfs/CMakeLists.txt
index b973a73..6556769 100644
--- a/kioslave/nfs/CMakeLists.txt
+++ b/kioslave/nfs/CMakeLists.txt
@@ -3,8 +3,8 @@ set(kio_nfs_PART_SRCS kio_nfs.cpp mount_xdr.c nfs_prot_xdr.c )

 kde4_add_plugin(kio_nfs ${kio_nfs_PART_SRCS})

-
-target_link_libraries(kio_nfs   ${KDE4_KIO_LIBS})
+include_directories(/usr/include/tirpc)
+target_link_libraries(kio_nfs   ${KDE4_KIO_LIBS} tirpc)

 install(TARGETS kio_nfs  DESTINATION ${PLUGIN_INSTALL_DIR} )

Once this is complete you should be able to get kdebase-runtime compiled.



Be the first to comment

Leave a Reply

Your email address will not be published.


*