[collectd] libiptc build problems (was: Version 4.8.0 available)

Sebastian Harl sh at tokkee.org
Thu Sep 17 13:23:44 CEST 2009


Hi,

On Thu, Sep 17, 2009 at 12:54:03PM +0200, Florian Forster wrote:
> On Tue, Sep 15, 2009 at 04:27:25PM +0530, Amit Gupta wrote:
> > iptables.c:55: error: conflicting types for 'iptc_handle_t'
> > owniptc/libiptc.h:48: error: previous declaration of 'iptc_handle_t' was here
[…]
> Now two different bugs joint forces and worked together on this one ;)
> 
>   - KERNEL_DIR was used to check for the necessary header files but not
>     when building the plugin. Since building without the kernel sources
>     installed worked just fine for me, I think the headers available in
>     /usr/include/linux are the ones actually needed.

Right. If /usr/include/linux is available, that's what we want to use.
KERNEL_DIR was meant to be used only if that's not available (which
should have been made clear in README though :-/). However, in practice,
this is not true any more. The kernel headers required by libiptc are
usually available in /usr/include/linux, while some headers required by
ipvs are not - so the latter either have to be made available by other
means (as it's done, e.g., in the collectd Debian package) or accessed
through KERNEL_DIR, which, however, made it kinda hard / impossible to
build ipvs and iptables at the same time for the reasons outlined by
Florian :-/

> To improve libiptc support even more, we should:
> 
>   - Use “pkg-config” to figure out the required flags. At least Debian
>     ships an apropriate .pc file. Does anyone know if other
>     distributions do, too?

The .pc file has been introduced upstream when officially making libiptc
available as a shared library. Any reasonable packaging of the new
version thus should include it.

>   - If the required header files for the shipped version of libiptc
>     cannot be found in /usr/include/linux, try to use the header files
>     in the kernel directory.

That sounds like a good idea to me. We should (hopefully) handle all
possible cases then.

Cheers,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090917/00c5284a/attachment.pgp 


More information about the collectd mailing list