Bug 187772 - net-mgmt/nagios-plugins fails if net-mgmt/nagios-plugins is without EXTRAOPTS or NLS
Summary: net-mgmt/nagios-plugins fails if net-mgmt/nagios-plugins is without EXTRAOPTS...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jun Kuriyama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-19 21:50 UTC by Lukasz Wasikowski
Modified: 2014-11-22 22:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukasz Wasikowski 2014-03-19 21:50:00 UTC
net-mgmt/nagios-check_memcached_paranoid fails to compile if EXTRAOPTS is not set in net-mgmt/nagios-plugins.

===>  Building for check_memcached_paranoid-0.20131004_1
cd
/wrkdirs/usr/ports/net-mgmt/nagios-check_memcached_paranoid/work/check_memcached_paranoid-0.20131004;
 NDIR=$(cd /usr/ports/net-mgmt/nagios-plugins && make -VWRKSRC);  cc -O2
-pipe -march=nocona -fno-strict-aliasing
-DLOCALEDIR=\"/usr/local/share/locale\" -D__need_getopt  -I${NDIR}
-I${NDIR}/plugins -I${NDIR}/gl -I${NDIR}/lib -I/usr/local/include  -o
check_memcached_paranoid  ${NDIR}/plugins/netutils.o
${NDIR}/plugins/utils.o  ${NDIR}/lib/utils_base.o
${NDIR}/lib/extra_opts.o ${NDIR}/lib/parse_ini.o  ${NDIR}/gl/getopt.o
${NDIR}/gl/getopt1.o  ${NDIR}/gl/sha1.o  -L/usr/local/lib -lintl
-lmemcached check_memcached_paranoid.c
cc:
/wrkdirs/usr/ports/net-mgmt/nagios-plugins/work/nagios-plugins-1.5/lib/extra_opts.o:
No such file or directory
cc:
/wrkdirs/usr/ports/net-mgmt/nagios-plugins/work/nagios-plugins-1.5/lib/parse_ini.o:
No such file or directory
*** [do-build] Error code 1

With EXTRAOPTS enabled still fails, but in different way:

cd
/wrkdirs/usr/ports/net-mgmt/nagios-check_memcached_paranoid/work/check_memcached_paranoid-0.20131004;
 NDIR=$(cd /usr/ports/net-mgmt/nagios-plugins && make -VWRKSRC);  cc -O2
-pipe -march=nocona -fno-strict-aliasing
-DLOCALEDIR=\"/usr/local/share/locale\" -D__need_getopt  -I${NDIR}
-I${NDIR}/plugins -I${NDIR}/gl -I${NDIR}/lib -I/usr/local/include  -o
check_memcached_paranoid  ${NDIR}/plugins/netutils.o
${NDIR}/plugins/utils.o  ${NDIR}/lib/utils_base.o
${NDIR}/lib/extra_opts.o ${NDIR}/lib/parse_ini.o  ${NDIR}/gl/getopt.o
${NDIR}/gl/getopt1.o  ${NDIR}/gl/sha1.o  -L/usr/local/lib -lintl
-lmemcached check_memcached_paranoid.c
/usr/bin/ld: cannot find -lintl

With EXTRAOPTS and NLS enabled it finally works.

Fix: 

I don't know if there is a sane way to check for EXTRAOPTS and NLS
flags, but if it could be checked then nagios-check_memcached_paranoid
should yell about it.
How-To-Repeat: Install net-mgmt/nagios-plugins without NLS and EXTRAOPTS, then try to install net-mgmt/nagios-check_memcached_paranoid.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-03-19 21:50:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->demon

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2014-04-12 21:56:29 UTC
Responsible Changed
From-To: demon->mat

Take
Comment 3 Mathieu Arnold freebsd_committer freebsd_triage 2014-05-05 14:12:47 UTC
Responsible Changed
From-To: mat->kuriyama

The problem is in net-mgmt/nagios-check_memcached_paranoid, it is certainly 
missing USES=gettext, as it needs it, and it should do something about 
extraopts if not there.
Comment 4 commit-hook freebsd_committer freebsd_triage 2014-11-22 22:41:06 UTC
A commit references this bug:

Author: kuriyama
Date: Sat Nov 22 22:40:38 UTC 2014
New revision: 373112
URL: https://svnweb.freebsd.org/changeset/ports/373112

Log:
  Add a hack to change linking objects which should be changed
  by net-mgmt/nagios-plugins OPTIONS setting.

  PR:		ports/187772
  Reported by:	Lukasz Wasikowski <lukasz@wasikowski.net>

Changes:
  head/net-mgmt/nagios-check_memcached_paranoid/Makefile
Comment 5 Jun Kuriyama freebsd_committer freebsd_triage 2014-11-22 22:43:35 UTC
Fix committed, thanks!