[Kde-imaging] problems with finding correct exiv2

Fabien fabien.ubuntu at gmail.com
Wed May 16 10:28:57 CEST 2007


Hi Arnd,

I perfectly remember this problem. There were already a thread about 
this in digikam-users.

Check here :

<http://mail.kde.org/pipermail/digikam-users/2006-December/002619.html>
<http://mail.kde.org/pipermail/digikam-users/2006-December/002633.html>

The code for the PKG_CONFIG_PATH test is part of kde-common :
<http://websvn.kde.org/branches/KDE/3.5/kde-common/admin/acinclude.m4.in?view=markup>
(at the end of the file)


dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
dnl which allows to search for libs that get installed into the KDE prefix.
dnl
dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, 
action-if, action-not)
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
dnl also defines KSTUFF_PKG_ERRORS on error
AC_DEFUN([KDE_PKG_CHECK_MODULES], [

    PKG_CONFIG_PATH="$prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
    if test "$prefix" != "$kde_libs_prefix"; then
 
PKG_CONFIG_PATH="$kde_libs_prefix/lib${kdelibsuff}/pkgconfig:$PKG_CONFIG_PATH"
    fi
    export PKG_CONFIG_PATH
    PKG_CHECK_MODULES([$1],[$2],[$3],[$4])
])


I also think it would be better to reverse the order, but I remember 
that could lead to some side effects : test was ok with pkg-config, but 
the Makefile didn't use the defined path first when linking.
So, sometime you can have a case where everything looks good, but 
linking is done using the old version. I let you imagine how bad it 
could be :)
More tests must be done before doing that...

Arnd Baecker wrote:
 > [...]
>>When trying to compile kipiplugins, obtained via
>>  svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/libs
>>configured via
>>  make -f Makefile.cvs
>>  ./configure --prefix=$DIGIKAMDEST \
>>    --with-extra-includes=$DIGIKAMDEST/include \
>>    --with-extra-libs=$DIGIKAMDEST/lib
>>the wrong exiv2 is found:
>>I have a 0.10 in /usr/
>>and a self-compiled (0.14) in $DIGIKAMDEST, but
>>only the first is found.
>>
>>As paths
>>export DIGIKAMDEST=/home/NBB/digikam
>>export KDEDIRS=$DIGIKAMDEST:/usr
>>export LD_LIBRARY_PATH=$DIGIKAMDEST/lib:$LD_LIBRARY_PATH
>>export LDPATH=$DIGIKAMDEST/lib:$LDPATH
>>export PATH=$DIGIKAMDEST/bin:$PATH
>>export PKG_CONFIG_PATH=$DIGIKAMDEST/lib/pkgconfig
>>are set.
>>
>>Fiddling around with the configure script, it
>>turned out that changing the order of
>>the definitions of PKG_CONFIG_PATH inside the script to
>>PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib${kdelibsuff}/pkgconfig"
>>did solve the problem for me.
>>
>>Is there a better solution?
>>(and, if not, maybe the above ordering should be the default
>>so that alternative configurations are used instead
>>of the usual ones?)

--
Fabien



More information about the Kde-imaging mailing list