You are not logged in.

#1 2012-02-15 18:12:23

zuargo
Member
From: Concepción, Chile
Registered: 2009-08-20
Posts: 116

Missing libraries by compiling KDElibs using the official PKGBUILD

Hello all.

I build KDElibs for getting the debugging symbols of the libraries. So I can get a better backtrace when some application crashes. For this, I use the official PKGBUILD for KDElibs which I get through ABS. Just I make a little changes in the PKGBUILD, I add the option field with the flag !strip and I switch the build type (DCMAKE_BUILD_TYPE) from Release to debugfull. Hence the modified PKGBUILD by myself looks like:

# $Id: PKGBUILD 149949 2012-02-11 23:30:44Z allan $
# Maintainer: Andrea Scarpino <andrea@archlinux.org
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgname=kdelibs
pkgver=4.8.0
pkgrel=3
pkgdesc="KDE Core Libraries"
arch=('i686' 'x86_64')
url='http://www.kde.org'
license=('GPL' 'LGPL' 'FDL')
depends=('strigi' 'attica' 'libxss' 'xz' 'soprano' 'krb5' 'grantlee'
        'shared-desktop-ontologies' 'qca' 'libdbusmenu-qt' 'polkit-qt'
        'shared-mime-info' 'enchant' 'giflib' 'jasper' 'openexr' 'docbook-xsl'
        'upower' 'udisks' 'libxcursor' 'phonon' 'qtwebkit')
makedepends=('cmake' 'automoc4' 'avahi' 'libgl' 'hspell')
replaces=('kdelibs-experimental')
options=('!strip')
install=${pkgname}.install
source=("http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2"
        'kde-applications-menu.patch' 'archlinux-menu.patch'
        'fix-knotify-filepath.patch')
sha1sums=('5e4744405734e6c3ce572ef7d16054390692b38a'
          '86ee8c8660f19de8141ac99cd6943964d97a1ed7'
          '63a850ab4196b9d06934f2b4a13acd9f7739bc67'
          '3312f6005aa56a9b992c74008fe5b314f1c8ffba')

build() {
       cd "${srcdir}"/${pkgname}-${pkgver}

       # avoid file conflict with gnome-menus
       patch -p1 -i "${srcdir}"/kde-applications-menu.patch
       # add Archlinux menu entry
       patch -p1 -i "${srcdir}"/archlinux-menu.patch

       # https://bugs.kde.org/show_bug.cgi?id=285028
       patch -p1 -i "${srcdir}"/fix-knotify-filepath.patch

       cd "${srcdir}"
       mkdir build
       cd build
       cmake ../${pkgname}-${pkgver} \
               -DCMAKE_BUILD_TYPE=debugfull \
               -DCMAKE_SKIP_RPATH=ON \
               -DKDE_DISTRIBUTION_TEXT='Arch Linux' \
               -DCMAKE_INSTALL_PREFIX=/usr \
               -DSYSCONF_INSTALL_DIR=/etc \
               -DHTML_INSTALL_DIR=/usr/share/doc/kde/html \
               -DKDE_DEFAULT_HOME='.kde4' \
               -DWITH_FAM=OFF
       make
}

package() {
       cd "${srcdir}"/build
       make DESTDIR="${pkgdir}" install

       # cert bundle seems to be hardcoded
       # link it to the one from ca-certificates
       rm -f "${pkgdir}"/usr/share/apps/kssl/ca-bundle.crt
       ln -sf /etc/ssl/certs/ca-certificates.crt "${pkgdir}"/usr/share/apps/kssl/ca-bundle.crt
}

When the packager released the first version of this PKGBUILD (kdelibs-4.8.0-1) I compiled and installed it, then I got a crash every time I launched Konqueror using any KDE instance (desktop launcher, KRunner, etc.). I reported this trouble here. Did not matter if the compiling proccesses was done in a clean chroot environment or not, always Konqueror crashed at the start up. After a while I noticed that if I installed kdelibs from the Archlinux's repositories (extra) I didn't get the crashes.

By compiling kdelibs with the second release of the PKGBUILD and installing it I did not get the crash at the start up of Konqueror, but I got an error related to libpng14.so.14 by launching it, this one:

There was an error loading the module KHTML.
The diagnostics is:
Cannot load library /usr/lib/kde4/libkhtmlpart.so: (libpng14.so.14: no se puede abrir el fichero del objeto compartido: No existe el fichero o el directorio)

In fact, by running ldd command on /usr/lib/kde4/libkhtmlpart.so library, libpng14.so.14 was missing:

$ ldd /usr/lib/kde4/libkhtmlpart.so
        libpng14.so.14 => not found

Such as the previous problem (the crashes) if I installed kdelibs from the Archlinux's repository the trouble dissapeared.

Now I have builded kdelibs with the newest released of the PKGBUILD for compiling KDE (kdelibs-4.8.0-3) and I get a new missing library error, by launching Konqueror:

There was an error loading the module Página «Acerca de» para Konqueror.
The diagnostics is:
Cannot load library /usr/lib/kde4/konq_aboutpage.so: (libpcre.so.0: no se puede abrir el fichero del objeto compartido: No existe el fichero o el directorio)

By running ldd on /usr/lib/kde4/konq_aboutpage.so I get the message: libpcre.so.0 => not found

So, with all of this, the question is why if I compile kdelibs (making those little changes at the official PKGBUILD) are some libraries missing?

Any idea please.

Excuse my english, it is not my first language.
Thanks in advance.

Offline

#2 2012-02-15 18:34:14

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Missing libraries by compiling KDElibs using the official PKGBUILD

libpng and pcre got recently rebuilt. If your chroot had the old versions and you were trying to use these apps with the new versions of libpng and pcre, you got errors.

Offline

#3 2012-02-15 22:06:16

zuargo
Member
From: Concepción, Chile
Registered: 2009-08-20
Posts: 116

Re: Missing libraries by compiling KDElibs using the official PKGBUILD

I am pretty sure my chroot is up to date

Just to confirm I have compiled again kdelibs 4.8.0-3 and again Konqueror crashes at the start up. I get a very poor backtrace:

Application: Konqueror (kdeinit4 (deleted)), signal: Segmentation fault
[Current thread is 1 (process 10355)]

Thread 1 (process 10355):
#0  0xb7728424 in ?? ()

Anyway, how can I know what libpng and pcre version have I installed in chroot?

Offline

#4 2012-02-15 23:13:26

mcmillan
Member
Registered: 2006-04-06
Posts: 737

Re: Missing libraries by compiling KDElibs using the official PKGBUILD

zuargo wrote:

Anyway, how can I know what libpng and pcre version have I installed in chroot?

Depends on how you setup the chroot, but if things were installed with pacman you can check the output of pacman -Q libpng pcre (I currently have 1.5.8-1 and 8.30-1 respectively).  If that's not the same you can do a pacman -Syu from within the chroot.

Offline

Board footer

Powered by FluxBB