Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949986 - sys-apps/hwloc-2.11.2: Specified --enable-gl switch, but could not find appropriate support
Summary: sys-apps/hwloc-2.11.2: Specified --enable-gl switch, but could not find appro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2025-02-20 00:14 UTC by Matt Jolly
Modified: 2025-03-12 09:43 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config.log (config.log,317.71 KB, text/x-log)
2025-02-20 00:14 UTC, Matt Jolly
Details
build.log (hwloc-2.11.2:20250219-132149.log,18.50 KB, text/x-log)
2025-02-20 00:15 UTC, Matt Jolly
Details
emerge --info (file_949986.txt,11.30 KB, text/plain)
2025-02-20 00:16 UTC, Matt Jolly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Jolly gentoo-dev 2025-02-20 00:14:34 UTC
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
```
Comment 1 Matt Jolly gentoo-dev 2025-02-20 00:15:44 UTC
Created attachment 919447 [details]
build.log
Comment 2 Matt Jolly gentoo-dev 2025-02-20 00:16:22 UTC
Created attachment 919448 [details]
emerge --info
Comment 3 Jaremy Hatler 2025-02-21 14:18:39 UTC
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.
Comment 4 Mike Johnson 2025-02-24 03:20:18 UTC
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
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-24 03:23:42 UTC
```
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:
```
Comment 6 Larry the Git Cow gentoo-dev 2025-03-12 09:43:49 UTC
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(-)