#1136769 nagios-plugins-contrib: FTBFS: ../../nagios-plugins-linux/lib/netinfo-private.c:136:51: error: 'SCHAR_MAX' undeclared (first use in this function)

#1136769#5
Date:
2026-05-15 18:10:04 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202605/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:nagios-plugins-contrib, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules build
dh build --with quilt
dh: warning: Compatibility levels before 10 are deprecated (level 8 in use)
   dh_quilt_patch
	quilt --quiltrc /dev/null push -a || test $? = 2
Applying patch dsa/check_cert_expire_dir_check_name_fix
patching file dsa/checks/dsa-check-cert-expire-dir

Applying patch dsa/check_running_kernel_jessie_centos_fix
patching file dsa/checks/dsa-check-running-kernel

Applying patch dsa/check_running_kernel_focal_fix
patching file dsa/checks/dsa-check-running-kernel

Applying patch check_ajp/return_critical_on_failed_connection

[... snipped ...]

autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:39: installing './compile'
configure.ac:12: installing './config.guess'
configure.ac:14: installing './missing'
lib/Makefile.am: installing './depcomp'
autoreconf: configure.ac: not running make: --make not given
autoreconf: Leaving directory '.'
	find ! -ipath "./debian/*" -a ! \( -path '*/.git/*' -o -path '*/.hg/*' -o -path '*/.bzr/*' -o -path '*/.svn/*' -o -path '*/CVS/*' \) -a  -type f -exec md5sum {} + -o -type l -printf "symlink  %p
" > debian/autoreconf.after
mkdir build-tree
cd build-tree && \
  ../nagios-plugins-linux/configure --prefix=/usr --libexecdir=/usr/lib/nagios/plugins && \
  make
