Bug 223387 - net-mgmt/nagios-plugins fails with databases/mariadb102-client
Summary: net-mgmt/nagios-plugins fails with databases/mariadb102-client
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-02 22:18 UTC by Alexey
Modified: 2017-11-06 14:25 UTC (History)
3 users (show)

See Also:


Attachments
Fixes compile issues with mariadb 10.2 (1.80 KB, patch)
2017-11-04 13:38 UTC, Matthias Fechner
no flags Details | Diff
svn diff for net-mgmt/nagios-plugins (1.45 KB, patch)
2017-11-05 09:50 UTC, Bernard Spil
brnrd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2017-11-02 22:18:54 UTC
Hello!

FreeBSD 11.1, latest ports
use poudriere for building ports
we have enabled MySQL checkings:
<poudriere port config dir>/net-mgmt_nagios-plugins/options
OPTIONS_FILE_SET+=MYSQL

and use MariaDB 10.2Ж
DEFAULT_VERSIONS+=mysql=102m
in <poudriere's>-make.conf

in this case build fail:

[00:10:14] ====>> [01][00:00:38] Finished build of net-mgmt/nagios-plugins: Failed: build

...skip....
/bin/sh ../libtool --tag=CC   --mode=link cc -DNP_VERSION='""' -O2 -pipe  -fstack-protector -fno-strict-aliasing  -Wl,-rpath,/usr/local/lib -fstack-protector -L. -L/usr/local/lib -o urlize urlize.o libnpcommon.a ../lib/libnagiosplug.a ../gl/libgnu.a -L/usr/local/lib -lintl -R/usr/local/lib -lpthread -L/usr/local/lib
libtool: link: cc -DNP_VERSION=\"\" -O2 -pipe -fstack-protector -fno-strict-aliasing -Wl,-rpath -Wl,/usr/local/lib -fstack-protector -o urlize urlize.o  -L. -L/usr/local/lib libnpcommon.a ../lib/libnagiosplug.a ../gl/libgnu.a -lintl -lpthread -Wl,-rpath -Wl,/usr/local/lib
cc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I..  -I.. -I../lib -I../gl -I../intl -I/usr/local/include -I/usr/local/include/mysql -I/usr/local/include/mysql/.. -I/usr/local/include -D_THREAD_SAFE -I/usr/local/include -DNP_VERSION='""' -I/usr/local/include/mysql -I/usr/local/include/mysql/..  -O2 -pipe  -fstack-protector -fno-strict-aliasing -MT check_mysql-check_mysql.o -MD -MP -MF .deps/check_mysql-check_mysql.Tpo -c -o check_mysql-check_mysql.o `test -f 'check_mysql.c' || echo './'`check_mysql.c
check_mysql.c:61:24: error: use of undeclared identifier 'MYSQL_PORT'
unsigned int db_port = MYSQL_PORT;
                       ^
check_mysql.c:508:28: error: use of undeclared identifier 'MYSQL_PORT'
        xasprintf (&myport, "%d", MYSQL_PORT);
                                  ^
2 errors generated.
gmake[4]: *** [Makefile:1855: check_mysql-check_mysql.o] Error 1
gmake[4]: Leaving directory '/usr/local/ports/work/usr/ports/net-mgmt/nagios-plugins/work/nagios-plugins-2.2.1/plugins'
gmake[3]: *** [Makefile:1431: all-recursive] Error 1
gmake[3]: Leaving directory '/usr/local/ports/work/usr/ports/net-mgmt/nagios-plugins/work/nagios-plugins-2.2.1'
gmake[2]: *** [Makefile:1352: all] Error 2
gmake[2]: Leaving directory '/usr/local/ports/work/usr/ports/net-mgmt/nagios-plugins/work/nagios-plugins-2.2.1'


It will compile w/o errors with MariaDB 10.1 and fail with 10.2.
Comment 1 Matthias Fechner freebsd_committer freebsd_triage 2017-11-04 13:38:08 UTC
Created attachment 187724 [details]
Fixes compile issues with mariadb 10.2
Comment 2 Alexey 2017-11-04 20:42:50 UTC
Thank you, compilation success with the patch.
Comment 3 Bernard Spil freebsd_committer freebsd_triage 2017-11-05 09:50:05 UTC
Created attachment 187750 [details]
svn diff for net-mgmt/nagios-plugins

Looks like the project fixes these issues in common.h. Submitted upstream as well

https://github.com/nagios-plugins/nagios-plugins/pull/340
Comment 4 Mathieu Arnold freebsd_committer freebsd_triage 2017-11-06 14:19:57 UTC
*** Bug 223424 has been marked as a duplicate of this bug. ***
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-11-06 14:25:18 UTC
A commit references this bug:

Author: mat
Date: Mon Nov  6 14:24:56 UTC 2017
New revision: 453621
URL: https://svnweb.freebsd.org/changeset/ports/453621

Log:
  Fix build with MariaDB 10.2.

  PR:		223387
  Submitted by:	brnrd
  Reported by:	fbsd98816551 avksrv org
  Sponsored by:	Absolight

Changes:
  head/net-mgmt/nagios-plugins/files/patch-plugins_common.h