By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.

Bug 701

Summary: Build issue: kdepim ftbfs with -DWITH_CALDAV or -DWITH_CARDDAV cmake options
Product: TDE Reporter: Darrell <darrella>
Component: tdepimAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: blocker CC: bugwatch, darrella, trin
Priority: P1    
Version: R14.0.0 [Trinity]   
Hardware: Other   
OS: All   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: Patch for libcaldav
Patch for libcarddav
libcaldav patch that only removes @VERSION@ info in src/Makefiles
libcarddav patch that only removes @VERSION@ info in src/Makefiles

Description Darrell 2011-11-28 21:49:39 CST
Created attachment 168 [details]
Patch for libcaldav

Both libcaldav and libcarddav build to install their respective header files in a directory that includes a version number. The kdepim cmake build can't find those version-specific directories.

The pkg-config files are incorrect with respect to both header and library file locations.

Two patches are attached to fix how libcaldav and libcardav build so the kdepim cmake process can find the header files.

The patches are for libcaldav_0.6.5-2debian2 and libcarddav_0.6.2-2debian2.

Oddly, although kdepim builds with the patches, the cmake configure log shows the following:

-- checking for one of the modules 'libcaldav'
-- checking for one of the modules 'libcarddav'

But never prints an 'ok, activated for build' message.
Comment 1 Darrell 2011-11-28 21:50:05 CST
Created attachment 169 [details]
Patch for libcarddav
Comment 2 Darrell 2012-02-16 14:02:36 CST
This is a build issue and the bug report should be bumped to Blocker.
Comment 3 Darrell 2012-03-10 15:16:58 CST
These patches no longer are needed. Both libcaldav and libcarddav have been moved directly to the Trinity source tree and no longer are external packages. There no longer is any build confusion with respect to version numbers.

Tagging as resolved.
Comment 4 Darrell 2012-03-11 21:48:25 CDT
I was misled. The packages build from GIT just fine but they do not install in a knowable location. The final directory location still includes a version number but the libcaldav.pc file does not include a version. Therefore the patches remain valid and should be pushed to GIT.
Comment 5 David C. Rankin 2012-03-11 22:29:55 CDT
I experienced a tdepim build failure due to incorrect pkgconfig information supplied by libcaldav and libcarddav for their include file locations. When the
ConfigureChecks.cmake tries to set the include location is gets it wrong.

  Both packages include an extraneous amount of version information when
installing include files. Eg:

/usr/include/libcaldav-0.6.5/caldav.h
/usr/include/libcarddav-0.6.1/carddav.h

  However, the pkgconfig files for both return incorrect include directory location Eg:

21:58 nirvana:/mnt/nv1/home/chroot> cat david/usr/lib/pkgconfig/libcaldav.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

pkglibdir=${libdir}/libcaldav
pkgincludedir=${includedir}/libcaldav

Name: libcaldav
Description: libcaldav is a client library for CalDAV
Version: 0.6.5

Cflags: -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
Libs: -pthread -lgthread-2.0 -lrt -lglib-2.0   -lcurl

  Thus when the ConfigureChecks.cmake files include the location of the header
files, it gets the wrong information. Eg:

# libcaldav
pkg_search_module( CALDAV libcaldav )
if( CALDAV_FOUND )
  execute_process(
    COMMAND pkg-config libcaldav --variable=pkgincludedir
    OUTPUT_VARIABLE _incdir
    RESULT_VARIABLE _result
    OUTPUT_STRIP_TRAILING_WHITESPACE )
  execute_process(
    COMMAND pkg-config libcaldav --variable=pkglibdir
    OUTPUT_VARIABLE _libdir
    RESULT_VARIABLE _result
    OUTPUT_STRIP_TRAILING_WHITESPACE )
  list( APPEND CALDAV_INCLUDE_DIRS ${_incdir} )
  list( APPEND CALDAV_LIBRARY_DIRS ${_libdir} )
  list( APPEND CALDAV_LIBRARIES caldav )
else( )
  tde_message_fatal( "libcaldav is requested, but was not found on your system" )
endif( )

  What this means is that CALDAV_INCLUDE_DIRS gets '/usr/include/libcaldav'
instead of '/usr/include/libcaldav-0.6.5' where the file is actually located.

  Why not just fix libcaldav and libcarddav to put the includes and ${prefix}/include and omit the directory info. Then we can just update the pkgconfig files.
Comment 6 David C. Rankin 2012-03-12 08:46:49 CDT
Created attachment 485 [details]
libcaldav patch that only removes @VERSION@ info in src/Makefiles

Patches src/Makefiles.* but leaves libcaldav.pc.in untouched. Confirmed proper function with 2 end-to-end builds.

Additionally, libcaldav.pc should be removed from the GIT source (it is a leftover from somebody's personal build)
Comment 7 David C. Rankin 2012-03-12 08:49:56 CDT
Created attachment 486 [details]
libcarddav patch that only removes @VERSION@ info in src/Makefiles

Patch set for the libcarddav GIT source that resolves incorrect referenced in libcarddav.pc to carddav.h. This patch only modifies src/Makefiles.* to removed @VERSION@ info from the include dir information and doesn't modify libcarddav.pc.in.
Comment 8 Darrell 2012-03-13 23:02:44 CDT
libcaldav.pc should be removed from the GIT tree.

We should leave the patches as is because the original patches changed the installation location of the lib files too. There is no need for Yet Another Subdirectory in $PREFIX/lib.
Comment 9 Darrell 2012-03-21 20:53:17 CDT
libcaldav patch pushed to GIT in hash 03705c223966657a6cca466fc96188a2b1621c39.

libcarddav patch pushed to GIT in hash fd9474fd52cecf326904f9bae523b75b0c3645c7.

This resolves the bug report.