Bug 269922 - net-mgmt/monitoring-plugins build fails when NLS is set
Summary: net-mgmt/monitoring-plugins build fails when NLS is set
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: Jochen Neumeister
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-02 20:28 UTC by Tom Weustink
Modified: 2023-03-19 09:28 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (joneum)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Weustink 2023-03-02 20:28:46 UTC
Since v2.3.2 (released 16 February) this port fails to build when NLS is UNSET.

The log message shows:
cc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I..  -I.. -I../lib -I../gl -I../intl -I/usr/include -I/usr/local/include -D_THREAD_SAFE -DNP_VERSION='""' -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -MT check_swap.o -MD -MP -MF .deps/check_swap.Tpo -c -o check_swap.o check_swap.c
check_swap.c:39:10: fatal error: 'libintl.h' file not found
#include <libintl.h>
         ^~~~~~~~~~~

Changing the option to SET will build the port without a problem.

Thanks to vishwin in #bsdports on EFnet for point to NLS in regards to libintl.h.

I set Severity to "Affect Some People" since be default NLS is SET, so only if you build manually and set NLS to UNSET will you run into this issue.
Not sure if "Affects Many People" is warranted in this case.
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-03-19 09:27:39 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9192049d9e376d9c3d6bea45c2ea8a7d98b780f5

commit 9192049d9e376d9c3d6bea45c2ea8a7d98b780f5
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2023-03-19 09:23:52 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2023-03-19 09:27:13 +0000

    net-mgmt/monitoring-plugins: Fix a problem with NLS

    there was an error with the build when NLS is set, see
    https://github.com/monitoring-plugins/monitoring-plugins/issues/1853

    PR:     269922
    Reported by:    Tom Weustink <t.weustink@outlook.com>
    Sponsored by:   Netzkommune GmbH

 .../files/patch-plugins_check__swap.c (new)                  | 12 ++++++++++++
 1 file changed, 12 insertions(+)