Bug 238959 - net-mgmt/collectd5: 5.9.0 fails to build/link with CURL_XML enabled
Summary: net-mgmt/collectd5: 5.9.0 fails to build/link with CURL_XML enabled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-07-03 15:37 UTC by Chip Cuccio
Modified: 2019-07-19 18:14 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (ports)
koobs: merge-quarterly?


Attachments
Build log, config log, and installed packages. (671.83 KB, text/plain)
2019-07-03 15:37 UTC, Chip Cuccio
no flags Details
collectd6 update for plugins build (2.04 KB, patch)
2019-07-08 05:46 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff
Patch for collectd correcting libxml linker (803 bytes, patch)
2019-07-14 22:12 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chip Cuccio 2019-07-03 15:37:25 UTC
Created attachment 205500 [details]
Build log, config log, and installed packages.

Build/configure error: "configure: error: "Some plugins are missing dependencies - see the summary above for details"
===>  Script "configure" failed unexpectedly."

The option/plugin failing is the CURL_XML option. Full "collectd-5.9.0/config.log" attached, as well as the make output in the same file.

The culprit seems to be configure not finding `libxml/parser.h`, although libxml2 is installed, along with the headers.

Deselecting the CURL_XML option builds fine.
Previous port version (5.8.1) builds and installs fine with CURL_XML option selected.
Comment 1 Krzysztof 2019-07-08 05:46:51 UTC
Created attachment 205576 [details]
collectd6 update for plugins build

Hello,

Thnaks a lot for your notification. I've made a patch which coorects problems with plugins (not only xml one).

