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 600

Summary: tde incorrectly installs header files into ${include}/kde
Product: TDE Reporter: Darrell <darrella>
Component: tdegraphicsAssignee: Timothy Pearson <kb9vqf>
Status: RESOLVED FIXED    
Severity: critical CC: bugwatch, darrella
Priority: P1    
Version: 3.5.13 [Trinity]   
Hardware: Other   
OS: Other   
Compiler Version: TDE Version String:
Application Version: Application Name:
Attachments: kudge patch to install to correct location
Fix kipi-plugin search for include headers
Patch to keep libkcal headers installed to the same location
Updated tdepim patch to fix CMakeLists.txt header destinations
tdegraphics patch to fix CMakeLists.txt header destination
Patch to build tdesdk with automake when using cmake patches

Description Darrell 2011-11-08 17:15:35 CST
Building kdegraphics results in most of the header files being installed in $PREFIX/include/kde rather than $PREFIX/include. KDE 3.5.10 never had that subdirectory. Placing the header files in the kde subdirectory could prevent other packages from building correctly, as is the case with kdepim (Bug report 599).

A clunky patch was used to fix the cmake files before building:

http://humanreadable.nfshost.com/trinity/patches/kdegraphics/include-dirs.patch

The best repair is to fix the cmake files to install the header files in the correct location.
Comment 1 Darrell 2011-11-22 17:31:28 CST
Created attachment 150 [details]
kudge patch to install to correct location
Comment 2 Darrell 2011-11-27 11:29:38 CST
Bug reports 599 and 600 address the incorrect installation of header files, which causes dependent packages to fail to build.

Rather than trying to discover which packages are affected, in my build scripts I now run the following inline patch to all cmake files after uncompressing the sources to my build directory:

find $APP_SOURCES_DIR -name CMakeLists.txt -exec sed -i s'|DESTINATION \${INCLUDE_INSTALL_DIR}/kde |DESTINATION \${INCLUDE_INSTALL_DIR} |g' {} \;

Applying this one-time search patch to the entire SVN/GIT tree would repair all affected CMakeLists.txt files and avoid the problem of dependent packages failing to build correctly. No additional patching would be required by packagers.
Comment 3 Timothy Pearson 2012-01-15 17:48:46 CST
*** Bug 599 has been marked as a duplicate of this bug. ***
Comment 4 Timothy Pearson 2012-01-15 17:53:19 CST
This will not be trivial to fix, as Autotools also installs some include files to {$include}/kde.  Both CMake and Autotools must be updated in the same commit, otherwise we will cause build failures in non-CMake TDE applications and libraries.

I would like to see this fixed in R14.0, but I will need an exclusive lock on the GIT repository to do it, as any conversion will need to be automated due to the number of files involved.

Raising to blocker for R14.0 and marking CONFIRMED.
Comment 5 Darrell 2012-01-15 17:57:19 CST
Okay!
Comment 6 Darrell 2012-01-18 11:22:29 CST
An example of breakage is trying to build kipi-plugins. That build looks for libkcal headers in $PREFIX/include/libkcal/. Without a patch, tdepim installs the libkcal headers to $PREFIX/include/kde/libkcal/.
Comment 7 Timothy Pearson 2012-03-07 15:51:09 CST
This should be fixed in GIT.  I don't have an exact hash to reference, but for some time now all headers in /opt/trinity/include/kde have been moved to /opt/trinity/include/tde on my test systems.
Comment 8 Darrell 2012-03-07 16:02:02 CST
I know about the renaming change but the real problem is dependent builds. Refer to Comment 6.

About two weeks ago I commented out my patch. As noted header files installed to $PREFIX/include/tde, but tdepim failed to install its header files correctly, which then caused tdegraphics and kipi-plugins to fail to build.

