Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collectd 5.3.1 DNS plugin does not build on RHEL5 #373

Closed
rolandkool opened this issue Jul 15, 2013 · 3 comments
Closed

Collectd 5.3.1 DNS plugin does not build on RHEL5 #373

rolandkool opened this issue Jul 15, 2013 · 3 comments
Labels
Bug

Comments

@rolandkool
Copy link

@rolandkool rolandkool commented Jul 15, 2013

When trying to build collectd 5.3.1 on RHEL 5.9, I receive the following error:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -DPREFIX="/usr" -DCONFIGFILE="/etc/collectd.conf" -DLOCALSTATEDIR="/var" -DPKGLOCALSTATEDIR="/var/lib/collectd" -DPIDFILE="/var/run/collectd.pid" -DPLUGINDIR="/usr/lib64/collectd" -DPKGDATADIR="/usr/share/collectd" -Wall -Werror -O2 -g -m64 -mtune=generic "-DLT_LAZY_OR_NOW=RTLD_LAZY|RTLD_GLOBAL" -MT dns.lo -MD -MP -MF .deps/dns.Tpo -c dns.c -fPIC -DPIC -o .libs/dns.o
dns.c: In function 'dns_run_pcap_loop':
dns.c:239: error: 'PCAP_ERROR' undeclared (first use in this function)
dns.c:239: error: (Each undeclared identifier is reported only once
dns.c:239: error: for each function it appears in.)
cc1: warnings being treated as errors
dns.c:246: warning: implicit declaration of function 'pcap_statustostr'
dns.c:246: warning: format '%s' expects type 'char ', but argument 3 has type 'int'
dns.c:254: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
dns.c:272: error: 'PCAP_ERROR_IFACE_NOT_UP' undeclared (first use in this function)
dns.c: In function 'dns_child_loop':
dns.c:313: error: 'PCAP_ERROR_IFACE_NOT_UP' undeclared (first use in this function)
dns.c:319: error: 'PCAP_ERROR_BREAK' undeclared (first use in this function)
dns.c:320: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
make[3]: *
* [dns.lo] Error 1
make[3]: Leaving directory /usr/src/redhat/BUILD/collectd-5.3.1/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory/usr/src/redhat/BUILD/collectd-5.3.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/collectd-5.3.1/src'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.10923 (%build)

On this same machine, I managed to build 5.3.0 just fine. Could it be caused by b8f9530 ?

@denodaeus
Copy link

@denodaeus denodaeus commented Jul 25, 2013

Also experiencing this issue with collectd-5.3.1 on CentOS 5.8 x86_64 and libpcap-devel-0.9.4-15

@mfournier
Copy link
Contributor

@mfournier mfournier commented Aug 6, 2013

I noticed this error too when building for RHEL5. RHEL6 which has libpcap-1.0.0 doesn't have this problem.

@mfournier
Copy link
Contributor

@mfournier mfournier commented Aug 9, 2013

So from what I understand, b8f9530 fixes a bug (#308) in error handling with recent versions of libpcap, by using features only available in version >= 1.0.0 (version 1.0.0 has been released almost 5 years ago).

So without going out of the way to support each and every libpcap API version, it boils down to having to choose between supporting the newest libpcap versions, or the older ones.

Unless someone comes forward with such a patch, I'd vote for officially dropping support for older libpcap versions.

mfournier added a commit to mfournier/collectd that referenced this issue Aug 9, 2013
This should prevent DNS plugin from being built on systems with libpcap
older than 1.0.0.

GitHub issue collectd#373
@mfournier mfournier closed this Jan 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.