I hope it will be commited. I've tested it with my instance of poudriere. I can attach logs if it is needed.
Comment 2 Chip Cuccio 2019-07-08 08:15:27 UTC
(In reply to Krzysztof from comment #1)

Krzysztof, thank you for the patch!
I can confirm that it fixes the plugin build issue on multiple machines and archs.

Cheers!
Comment 3 Chip Cuccio 2019-07-08 19:28:37 UTC
(In reply to Krzysztof from comment #1)

Spoke a little too soon:

Patch fixed the CURL_XML plugin *build* issue(s). But running collectd5 with the bind XML plugin enabled throws an error:

"ERROR: dlopen("/usr/local/lib/collectd/bind.so") failed: /usr/local/lib/collectd/bind.so: Undefined symbol "xmlFree". The most common cause for this problem is missing dependencies. Use ldd(1) to check the dependencies of the plugin / shared object."

LDD output of plugin bind.so on AMD64:

ldd /usr/local/lib/collectd/bind.so
/usr/local/lib/collectd/bind.so:
        libcurl.so.4 => /usr/local/lib/libcurl.so.4 (0x801207000)
        libgcrypt.so.20 => /usr/local/lib/libgcrypt.so.20 (0x801497000)
        libc.so.7 => /lib/libc.so.7 (0x800825000)
        libnghttp2.so.14 => /usr/local/lib/libnghttp2.so.14 (0x8017c0000)
        libidn2.so.0 => /usr/local/lib/libidn2.so.0 (0x8019e9000)
        libssh2.so.1 => /usr/local/lib/libssh2.so.1 (0x801c08000)
        libssl.so.11 => /usr/local/lib/libssl.so.11 (0x801e39000)
        libcrypto.so.11 => /usr/local/lib/libcrypto.so.11 (0x802200000)
        libk5crypto.so.3.1 => /usr/local/lib/libk5crypto.so.3.1 (0x8026ea000)
        libcom_err.so.3.0 => /usr/local/lib/libcom_err.so.3.0 (0x80291e000)
        libz.so.6 => /lib/libz.so.6 (0x802b21000)
        libkrb5.so.3.3 => /usr/local/lib/libkrb5.so.3.3 (0x802d39000)
        libgssapi_krb5.so.2.2 => /usr/local/lib/libgssapi_krb5.so.2.2 (0x803028000)
        libthr.so.3 => /lib/libthr.so.3 (0x803274000)
        libgpg-error.so.0 => /usr/local/lib/libgpg-error.so.0 (0x80349c000)
        libunistring.so.2 => /usr/local/lib/libunistring.so.2 (0x8036bc000)
        libkrb5support.so.0.1 => /usr/local/lib/libkrb5support.so.0.1 (0x803a6e000)
        libintl.so.8 => /usr/local/lib/libintl.so.8 (0x803c7d000)

Make options:
collectd5-5.9.0_1 CGI off
collectd5-5.9.0_1 CHRONY off
collectd5-5.9.0_1 CURL on
collectd5-5.9.0_1 CURL_JSON on
collectd5-5.9.0_1 CURL_XML on
collectd5-5.9.0_1 DBI off
collectd5-5.9.0_1 GCRYPT on
collectd5-5.9.0_1 IPMI off
collectd5-5.9.0_1 JAVA off
collectd5-5.9.0_1 JSON on
collectd5-5.9.0_1 KAFKA off
collectd5-5.9.0_1 LOGGING on
collectd5-5.9.0_1 LOGSTASH off
collectd5-5.9.0_1 MEMCACHEC off
collectd5-5.9.0_1 MODBUS off
collectd5-5.9.0_1 MONGODB off
collectd5-5.9.0_1 MQTT off
collectd5-5.9.0_1 MYSQL off
collectd5-5.9.0_1 NOTIFYDESKTOP off
collectd5-5.9.0_1 NOTIFYEMAIL off
collectd5-5.9.0_1 NUTUPS off
collectd5-5.9.0_1 OLSRD off
collectd5-5.9.0_1 ONEWIRE off
collectd5-5.9.0_1 OPENLDAP off
collectd5-5.9.0_1 PERL off
collectd5-5.9.0_1 PGSQL off
collectd5-5.9.0_1 PINBA off
collectd5-5.9.0_1 PING on
collectd5-5.9.0_1 PROMETHEUS off
collectd5-5.9.0_1 PYTHON off
collectd5-5.9.0_1 RABBITMQ off
collectd5-5.9.0_1 REDIS off
collectd5-5.9.0_1 RIEMANN off
collectd5-5.9.0_1 ROUTEROS off
collectd5-5.9.0_1 RRDTOOL off
collectd5-5.9.0_1 SIGROK off
collectd5-5.9.0_1 SNMP off
collectd5-5.9.0_1 STATSD off
collectd5-5.9.0_1 TOKYOTYRANT off
collectd5-5.9.0_1 TSDB off
collectd5-5.9.0_1 VARNISH off
collectd5-5.9.0_1 VIRT off
collectd5-5.9.0_1 XML on
collectd5-5.9.0_1 ZOOKEEPER off
Comment 4 Krzysztof 2019-07-09 06:59:25 UTC
OK,

I've checked the problem. Unfortunatelly I don't know why plugins are not linked with libxml. I've checked configure scripts and it seems correctly.

I will try find solution asap.
Comment 5 Krzysztof 2019-07-14 22:12:17 UTC
Created attachment 205781 [details]
Patch for collectd correcting libxml linker

I've made a patch which corrects libxml linker (-llibxml2) for curl_xml plugins.

I've tested it with my poudriere - there is no errors.

I've bumped port revision: AFAIK it must be done to correct these plugins.
Comment 6 Chip Cuccio 2019-07-15 14:10:21 UTC
(In reply to Krzysztof from comment #5)

Hi Krzysztof, thank you for the patch. I can confirm that it fixed the libxml issue, and works as intended.

Cheers!
Comment 7 Krzysztof 2019-07-17 13:24:25 UTC
Question to commiters: should I mark previous patch as obsolete? For me it makes no sense... But maybe it will make commit sooner?
Comment 8 Romain Tartière freebsd_committer freebsd_triage 2019-07-19 18:05:24 UTC
Just got hit by this.  I'll take it!

@Krzysztof to answer your question and for the future, the best way to help maintainers is to have a single patch in the list of attachments of a PR (no need to update this PR, I succeeded in applying the patches in the right order and build collectd).

Thanks!
Comment 9 commit-hook freebsd_committer freebsd_triage 2019-07-19 18:11:44 UTC
A commit references this bug:

Author: romain
Date: Fri Jul 19 18:11:04 UTC 2019
New revision: 506956
URL: https://svnweb.freebsd.org/changeset/ports/506956

Log:
  net-mgmt/collectd5: Various fixes

  - Fix build when the CURL_XML option is enabled;
  - Fix activation/deactivation of a few plugins.

  PR:		238959
  Submitted by:	Krzysztof <ports@bsdserwis.com> (maintainer)
  Reported by:	Chip Cuccio <chip.cuccio@gmail.com>

Changes:
  head/net-mgmt/collectd5/Makefile
Comment 10 Romain Tartière freebsd_committer freebsd_triage 2019-07-19 18:14:49 UTC
Committed, thanks!