checking wctype.h presence... yes checking for wctype.h... yes checking whether the preprocessor supports include_next... yes checking whether system header files limit the line length... no checking for C/C++ restrict keyword... __restrict checking whether <wchar.h> uses 'inline' correctly... no configure: error: <wchar.h> cannot be used with this compiler (clang -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int ). This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 23.0_llvm_systemd-20240823-074159 The attached etc.portage.tar.xz has all details. ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-13 * clang/llvm (if any): clang version 18.1.8+libcxx Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/18/bin Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg /usr/lib/llvm/18 18.1.8+libcxx Python 3.12.5 Available Rust versions: [1] rust-bin-1.80.1 * The Glorious Glasgow Haskell Compilation System, version 9.0.2 php cli (if any): go version go1.23.0 linux/amd64 HEAD of ::gentoo commit 9e8b1d9817e4e8ab80685a4ec4056a22f0a0bfa7 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Sat Aug 24 17:33:58 2024 +0000 2024-08-24 17:33:57 UTC emerge -qpvO =net-analyzer/nagios-plugins-2.4.6 [ebuild N ] net-analyzer/nagios-plugins-2.4.6 USE="ipv6 postgres snmp ssl -ldap -mysql -nagios-dns -nagios-game -nagios-ping -radius -samba (-selinux) -ssh"
Created attachment 901135 [details] emerge-info.txt
Created attachment 901136 [details] emerge-history.txt
Created attachment 901137 [details] environment
Created attachment 901138 [details] etc.clang.tar.xz
Created attachment 901139 [details] etc.portage.tar.xz
Created attachment 901140 [details] logs.tar.xz
Created attachment 901141 [details] net-analyzer:nagios-plugins-2.4.6:20240824-175325.log
Created attachment 901142 [details] qlist-info.txt
Created attachment 901143 [details] temp.tar.xz
I don't know how you manage to do this so reliably with nagios-plugins :) Same issue as last time (from config.log): configure:22080: clang -c -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int conftest.c >&5 configure:22083: $? = 0 ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o is incompatible with elf32-i386 ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/crti.o is incompatible with elf32-i386 ld.lld: error: /usr/lib/llvm/18/bin/../../../../lib/clang/18/lib/linux/clang_rt.crtbegin-x86_64.o is incompatible with elf32-i386 ld.lld: error: conftest1.o is incompatible with elf32-i386 ld.lld: error: conftest2.o is incompatible with elf32-i386 Nothing to do with nagios-plugins, just some toolchain confusion that I dare not guess at.
(In reply to Michael Orlitzky from comment #10) > I don't know how you manage to do this so reliably with nagios-plugins :) sry - I'd like to blame the tinderbox ;) > Nothing to do with nagios-plugins, just some toolchain confusion that I dare > not guess at. It is related to clang/llvm, right ?
Oooh don't tell anyone but I was wrong about this. The wchar.h thing isn't the first problem in ./configure, it's just the first *fatal* problem. There are other tests failing, but they are disabling features instead of crashing the build. The last OK check is, configure:15014: checking for main in -lcrypt configure:15033: clang -o conftest -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -L. conftest.c -lcrypt >&5 configure:15033: $? = 0 configure:15042: result: yes But then the next one is, configure:15058: checking for PQsetdbLogin in -lpq configure:15083: clang -o conftest -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -I/usr/include -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -L. -L/usr/lib conftest.c -lpq -lcrypt -lcrypt >&5 ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/Scrt1.o is incompatible with elf32-i386 What went wrong is that -L/usr/lib was added to the library search path and it shouldn't be. On a multilib system, it's pulling in the wrong libs. The chunk of configure.ac that corresponds to these checks is, https://github.com/nagios-plugins/nagios-plugins/blob/master/configure.ac#L219 and I don't know WTF it's doing. For one, it's forgetting to save/restore LDFLAGS which is why -L/usr/lib is getting carried along to subsequent tests. But more to the point.. postgres ships a pg_config executable that tells you this information without having to guess: $ pg_config --includedir /usr/include/postgresql-16 $ pg_config --libdir /usr/lib64/postgresql-16/lib64 So it could be running $PGSQL/bin/pg_config to get everything. I'll work on a PR sometime...
Yeah, lld errors out on this, while bfd only warns (I have a patch locally for bfd).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d5b11c234adf6ff1613e045edacf6cc6e22845e commit 7d5b11c234adf6ff1613e045edacf6cc6e22845e Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2025-04-07 23:52:24 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2025-04-08 00:49:54 +0000 net-analyzer/nagios-plugins: bugfix -r1, keyword ~riscv * Two patches for improved pgsql and net-snmp detection. * Depend on net-dns/bind instead of the old net-dns/bind-tools. * Add ~riscv keywords. Bug: https://bugs.gentoo.org/940193 Closes: https://bugs.gentoo.org/938467 Closes: https://bugs.gentoo.org/953349 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> ...agios-plugins-2.4.12-postgresql-detection.patch | 143 +++++++++++++++++++++ .../files/nagios-plugins-2.4.12-snmpgetnext.patch | 128 ++++++++++++++++++ .../nagios-plugins/nagios-plugins-2.4.12-r1.ebuild | 130 +++++++++++++++++++ 3 files changed, 401 insertions(+)