Problems with openchange libs

Brad Hards bradh at frogmouth.net
Tue Dec 2 11:18:02 CET 2008


Hi,

I'm trying to link with openchange libraries, which in turn depend on samba4 
libraries.

The code I'm trying to build is in kdepim/akonadi/resources/openchange/

The FindOpenChange.cmake module is in kdepim/cmake/modules

The cmake configure step shows:
-- checking for module 'libmapi'                                                                                                                             
--   found libmapi, version 0.8                                                                                                                              
-- Found OpenChange MAPI library: z;mapi;dcerpc;ldb;ndr;samba-hostconfig;talloc

bradh at kubuntu10:~$ pkg-config --cflags-only-I libmapi
-I/usr/local/samba/include
bradh at kubuntu10:~$ pkg-config --cflags-only-other libmapi
-g -O2 -DHAVE_IMMEDIATE_STRUCTURES=1
bradh at kubuntu10:~$ pkg-config --libs-only-L libmapi
-L/usr/local/samba/lib
bradh at kubuntu10:~$ pkg-config --libs-only-l libmapi
-lz -lmapi -ldcerpc -lldb -lndr -lsamba-hostconfig -ltalloc
bradh at kubuntu10:~$ pkg-config --libs-only-other libmapi

I'm just not able to make it find the libraries appropriately.

Linking CXX executable akonadi_oc_resource
cd /home/bradh/kde/build/kdepim/akonadi/resources/openchange && /usr/bin/cmake -E cmake_link_script CMakeFiles/akonadi_oc_resource.dir/link.txt --verbose=1
/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  -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 -lz -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

I appreciate that I need to get -L/usr/local/samba/lib in there, I
just have no idea how.

I've tried changing to lower case, I've tried adding find_library().

I'd really appreciate some help (ideally in the form of a patch to
try, but even "use this example" would help.

Thanks for your time.

Brad


More information about the Kde-buildsystem mailing list