checking for nagios-plugins-linux version... 34
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether sleep supports fractional seconds... yes
checking filesystem timestamp resolution... 0.01
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking xargs -n works... yes
checking how to create a pax tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C23 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/x86_64-linux-gnu-ld
checking if the linker (/usr/bin/x86_64-linux-gnu-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/x86_64-linux-gnu-ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ranlib... ranlib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/x86_64-linux-gnu-ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C23 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for musl libc... no
checking for variable-lenght arrays... yes
checking whether compiler accepts -Wall... yes
checking whether compiler accepts -Wformat... yes
checking whether compiler accepts -Wformat -Wformat-security... yes
checking whether compiler accepts -Wformat-signedness... yes
checking whether compiler accepts -Wimplicit-fallthrough=2... yes
checking whether compiler accepts -Wmissing-noreturn... yes
checking whether compiler accepts -Wmissing-format-attribute... yes
checking whether compiler accepts -Wredundant-decls... yes
checking whether compiler accepts -Wshadow... yes
checking whether compiler accepts -Wsign-compare... yes
checking whether compiler accepts -Wstrict-aliasing=2... yes
checking whether compiler accepts -Wstringop-truncation... yes
checking whether compiler accepts -Wunused... yes
checking whether compiler accepts -Wstack-protector... yes
checking whether compiler accepts -D_FORTIFY_SOURCE=2... yes
checking whether compiler accepts -fstack-protector-strong... yes
checking whether compiler accepts -fpie -fPIE... yes
checking whether compiler accepts -Wl,-z,relro... yes
checking whether compiler accepts -Wl,-z,now... yes
checking whether compiler supports __attribute__((__malloc__))... yes
checking whether compiler supports the noreturn feature... _Noreturn
checking whether compiler supports __attribute__((__format__ (__printf__, x,y))... yes
checking for _Bool... yes
checking for stdbool.h that conforms to C99 or later... yes
checking for arpa/inet.h... yes
checking for fcntl.h... yes
checking for limits.h... yes
checking for mntent.h... yes
checking for netinet/in.h... yes
checking for sys/mount.h... yes
checking for sys/param.h... yes
checking for sys/resource.h... yes
checking for sys/socket.h... yes
checking for sys/sysctl.h... no
checking for sys/sysinfo.h... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for sys/swap.h... yes
checking for utmpx.h... yes
checking for linux/if_link.h... yes
checking for linux/if.h... yes
checking for linux/wireless.h... yes
checking for linux/ethtool.h... yes
checking for linux/netlink.h... yes
checking for linux/rtnetlink.h... yes
checking for linux/sockios.h... yes
checking for asprintf... yes
checking for __secure_getenv... no
checking for secure_getenv... yes
checking for library containing ceil... -lm
checking for clock_gettime in -lrt... yes
checking for clock_gettime with clock CLOCK_MONOTONIC... yes
checking for getmntent... yes
checking for hasmntopt... yes
checking for memset... yes
checking for regcomp... yes
checking for socket... yes
checking for strchr... yes
checking for strerror... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoul... yes
checking for strtoull... yes
checking for sysinfo... yes
checking for uname... yes
checking for realpath... yes
checking for strtoull... (cached) yes
checking for library containing getmntent... none required
checking whether malloc (0) returns nonnull... yes
checking whether realloc (0, 0) returns nonnull... yes
checking for working strtod... yes
checking for cpu_set_t... yes
checking for gcc -std=gnu99 options to detect undeclared functions... none needed
checking for gcc -std=gnu99 options to ignore future-version functions... none needed
checking whether CPU_ALLOC is declared... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libsystemd... no
checking for /proc/meminfo... found /proc/meminfo
checking Whether to build test suite by default... no
checking for get_nprocs_conf... yes
checking for get_nprocs... yes
checking for getloadavg... yes
checking for struct sockaddr_in6... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uid_t... yes
checking for gid_t... yes
checking for uint64_t... yes
checking whether ln -s works... yes
checking whether compiler supports __attribute__((__alloc_size__ args))... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating debian/Makefile
config.status: creating include/Makefile
config.status: creating lib/Makefile
config.status: creating packages/Makefile
config.status: creating packages/specs/Makefile
config.status: creating plugins/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Options used to compile and link:
  debug enabled      = no
  hardening enabled  = yes
  werror enabled     = no
  with docker socket = /var/run/docker.sock
  with libprocps     = no
  with podman socket = /run/podman/podman.sock
  with socketfile    = @/org/kernel/linux/storage/multipathd
  with test suite    = no

  target os          = linux-gnu
  build os           = linux-gnu

  CC                 = gcc -std=gnu99
  CFLAGS             =  -Wall -Wformat -Wformat -Wformat-security -Wformat-signedness -Wimplicit-fallthrough=2 -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-aliasing=2 -Wstringop-truncation -Wunused -Wstack-protector -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fpie -fPIE -g -O2
  LDFLAGS            =  -Wl,-z,relro -Wl,-z,now

make[4]: Entering directory '/<<PKGBUILDDIR>>/madrisan-nagios-plugins-linux/build-tree'
make --no-print-directory all-recursive
Making all in debian
make[6]: Nothing to be done for 'all'.
Making all in include
make[6]: Nothing to be done for 'all'.
Making all in lib
  CC       collection.o
  CC       cpudesc.o
  CC       cpufreq.o
  CC       cpustats.o
  CC       cputopology.o
  CC       files.o
  CC       kernelver.o
  CC       interrupts.o
  CC       json_helpers.o
  CC       messages.o
  CC       mountlist.o
  CC       netinfo.o
  CC       netinfo-private.o
../../nagios-plugins-linux/lib/netinfo-private.c: In function ‘check_link_speed’:
../../nagios-plugins-linux/lib/netinfo-private.c:136:51: error: ‘SCHAR_MAX’ undeclared (first use in this function)
  136 | # define ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32  (SCHAR_MAX)
      |                                                   ^~~~~~~~~
../../nagios-plugins-linux/lib/netinfo-private.c:138:33: note: in expansion of macro ‘ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32’
  138 |     uint32_t link_mode_data[3 * ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32];
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../nagios-plugins-linux/lib/netinfo-private.c:45:1: note: ‘SCHAR_MAX’ is defined in header ‘<limits.h>’; this is probably fixable by adding ‘#include <limits.h>’
   44 | #include "xalloc.h"
  +++ |+#include <limits.h>
   45 |
../../nagios-plugins-linux/lib/netinfo-private.c:136:51: note: each undeclared identifier is reported only once for each function it appears in
  136 | # define ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32  (SCHAR_MAX)
      |                                                   ^~~~~~~~~
../../nagios-plugins-linux/lib/netinfo-private.c:138:33: note: in expansion of macro ‘ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32’
  138 |     uint32_t link_mode_data[3 * ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32];
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[6]: *** [Makefile:478: netinfo-private.o] Error 1
make[5]: *** [Makefile:430: all-recursive] Error 1
make[4]: *** [Makefile:362: all] Error 2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/madrisan-nagios-plugins-linux/build-tree'
make[3]: *** [Makefile:34: all] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/madrisan-nagios-plugins-linux'
make[2]: *** [Makefile:25: madrisan-nagios-plugins-linux] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j1 returned exit code 2
make[1]: *** [debian/rules:11: override_dh_auto_build] Error 255
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:38: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1136769#10
Date:
2026-06-15 12:34:05 UTC
From:
To:
Dear maintainer,

I've prepared an NMU for nagios-plugins-contrib (versioned as 48.20250420+nmu1)
and uploaded it to DELAYED/14. Please feel free to tell me if I should
cancel it.

cu
Adrian

#1136769#19
Date:
2026-06-15 13:11:51 UTC
From:
To:
Thanks for the patch.

I fear your change might get lost in the unlikely event that the madrisan-nagios-plugins-linux sources get updated, changes to such files are done with patches.

Do that properly might not be worth the effort.

Kind Regards,

Bas

#1136769#24
Date:
2026-06-29 13:37:20 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
nagios-plugins-contrib, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1136769@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Adrian Bunk <bunk@debian.org> (supplier of updated nagios-plugins-contrib package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 15 Jun 2026 15:30:55 +0300
Source: nagios-plugins-contrib
Architecture: source
Version: 48.20250420+nmu1
Distribution: unstable
Urgency: medium
Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
Changed-By: Adrian Bunk <bunk@debian.org>
Closes: 1136769
Changes:
 nagios-plugins-contrib (48.20250420+nmu1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Fix FTBFS. (Closes: #1136769)
Checksums-Sha1:
 e02e4e73e664f9a221b57e08705fd81f3544d874 2406 nagios-plugins-contrib_48.20250420+nmu1.dsc
 cb31e847f79e7c13f07ddf4bf698a549a4882858 986852 nagios-plugins-contrib_48.20250420+nmu1.tar.xz
Checksums-Sha256:
 8b17ec71e69755394c1f959cf2092148748ee27f6884413e5d56022e2176ab5e 2406 nagios-plugins-contrib_48.20250420+nmu1.dsc
 a96b259efa8b7de2cf6146623f4b589567a4ff0bfcb188d56f91868a64d21f27 986852 nagios-plugins-contrib_48.20250420+nmu1.tar.xz
Files:
 542d00f4678bf4c73398cc0d0fcc133c 2406 net optional nagios-plugins-contrib_48.20250420+nmu1.dsc
 7c3eb44c1ed364bb87cf602143dbe134 986852 net optional nagios-plugins-contrib_48.20250420+nmu1.tar.xz
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEOvp1f6xuoR0v9F3wiNJCh6LYmLEFAmov8SAACgkQiNJCh6LY
mLGhIQ/+MCOv1EPiZQ1xMp1zhI5MwqlUeqYoNk38MDktmEt8k/oShvIwtw0xhAVW
WvJ9zUEBfN3V+/o4+Q4dU/HTFsQ5TfznzNSKDRrpJ/apQdfFRY880C/IZzVD/zOX
uHzOTBL678+QcnkfR69Ek/xXomRxVNAQDE0vhHXIKFflkai35kLKimtklnKhjO1O
+PmfyU2tEfRgfKYLOKMpkyYSfAv6NXdQuDH+imrwXgm8xxGg1CVxDFU6guKbDif8
6Lq7wrADlGuqpo3dz7yuN2W8xj/iRM4RB0tnSt5qJhpvRHefUwbDRplzwrE3iqcW
DWQg73jeHTY9Ws7zPC47YA4QMKToOQuXbvBtFAjpAc547+Fp/BmI3t4a1sK5No0H
25MpDVcKbE5GAER3ZlisEAh7oS4BMWrxP2phMjNXw9952PLH6nbWh8GXX/c/Zk7+
1Y6Gl+KWTaDWqXN0ybs1vf3SncGDlfpkpwJ5EL92m2Ua+XC+ysjGuntvVizV8Lv+
p19PfBR8ALWkixivwFH49wApazwM8IGTFCWV5FMRoFm0kCMKDzawBKt7PFnWPjrX
FRKtTQQDdfVfG/fDzgyKdEC46SO7EKpo8AWO3sac0PwJdhecwN5VY4aeipuhc7AM
ThUygWnjGiGV7bLasqnRSyTVL1IpxvdBVRRUTkRcU+/eYx46iTk=
=/hzW
-----END PGP SIGNATURE-----