Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321622

Summary: TCF agent headers required for plugins are not installed
Product: [Tools] TCF Reporter: Alexis Hallé <alexis.halle>
Component: CoreAssignee: Project Inbox <dsdp.tm.tcf-inbox>
Status: NEW --- QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, eugene
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch to install framework headers with make install
none
Patch to install framework headers with make install none

Description Alexis Hallé CLA 2010-08-03 11:45:39 EDT
Build Identifier: 

This forces plugins to know the location of the TCF agent source code, when only the headers are really needed.

If they were installed in a default location (/usr/include/tcf/ or /usr/local/include/tcf/), plugins could just include <tcf/something.h> and not need to rely on the actual source code.


Reproducible: Always

Steps to Reproduce:
1. make install
2. The headers are not installed
Comment 1 Alexis Hallé CLA 2010-08-03 11:48:20 EDT
Created attachment 175792 [details]
Patch to install framework headers with make install

The attached patch is a proposed fix for this bug. I created a new directory include/tcf/ in agent/ and moved all headers in framework/ there. These files are installed on the system by the install target of the makefile.
Comment 2 Alexis Hallé CLA 2010-08-03 11:51:28 EDT
Created attachment 175793 [details]
Patch to install framework headers with make install

Corrected the patch, which was not in a proper format.
Comment 3 Eugene Tarassov CLA 2010-08-03 14:54:41 EDT
I have some concerns about proposed changes:

1. Header files are normally part of -devel packages. Should we build a separate tcf-agent-devel RPM?

2. If we install config.h it should contain actual values of various ENABLE_ and SERVICE_ macros that were used to build binaries.

3. Headers in "services" directory are important part of the agent API, and should be installed too. Instead of renaming "framework" to "tcf", I would rather move existing hierarchy into "tcf" directory: tcf/framework/..., tcf/services/...

4. I see no need to have a separate "include" directory in source repository. I found it much more convenient when .h files are kept together with corresponding .c.

5. Renaming of header files is not really necessary to resolve the issue of plugins forced to know the location of the TCF agent source code. To solve the issue we can install existing headers in /usr/include/tcf. That would only require compiler command line option "-I/usr/include/tcf" to compile a plugin code. I suggest we treat installing and renaming as two separate issues, and move all renaming discussions to "Bug 225082 [tcf][releng] Improve TCF Agent build directory structure":
https://bugs.eclipse.org/bugs/show_bug.cgi?id=225082

In any case, renaming will severely affect downstream projects and cannot be done without at least some discussions and coordination.

For now, I'm going to commit only changes in makefiles that will install existing headers in /usr/include/tcf/

Regards,
Eugene
Comment 4 Alexis Hallé CLA 2010-08-03 15:40:34 EDT
> 1. Header files are normally part of -devel packages. Should we build a
> separate tcf-agent-devel RPM?

Yes, I guess that would be appropriate.

> 2. If we install config.h it should contain actual values of various ENABLE_
> and SERVICE_ macros that were used to build binaries.

I agree, but I'm not sure how to do that right now.

> 3. Headers in "services" directory are important part of the agent API, and
> should be installed too. Instead of renaming "framework" to "tcf", I would
> rather move existing hierarchy into "tcf" directory: tcf/framework/...,
> tcf/services/...

Ok, I didn't think they were part of the API exposed to plugins.

> 4. I see no need to have a separate "include" directory in source repository. I
> found it much more convenient when .h files are kept together with
> corresponding .c.
> 
> 5. Renaming of header files is not really necessary to resolve the issue of
> plugins forced to know the location of the TCF agent source code. To solve the
> issue we can install existing headers in /usr/include/tcf. That would only
> require compiler command line option "-I/usr/include/tcf" to compile a plugin
> code. I suggest we treat installing and renaming as two separate issues, and
> move all renaming discussions to "Bug 225082 [tcf][releng] Improve TCF Agent
> build directory structure":
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=225082
> 
> In any case, renaming will severely affect downstream projects and cannot be
> done without at least some discussions and coordination.

A potential problem I see with that is that headers are not necessarily in /usr/include/tcf. The user could have installed them in /usr/local/include/tcf, which is equally valid, and with the renaming it would be transparent. Maybe I'm asking for too much, I don't know. I guess I can live with that as long as they are installed somewhere.

> For now, I'm going to commit only changes in makefiles that will install
> existing headers in /usr/include/tcf/

Thank you Eugene!

Regards,
Alexis