Problems with openchange libs
Brad Hards
bradh at frogmouth.net
Wed Dec 3 03:46:19 CET 2008
On Wednesday 03 December 2008 01:12:41 am Thiago Macieira wrote:
> On Tuesday 02 December 2008 13:13:55 Brad Hards wrote:
> > Name: MAPI
> > Description: MAPI Protocol Implementation
> > Version: @PACKAGE_VERSION@
> > Libs: @LIBS@ -lmapi
>
> Libs: -lmapi
> Libs.private: @LIBS@
>
> > Cflags: @CFLAGS@
>
> Cflags: -I${includedir}
>
> If there are any -D that change how the package works, then add it.
> (API/ABI change)
OK.
bradh at kubuntu10:~/openchange/trunk$ cat /usr/local/samba/lib/pkgconfig/libmapi.pc
prefix=/usr/local/samba
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
datarootdir=/usr/local/samba/share
datadir=${datarootdir}
Name: MAPI
Description: MAPI Protocol Implementation
Version: 0.8
Libs: -lmapi
Libs.private: -lz
Cflags: -I${includedir}
Requires: talloc dcerpc ndr samba-hostconfig ldb
bradh at kubuntu10:~/openchange/trunk$ pkg-config --cflags libmapi
-DHAVE_IMMEDIATE_STRUCTURES=1 -I/usr/local/samba/include
bradh at kubuntu10:~/openchange/trunk$ pkg-config --libs libmapi
-L/usr/local/samba/lib -lmapi -ldcerpc -lldb -lndr -lsamba-hostconfig -ltalloc
bradh at kubuntu10:~/openchange/trunk$ pkg-config --libs-only-other libmapi
bradh at kubuntu10:~/openchange/trunk$ pkg-config --libs-only-L libmapi
-L/usr/local/samba/lib
bradh at kubuntu10:~/openchange/trunk$ pkg-config --libs-only-l libmapi
-lmapi -ldcerpc -lldb -lndr -lsamba-hostconfig -ltalloc
I now get (and the cmake configure stage):
-- checking for module 'libmapi'
-- found libmapi, version 0.8
-- Found OpenChange MAPI library: mapi;dcerpc;ldb;ndr;samba-hostconfig;talloc
That produces:
[ 16%] Building CXX object akonadi/resources/openchange/CMakeFiles/akonadi_oc_resource.dir/akonadi_oc_resource_automoc.o
cd /home/bradh/kde/build/kdepim/akonadi/resources/openchange
&& /usr/bin/c++ -DTest1Area=5121 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -DHAVE_IMMEDIATE_STRUCTURES=1;-I/usr/local/samba/include -fexceptions -O2 -g -I/home/bradh/kde/build/kdepim/akonadi/resources/openchange -I/home/bradh/kde/src/kdepim/akonadi/resources/openchange -I/home/bradh/kde/src/kdepim -I/home/bradh/kde/build/kdepim -I/home/bradh/kde/src/kdepim/libkdepim -I/home/bradh/kde/src/kdepim/akonadi/resources/shared -I/home/bradh/kde/build/kdepim/akonadi/resources/shared -I/home/bradh/kde/src/kdepim/akonadi -I/home/bradh/kde/include -I/home/bradh/kde/include/KDE -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtAssistant -I/usr/include/qt4/QtDBus -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4 -I/usr/local/samba/include -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o
CMakeFiles/akonadi_oc_resource.dir/akonadi_oc_resource_automoc.o -c /home/bradh/kde/build/kdepim/akonadi/resources/openchange/akonadi_oc_resource_automoc.cpp
c++: no input files
/bin/sh: -I/usr/local/samba/include: not found
make[2]: *** [akonadi/resources/openchange/CMakeFiles/akonadi_oc_resource.dir/akonadi_oc_resource_automoc.o] Error 127
make[2]: Leaving directory `/home/bradh/kde/build/kdepim'
make[1]: *** [akonadi/resources/openchange/CMakeFiles/akonadi_oc_resource.dir/all] Error 2
make[1]: Leaving directory `/home/bradh/kde/build/kdepim'
make: *** [all] Error 2
The problematic part appears to be:
-DHAVE_IMMEDIATE_STRUCTURES=1;-I/usr/local/samba/include
So I hacked around that with this change:
--- akonadi/resources/openchange/CMakeLists.txt (revision 891416)
+++ akonadi/resources/openchange/CMakeLists.txt (working copy)
@@ -5,7 +5,7 @@
${QT_QTDBUS_INCLUDE_DIR}
)
-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBMAPI_DEFINITIONS} ${KDE4_ENABLE_EXCEPTIONS}" )
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I%{LIBMAPI_INCLUDE_DIRS} ${KDE4_ENABLE_EXCEPTIONS}" )
########### next target ###############
I then get to:
/usr/bin/c++ -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -I%{LIBMAPI_INCLUDE_DIRS} -fexceptions -O2 -g -Wl,--enable-new-dtags
CMakeFiles/akonadi_oc_resource.dir/akonadi_oc_resource_automoc.o CMakeFiles/akonadi_oc_resource.dir/profileeditdialog.o CMakeFiles/akonadi_oc_resource.dir/profiledialog.o
CMakeFiles/akonadi_oc_resource.dir/ocresource.o CMakeFiles/akonadi_oc_resource.dir/lzfu.o -o
akonadi_oc_resource-rdynamic -L/home/bradh/kde/lib /home/bradh/kde/lib/libakonadi-kde.so -lQtDBus -lmapi -ldcerpc -lldb -lndr -lsamba-hostconfig-ltalloc /home/bradh/kde/lib/libkio.so.5.2.0 /home/bradh/kde/lib/libakonadi-kmime.so -lkresources -lkldap /home/bradh/kde/lib/libkdeui.so.5.2.0 /home/bradh/kde/lib/libkdecore.so.5.2.0 /home/bradh/kde/lib/libkabc.so /home/bradh/kde/lib/libkdeui.so.5.2.0 /home/bradh/kde/lib/libkio.so.5.2.0 -lQtXml -lkresources -lkabc -lkpimutils -lical -licalss /home/bradh/kde/lib/libkcal.so -lkresources -lkldap -lldap -llber -lsasl2 /home/bradh/kde/lib/libkutils.so.4.2.0 /home/bradh/kde/lib/libkio.so.5.2.0 -lQtNetwork -lQtXml /home/bradh/kde/lib/libkdeui.so.5.2.0 -lQtSvg -lQtGui -lkmime /home/bradh/kde/lib/libkdecore.so.5.2.0 -lQtDBus -lQtCore -lpthread -Wl,-rpath,/home/bradh/kde/lib:/home/bradh/kde/lib -Wl,-rpath-link,/home/bradh/kde/lib
/usr/bin/ld: cannot find -lmapi
collect2: ld returned 1 exit status
make[2]: *** [akonadi/resources/openchange/akonadi_oc_resource] Error 1
make[2]: Leaving directory `/home/bradh/kde/build/kdepim'
make[1]: *** [akonadi/resources/openchange/CMakeFiles/akonadi_oc_resource.dir/all] Error 2
make[1]: Leaving directory `/home/bradh/kde/build/kdepim'
make: *** [all] Error 2
Now I'm stuck again.
Brad
More information about the Kde-buildsystem
mailing list