Version: (using Devel) Installed from: Compiled sources Compiler: gcc-4.2.2 Compiler compiled from gcc.gnu.org sources OS: Linux When building kdelibs, it decides that I don't have smbc_set_context. The reason is that it does not know where to look to find my samba include files. The following patch in the kdelibs tree allows kdebase to notice that I do, in fact, have a library with the required symbol: Index: cmake/modules/FindSamba.cmake =================================================================== --- cmake/modules/FindSamba.cmake (revision 778745) +++ cmake/modules/FindSamba.cmake (working copy) @@ -29,6 +29,7 @@ include(MacroPushRequiredVars) macro_push_required_vars() set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SAMBA_LIBRARIES}) + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${SAMBA_INCLUDE_DIR}) check_symbol_exists(smbc_set_context "libsmbclient.h" SAMBA_HAVE_SMBC_SET_CONTEXT) macro_pop_required_vars() # fail if smbc_set_context() was required but hasn't been found
OK, to clarify, kdelibs builds and installs, but later on, those packages that are interested in smbc_set_context (such as kdebase) decide that it isn't present. This fix to kdelibs allows those packages to detect the presence of that symbol.
Well, once kdebase knows it can use samba in a non-standard location, it needs a bit of CMake-related fixing also. I'm going to do a complete rebuild to look for more problems. For now, this appears to fix kdebase (but this is not from a clean rebuild): Index: runtime/kioslave/smb/CMakeLists.txt =================================================================== --- runtime/kioslave/smb/CMakeLists.txt (revision 778767) +++ runtime/kioslave/smb/CMakeLists.txt (working copy) @@ -8,6 +8,7 @@ kio_smb_internal.cpp kio_smb_mount.cpp ) +include_directories(${SAMBA_INCLUDE_DIR}) kde4_add_plugin(kio_smb ${kio_smb_PART_SRCS})
With these two changes applied, did a clean build on all of: kdesupport kdelibs kdepimlibs kdebase kdepim kdeaccessibility kdeadmin kdeartwork kdebindings kdeedu kdegames kdegraphics kdemultimedia kdenetwork kdesdk kdetoys kdeutils kdewebdev ktorrent kdevplatform kdevelop All compiled correctly, save kdevelop, which failed with an unrelated error. I do not have the ability to check in code, so I'd appreciate if somebody could apply these, after verifying their correctness.
SVN commit 780025 by winterz: fix Samba discovery and usage thanks for the patch Christopher. BUGS: 158335 M +1 -0 kdebase/runtime/kioslave/smb/CMakeLists.txt M +1 -0 kdelibs/cmake/modules/FindSamba.cmake WebSVN link: http://websvn.kde.org/?view=rev&revision=780025