Created attachment 919446 [details] config.log During my most recent world upgrade I encountered the following configure failure for hwloc ``` . . . **** NVIDIA GL configuration checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for X11/Xlib.h... yes checking for XOpenDisplay in -lX11... yes checking for NVCtrl/NVCtrl.h... yes checking for XNVCTRLQueryTargetAttribute in -lXNVCtrl... no configure: WARNING: Specified --enable-gl switch, but could not configure: WARNING: find appropriate support configure: error: Cannot continue ```
Created attachment 919447 [details] build.log
Created attachment 919448 [details] emerge --info
I ran into this issue as well. Try doing a fresh emerge of x11-drivers/nvidia-drivers before attempting hwloc again. In case this is relevant for anyone: I had neither the wayland or X USE flags enabled on nvidia-drivers when I encountered this. I was in the process of adding the wayland USE flag globally.
I recently added lto to my global USE flags and it was the problem, are you using lto? Disabling it for this package solved same situation. https://wiki.gentoo.org/wiki/LTO#Disable_LTO_per_Package
``` configure:31304: checking for XNVCTRLQueryTargetAttribute in -lXNVCtrl configure:31333: x86_64-pc-linux-gnu-gcc -o conftest -march=native -O2 -pipe -flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -fdiagnostics-color=always -frecord-gcc-switches -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs conftest.c -lXNVCtrl -lXext -lX11 >&5 [01m[Kconftest.c:150:6:[m[K [01;31m[Kerror: [m[Ktype of '[01m[KXNVCTRLQueryTargetAttribute[m[K' does not match original declaration [[01;31m[K-Werror=lto-type-mismatch[m[K] 150 | char XNVCTRLQueryTargetAttribute (void); | [01;31m[K^[m[K [01m[K../../../../x11-drivers/nvidia-drivers-570.86.16-r1/work/nvidia-settings/src/../src/libXNVCtrl/NVCtrl.c:349:6:[m[K [01;36m[Knote: [m[Kreturn value type mismatch [01m[K../../../../x11-drivers/nvidia-drivers-570.86.16-r1/work/nvidia-settings/src/../src/libXNVCtrl/NVCtrl.c:349:6:[m[K [01;36m[Knote: [m[Ktype '[01m[Kint[m[K' should match type '[01m[Kchar[m[K' [01m[K../../../../x11-drivers/nvidia-drivers-570.86.16-r1/work/nvidia-settings/src/../src/libXNVCtrl/NVCtrl.c:349:6:[m[K [01;36m[Knote: [m[K'[01m[KXNVCTRLQueryTargetAttribute[m[K' was previously declared here lto1: some warnings being treated as errors [01m[Klto-wrapper:[m[K [01;31m[Kfatal error: [m[Kx86_64-pc-linux-gnu-gcc returned 1 exit status compilation terminated. /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed collect2: error: ld returned 1 exit status configure:31333: $? = 1 configure: failed program was: ```
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=321179fc6b5e87990d0a9a54d868a63774e9a345 commit 321179fc6b5e87990d0a9a54d868a63774e9a345 Author: Paul Zander <negril.nx+gentoo@gmail.com> AuthorDate: 2025-03-11 13:45:45 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-03-12 09:43:22 +0000 sys-apps/hwloc: fix enable-gl [LTO] Closes: https://bugs.gentoo.org/949986 Closes: https://bugs.gentoo.org/934428 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> .../hwloc/files/hwloc-2.11.2-fix-enable-gl.patch | 27 ++++++++++++++++++++++ sys-apps/hwloc/hwloc-2.11.2.ebuild | 7 +++++- sys-apps/hwloc/hwloc-2.9.3-r1.ebuild | 7 +++++- 3 files changed, 39 insertions(+), 2 deletions(-)