Bug 245613 - net-mgmt/zabbix44-server: Build fails with LIBXML2 enabled
Summary: net-mgmt/zabbix44-server: Build fails with LIBXML2 enabled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo G. Baio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-14 06:14 UTC by Christian Ullrich
Modified: 2020-05-22 11:19 UTC (History)
5 users (show)

See Also:
dbaio: maintainer-feedback+


Attachments
zabbix44-server pkgconf path fix (1.22 KB, patch)
2020-04-16 20:33 UTC, Juraj Lutter
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ullrich 2020-04-14 06:14:06 UTC
Zabbix 4.4.7 (actually 4.4.6) changed the way it detects libxml2. Instead of the apparently obsolescent xml2-config tool it now uses pkgconfig.

The Zabbix source provides an autoconf module for using pkgconfig to detect libxml2. This module does not work with the port.

From the poudriere log:

    [00:00:05] --CONFIGURE_ENV--
    [00:00:05] PKG_CONFIG=pkgconf XDG_DATA_HOME=/wrk[...]

$PKG_CONFIG is set (by USES=pkgconfig) to the bare name of pkgconf without path. The m4 module from the Zabbix source (m4/libxml2.m4) then does this:

    if test -x "$PKG_CONFIG"; then [...]

and falls over because it expects $PKG_CONFIG to include the path.

From what sense I can make of Zabbix's m4 module, it wants to look up pkg-config (pkgconf) first and remember the full path, but it skips this part because USES=pkgconfig has defined $PKG_CONFIG already.

Possible fix: Remove the definition of PKG_CONFIG from Uses/pkgconfig.mk. I suppose this could be predicated on an option to the USES so it won't break everything else.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2020-04-14 10:50:33 UTC
Hardcode full path before "if" fixed build:
> PKG_CONFIG="/usr/local/bin/$PKG_CONFIG"
> if test -x "$PKG_CONFIG"; then [...]
But this is very dirty hack.
Comment 2 Juraj Lutter freebsd_committer freebsd_triage 2020-04-16 20:33:51 UTC
Created attachment 213471 [details]
zabbix44-server pkgconf path fix
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-05-13 02:07:47 UTC
A commit references this bug:

Author: dbaio
Date: Wed May 13 02:06:53 UTC 2020
New revision: 535076
URL: https://svnweb.freebsd.org/changeset/ports/535076

Log:
  net-mgmt/zabbix*-server: Fix build with LIBXML2 option

  PR:		245613
  Submitted by:	Juraj Lutter <juraj@lutter.sk>
  Reported by:	Christian Ullrich <chris@chrullrich.net>
  Approved by:	maintainer timeout (pg@pakhom.spb.ru, > 3 weeks)

Changes:
  head/net-mgmt/zabbix3-server/Makefile
  head/net-mgmt/zabbix4-server/Makefile
  head/net-mgmt/zabbix44-server/Makefile
Comment 4 Danilo G. Baio freebsd_committer freebsd_triage 2020-05-13 02:09:05 UTC
Committed, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-05-22 11:19:53 UTC
A commit references this bug:

Author: dbaio
Date: Fri May 22 11:18:54 UTC 2020
New revision: 536197
URL: https://svnweb.freebsd.org/changeset/ports/536197

Log:
  MFH: r531628 r531630 r531632 r535076 r535874 r535993 r535995

  net-mgmt/zabbix44-*: update 4.4.5 -> 4.4.7

  PR:		245588
  Submitted by:	pg@pakhom.spb.ru (maintainer)
  Relnotes:	https://www.zabbix.com/rn/rn4.4.7

  net-mgmt/zabbix4-server: update 4.0.17 -> 4.0.19

  PR:		245589
  Submitted by:	pg@pakhom.spb.ru (maintainer)
  Relnotes:	https://www.zabbix.com/rn/rn4.0.19

  net-mgmt/zabbix3-server: upgrade 3.0.29 -> 3.0.30

  PR:		245591
  Submitted by:	pg@pakhom.spb.ru (maintainer)
  Relnotes:	https://www.zabbix.com/rn/rn3.0.30

  net-mgmt/zabbix*-server: Fix build with LIBXML2 option

  PR:		245613
  Submitted by:	Juraj Lutter <juraj@lutter.sk>
  Reported by:	Christian Ullrich <chris@chrullrich.net>
  Approved by:	maintainer timeout (pg@pakhom.spb.ru, > 3 weeks)

  net-mgmt/zabbix44-*: Update to 4.4.8

  Changelog:	https://www.zabbix.com/rn/rn4.4.8

  PR:		245995
  Approved by:	Pakhom Golynga <pg@pakhom.spb.ru> (maintainer)

  net-mgmt/zabbix3-*: Update to 3.0.31

  Changelog:	https://www.zabbix.com/rn/rn3.0.31

  PR:		246582
  Approved by:	Pakhom Golynga <pg@pakhom.spb.ru> (maintainer)
  X-MFH-with:	531632, 535076
  Security:	4d11d37e-9a8d-11ea-b9b8-641c67a117d8

  net-mgmt/zabbix4-*: Update to 4.0.20

  Changelog:	https://www.zabbix.com/rn/rn4.0.20

  PR:		246583
  Approved by:	Pakhom Golynga <pg@pakhom.spb.ru> (maintainer)

  Approved by:	ports-secteam (joneum)

Changes:
_U  branches/2020Q2/
  branches/2020Q2/net-mgmt/zabbix3-server/Makefile
  branches/2020Q2/net-mgmt/zabbix3-server/distinfo
  branches/2020Q2/net-mgmt/zabbix4-server/Makefile
  branches/2020Q2/net-mgmt/zabbix4-server/distinfo
  branches/2020Q2/net-mgmt/zabbix44-server/Makefile
  branches/2020Q2/net-mgmt/zabbix44-server/distinfo
  branches/2020Q2/net-mgmt/zabbix44-server/pkg-plist.frontend