I'll try again and report.
Comment 9 Timothy Pearson 2012-03-07 16:42:25 CST
(In reply to comment #6)
> An example of breakage is trying to build kipi-plugins. That build looks for
> libkcal headers in $PREFIX/include/libkcal/. Without a patch, tdepim installs
> the libkcal headers to $PREFIX/include/kde/libkcal/.

I wonder why there is no problem on Debian/Ubuntu.  I can confirm that the headers are installed to /opt/trinity/include/tde/libkcal (which is correct), yet kipi-plugins builds just fine.
Comment 10 Darrell 2012-03-07 16:57:46 CST
Ok.

I notice in your kipi-plugins build script you add --with-extra-includes=/opt/trinity/include/tde. I will try that.
Comment 11 Timothy Pearson 2012-03-07 17:16:34 CST
(In reply to comment #10)
> Ok.
> 
> I notice in your kipi-plugins build script you add
> --with-extra-includes=/opt/trinity/include/tde. I will try that.

Sounds like a bug in kipi-plugins then--it should be searching for / using /opt/trinity/include/tde and is not.
Comment 12 Darrell 2012-03-09 17:24:15 CST
Created attachment 475 [details]
Fix kipi-plugin search for include headers

I believe the original problem with tdegraphics is resolved. The only header files from that package that are installed to ${INCLUDE_INSTALL_DIR}/tde are the poppler-tqt headers.

With tdepim I think I see the problem. The package installs libkcal headers into two different locations. Some are installed in ${INCLUDE_INSTALL_DIR}/tde/libkcal and others to ${INCLUDE_INSTALL_DIR}/libkcal.

As noted, your kipi-plugins build script has a special --with-extra-includes directive to look in ${INCLUDE_INSTALL_DIR}/tde, which is why the package then finds the specific libkcal headers needed.

y making all of tdepim consistent that extra directive in kipi-plugins is no longer necessary.

I'm attaching a patch for kip-plugins and tdepim. With the former I added /opt/trinity/include/tde to the kde_incdirs search path. The latter patch keeps tdepim internally consistent.

Both patches should cover both possibilities and eliminate the need for the --with-extra-includes.

I can push to GIT if approved.
Comment 13 Darrell 2012-03-09 17:25:02 CST
Created attachment 476 [details]
Patch to keep libkcal headers installed to the same location
Comment 14 Darrell 2012-03-10 15:23:17 CST
Created attachment 478 [details]
Updated tdepim patch to fix CMakeLists.txt header destinations
Comment 15 Darrell 2012-03-10 15:24:27 CST
Created attachment 479 [details]
tdegraphics patch to fix CMakeLists.txt header destination
Comment 16 Darrell 2012-03-10 15:26:21 CST
These updated patches change ${INCLUDE_INSTALL_DIR}/tde -> ${INCLUDE_INSTALL_DIR} for tdepim and tdegraphics. These are the only packages using ${INCLUDE_INSTALL_DIR}/tde. All other packages install headers to ${INCLUDE_INSTALL_DIR} or to a subdirectory in ${INCLUDE_INSTALL_DIR}.

Introducing the tde subdirectory and subdirectories below that added a directory layer that packages like tdesdk and kipi-plugins could not find when building.

I tested these patches. Both tdepim and tdegraphics build without error as do tdesdk and kipi-plugins, the latter of which both are dependent upon finding various tdepim headers.

The tdepim patch foregoes in kipi-plugins the need for using the --with-extra-includes directive.

I will push these to GIT after somebody does a peer review. :)
Comment 17 Darrell 2012-03-11 10:51:29 CDT
Created attachment 482 [details]
Patch to build tdesdk with automake when using cmake patches

The cmake patches submitted in this bug report to streamline header installation means there no longer will be a $PREFIX/include/tde subdirectory.

Currently tdesdk will not build completely when using cmake (bug report 872). Therefore for people still using automake, a single patch is needed to fix the hard-coded reference of $(KDE_INCLUDES)/tde in tdesdk/kbugbuster/kresources/Makefile.am.

This automake patch will be unnecessary after resolving bug report 872.
Comment 18 Darrell 2012-03-21 20:46:05 CDT
tdepim: patch pushed to GIT in hash b99d4323ddffa1b9edcb8bab724a73729b79d883.

tdegraphics: patch pushed to GIT in hash 7a275239c96b1a69c49f1ffbdb498078bf68a168.

tdesdk: patch pushed to GIT in hash 3716a60c0d0323e29d35026ed5ad46bdec47abdf.

This resolves the bug report.