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

Florian Forster octo at verplant.org
Thu Sep 17 12:54:03 CEST 2009


Hi Amit and Mirko,

On Tue, Sep 15, 2009 at 04:27:25PM +0530, Amit Gupta wrote:
> I got the same error while building it on RHEL 5.2. Here is the error
> snapshot:

luckily the build system provided by Doug / Hyperic caught this problem,
too. I didn't find it earlier because the change was committed to 4.7
and wasn't merged to master until after the 4.8 release was made.

> iptables.c:55: error: conflicting types for 'iptc_handle_t'
> owniptc/libiptc.h:48: error: previous declaration of 'iptc_handle_t' was here

There are basically three possibilities when building the iptables
plugin with regard to the iptc library:

  - system wide version available (new API/ABI)
  - system wide version available (old API/ABI)
  - no system wide version

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. Pulling in the
    “real” kernel headers leads to duplicate type definitions which lets
    some checks fail. For example the check that determine whether or
    not “iptc_handle_t” is declared.

    I have removed the use of the kernel directory from libiptc
    altogether.

  - If the configure script determined that “iptc_handle_t” isn't
    declared, the type will be declared within the iptables plugin. This
    happened whether or not a system wide version was used. In case the
    shipped version is used, however, the type definitively is defined.
    Therefore using the result of the configure script leads to the
    above error.

    I have changed the iptables plugin to only define those types when
    NOT using the shipped version of libiptc.

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?

  - 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.

Let me know if you run into more problems with this, thanks :)

Regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090917/c98ac8f6/attachment.pgp 


More information about the collectd mailing list