Why without use flags static-libs the ebuild not install the headers?
Because it doen't install the library otherwise, which is only a .a.
Yes, NVCtrl headers are for using libXNVCtrl.a which isn't installed without USE=static-libs (no shared version), I don't quite see what use the headers will have without the library.
(In reply to Ionen Wolkens from comment #2) > Yes, NVCtrl headers are for using libXNVCtrl.a which isn't installed without > USE=static-libs (no shared version), I don't quite see what use the headers > will have without the library. the headers could be used by other libraries without the need for static compilation
(In reply to Andrea Postiglione from comment #3) > the headers could be used by other libraries without the need for static > compilation The only installed headers with USE=static-libs are NVCtrl.h and NVCtrlLib.h, these are not for other libraries, only the static-only libXNVCtrl.a Perhaps you're looking for headers installed by nvidia-cuda-toolkit?
(In reply to Ionen Wolkens from comment #4) > (In reply to Andrea Postiglione from comment #3) > > the headers could be used by other libraries without the need for static > > compilation > The only installed headers with USE=static-libs are NVCtrl.h and > NVCtrlLib.h, these are not for other libraries, only the static-only > libXNVCtrl.a > > Perhaps you're looking for headers installed by nvidia-cuda-toolkit? for example sys-apps/hwloc use the .h actually it require that nvidia-drivers have the static-libs use flags
(In reply to Andrea Postiglione from comment #5) > for example sys-apps/hwloc use the .h > actually it require that nvidia-drivers have the static-libs use flags It links with the static-only library libXNVCtrl.a, so of course it has [static-libs] from hwloc build (see the -lXNVCtrl): /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -fvisibility=hidden -DHWLOC_INSIDE_PLUGIN -march=native -O2 -pipe -I/opt/cuda/include -module -avoid-version -lXNVCtrl -lXext -lX11 -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -L/opt/cuda/lib64 -o hwloc_gl.la -rpath /usr/lib64/hwloc hwloc_gl_la-topology-gl.lo
(In reply to Ionen Wolkens from comment #6) > (In reply to Andrea Postiglione from comment #5) > > for example sys-apps/hwloc use the .h > > actually it require that nvidia-drivers have the static-libs use flags > It links with the static-only library libXNVCtrl.a, so of course it has > [static-libs] > > from hwloc build (see the -lXNVCtrl): > /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc > -fvisibility=hidden -DHWLOC_INSIDE_PLUGIN -march=native -O2 -pipe > -I/opt/cuda/include -module -avoid-version -lXNVCtrl -lXext -lX11 -Wl,-O1 > -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -L/opt/cuda/lib64 -o > hwloc_gl.la -rpath /usr/lib64/hwloc hwloc_gl_la-topology-gl.lo i have modified the nvidia-drivers in my local overlay without if conditions dolib.a nvidia-settings/src/out/libXNVCtrl.a insinto /usr/include/NVCtrl doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h and hwloc build fine build fine without static-libs flags what is needed is to install the headers and the .a only with the static build?
.a *is* the static library (static archive)?
(In reply to Sam James from comment #8) > .a *is* the static library (static archive)? i have builded nvidia-drivers in shared mode look this. thunderdome /var/db/repos/local/x11-drivers/nvidia-drivers # equery files nvidia-drivers * Searching for nvidia-drivers ... * Contents of x11-drivers/nvidia-drivers-510.60.02: /etc /etc/OpenCL /etc/OpenCL/vendors /etc/OpenCL/vendors/nvidia.icd /etc/X11 /etc/X11/xinit /etc/X11/xinit/xinitrc.d /etc/X11/xinit/xinitrc.d/95-nvidia-settings /etc/modprobe.d /etc/modprobe.d/nvidia.conf /lib /lib/firmware /lib/firmware/nvidia /lib/firmware/nvidia/510.60.02 /lib/firmware/nvidia/510.60.02/gsp.bin /lib/modules /lib/modules/5.17.0-gentoo /lib/modules/5.17.0-gentoo/video /lib/modules/5.17.0-gentoo/video/nvidia-drm.ko /lib/modules/5.17.0-gentoo/video/nvidia-modeset.ko /lib/modules/5.17.0-gentoo/video/nvidia-peermem.ko /lib/modules/5.17.0-gentoo/video/nvidia-uvm.ko /lib/modules/5.17.0-gentoo/video/nvidia.ko /lib/systemd /lib/systemd/system /lib/systemd/system-sleep /lib/systemd/system-sleep/nvidia /lib/systemd/system/nvidia-hibernate.service /lib/systemd/system/nvidia-powerd.service /lib/systemd/system/nvidia-resume.service /lib/systemd/system/nvidia-suspend.service /opt /opt/bin /opt/bin/nvidia-cuda-mps-control /opt/bin/nvidia-cuda-mps-server /opt/bin/nvidia-debugdump /opt/bin/nvidia-ngx-updater /opt/bin/nvidia-powerd /opt/bin/nvidia-smi /usr /usr/bin /usr/bin/nvidia-bug-report.sh /usr/bin/nvidia-modprobe /usr/bin/nvidia-settings /usr/bin/nvidia-sleep.sh /usr/bin/nvidia-xconfig /usr/include /usr/include/NVCtrl /usr/include/NVCtrl/NVCtrl.h /usr/include/NVCtrl/NVCtrlLib.h /usr/lib64 /usr/lib64/gbm /usr/lib64/gbm/nvidia-drm_gbm.so -> ../libnvidia-allocator.so.1 /usr/lib64/libEGL_nvidia.so.0 -> libEGL_nvidia.so.510.60.02 /usr/lib64/libEGL_nvidia.so.510.60.02 /usr/lib64/libGLESv1_CM_nvidia.so.1 -> libGLESv1_CM_nvidia.so.510.60.02 /usr/lib64/libGLESv1_CM_nvidia.so.510.60.02 /usr/lib64/libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.510.60.02 /usr/lib64/libGLESv2_nvidia.so.510.60.02 /usr/lib64/libGLX_nvidia.so.0 -> libGLX_nvidia.so.510.60.02 /usr/lib64/libGLX_nvidia.so.510.60.02 /usr/lib64/libXNVCtrl.a <---- look this /usr/lib64/libcuda.so -> libcuda.so.1 /usr/lib64/libcuda.so.1 -> libcuda.so.510.60.02 /usr/lib64/libcuda.so.510.60.02 /usr/lib64/libnvcuvid.so -> libnvcuvid.so.1 /usr/lib64/libnvcuvid.so.1 -> libnvcuvid.so.510.60.02 /usr/lib64/libnvcuvid.so.510.60.02 /usr/lib64/libnvidia-allocator.so -> libnvidia-allocator.so.1 /usr/lib64/libnvidia-allocator.so.1 -> libnvidia-allocator.so.510.60.02 /usr/lib64/libnvidia-allocator.so.510.60.02 /usr/lib64/libnvidia-cfg.so -> libnvidia-cfg.so.1 /usr/lib64/libnvidia-cfg.so.1 -> libnvidia-cfg.so.510.60.02 /usr/lib64/libnvidia-cfg.so.510.60.02 /usr/lib64/libnvidia-compiler-next.so.510.60.02 /usr/lib64/libnvidia-compiler.so.510.60.02 /usr/lib64/libnvidia-eglcore.so.510.60.02 /usr/lib64/libnvidia-encode.so -> libnvidia-encode.so.1 /usr/lib64/libnvidia-encode.so.1 -> libnvidia-encode.so.510.60.02 /usr/lib64/libnvidia-encode.so.510.60.02 /usr/lib64/libnvidia-fbc.so -> libnvidia-fbc.so.1 /usr/lib64/libnvidia-fbc.so.1 -> libnvidia-fbc.so.510.60.02 /usr/lib64/libnvidia-fbc.so.510.60.02 /usr/lib64/libnvidia-glcore.so.510.60.02 /usr/lib64/libnvidia-glsi.so.510.60.02 /usr/lib64/libnvidia-glvkspirv.so.510.60.02 /usr/lib64/libnvidia-gtk3.so.510.60.02 /usr/lib64/libnvidia-ml.so -> libnvidia-ml.so.1 /usr/lib64/libnvidia-ml.so.1 -> libnvidia-ml.so.510.60.02 /usr/lib64/libnvidia-ml.so.510.60.02 /usr/lib64/libnvidia-ngx.so.1 -> libnvidia-ngx.so.510.60.02 /usr/lib64/libnvidia-ngx.so.510.60.02 /usr/lib64/libnvidia-nvvm.so -> libnvidia-nvvm.so.4 /usr/lib64/libnvidia-nvvm.so.4 -> libnvidia-nvvm.so.4.0.0 /usr/lib64/libnvidia-nvvm.so.4.0.0 /usr/lib64/libnvidia-opencl.so.1 -> libnvidia-opencl.so.510.60.02 /usr/lib64/libnvidia-opencl.so.510.60.02 /usr/lib64/libnvidia-opticalflow.so -> libnvidia-opticalflow.so.1 /usr/lib64/libnvidia-opticalflow.so.1 -> libnvidia-opticalflow.so.510.60.02 /usr/lib64/libnvidia-opticalflow.so.510.60.02 /usr/lib64/libnvidia-ptxjitcompiler.so -> libnvidia-ptxjitcompiler.so.1 /usr/lib64/libnvidia-ptxjitcompiler.so.1 -> libnvidia-ptxjitcompiler.so.510.60.02 /usr/lib64/libnvidia-ptxjitcompiler.so.510.60.02 /usr/lib64/libnvidia-rtcore.so.510.60.02 /usr/lib64/libnvidia-tls.so.510.60.02 /usr/lib64/libnvidia-vulkan-producer.so -> libnvidia-vulkan-producer.so.510.60.02 /usr/lib64/libnvidia-vulkan-producer.so.510.60.02 /usr/lib64/libnvoptix.so.1 -> libnvoptix.so.510.60.02 /usr/lib64/libnvoptix.so.510.60.02 /usr/lib64/nvidia /usr/lib64/nvidia/wine /usr/lib64/nvidia/wine/_nvngx.dll /usr/lib64/nvidia/wine/nvngx.dll /usr/lib64/vdpau /usr/lib64/vdpau/libvdpau_nvidia.so -> libvdpau_nvidia.so.510.60.02 /usr/lib64/vdpau/libvdpau_nvidia.so.1 -> libvdpau_nvidia.so.510.60.02 /usr/lib64/vdpau/libvdpau_nvidia.so.510.60.02 /usr/lib64/xorg /usr/lib64/xorg/modules /usr/lib64/xorg/modules/drivers /usr/lib64/xorg/modules/drivers/nvidia_drv.so /usr/lib64/xorg/modules/extensions /usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so -> libglxserver_nvidia.so.510.60.02 /usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so.510.60.02 /usr/share /usr/share/X11 /usr/share/X11/xorg.conf.d /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass.conf /usr/share/applications /usr/share/applications/nvidia-settings.desktop /usr/share/dbus-1 /usr/share/dbus-1/system.d /usr/share/dbus-1/system.d/nvidia-dbus.conf /usr/share/doc /usr/share/doc/nvidia-drivers-510.60.02 /usr/share/doc/nvidia-drivers-510.60.02/FRAMELOCK.txt.bz2 /usr/share/doc/nvidia-drivers-510.60.02/NV-CONTROL-API.txt.bz2 /usr/share/doc/nvidia-drivers-510.60.02/NVIDIA_Changelog.bz2 /usr/share/doc/nvidia-drivers-510.60.02/README.gentoo.bz2 /usr/share/doc/nvidia-drivers-510.60.02/README.txt.bz2 /usr/share/doc/nvidia-drivers-510.60.02/html /usr/share/doc/nvidia-drivers-510.60.02/html/acknowledgements.html /usr/share/doc/nvidia-drivers-510.60.02/html/addressingcapabilities.html /usr/share/doc/nvidia-drivers-510.60.02/html/addtlresources.html /usr/share/doc/nvidia-drivers-510.60.02/html/appendices.html /usr/share/doc/nvidia-drivers-510.60.02/html/audiosupport.html /usr/share/doc/nvidia-drivers-510.60.02/html/commonproblems.html /usr/share/doc/nvidia-drivers-510.60.02/html/configlaptop.html /usr/share/doc/nvidia-drivers-510.60.02/html/configmultxscreens.html /usr/share/doc/nvidia-drivers-510.60.02/html/configtwinview.html /usr/share/doc/nvidia-drivers-510.60.02/html/depth30.html /usr/share/doc/nvidia-drivers-510.60.02/html/displaydevicenames.html /usr/share/doc/nvidia-drivers-510.60.02/html/dma_issues.html /usr/share/doc/nvidia-drivers-510.60.02/html/dpi.html /usr/share/doc/nvidia-drivers-510.60.02/html/dynamicboost.html /usr/share/doc/nvidia-drivers-510.60.02/html/dynamicpowermanagement.html /usr/share/doc/nvidia-drivers-510.60.02/html/editxconfig.html /usr/share/doc/nvidia-drivers-510.60.02/html/egpu.html /usr/share/doc/nvidia-drivers-510.60.02/html/faq.html /usr/share/doc/nvidia-drivers-510.60.02/html/flippingubb.html /usr/share/doc/nvidia-drivers-510.60.02/html/framelock.html /usr/share/doc/nvidia-drivers-510.60.02/html/gbm.html /usr/share/doc/nvidia-drivers-510.60.02/html/glxsupport.html /usr/share/doc/nvidia-drivers-510.60.02/html/gpunames.html /usr/share/doc/nvidia-drivers-510.60.02/html/gsp.html /usr/share/doc/nvidia-drivers-510.60.02/html/i2c.html /usr/share/doc/nvidia-drivers-510.60.02/html/index.html /usr/share/doc/nvidia-drivers-510.60.02/html/installationandconfiguration.html /usr/share/doc/nvidia-drivers-510.60.02/html/installdriver.html /usr/share/doc/nvidia-drivers-510.60.02/html/installedcomponents.html /usr/share/doc/nvidia-drivers-510.60.02/html/introduction.html /usr/share/doc/nvidia-drivers-510.60.02/html/kms.html /usr/share/doc/nvidia-drivers-510.60.02/html/knownissues.html /usr/share/doc/nvidia-drivers-510.60.02/html/minimumrequirements.html /usr/share/doc/nvidia-drivers-510.60.02/html/newusertips.html /usr/share/doc/nvidia-drivers-510.60.02/html/ngx.html /usr/share/doc/nvidia-drivers-510.60.02/html/nvidia-debugdump.html /usr/share/doc/nvidia-drivers-510.60.02/html/nvidia-ml.html /usr/share/doc/nvidia-drivers-510.60.02/html/nvidia-peermem.html /usr/share/doc/nvidia-drivers-510.60.02/html/nvidia-persistenced.html /usr/share/doc/nvidia-drivers-510.60.02/html/nvidia-smi.html /usr/share/doc/nvidia-drivers-510.60.02/html/nvidiasettings.html /usr/share/doc/nvidia-drivers-510.60.02/html/openglenvvariables.html /usr/share/doc/nvidia-drivers-510.60.02/html/optimus.html /usr/share/doc/nvidia-drivers-510.60.02/html/powermanagement.html /usr/share/doc/nvidia-drivers-510.60.02/html/primerenderoffload.html /usr/share/doc/nvidia-drivers-510.60.02/html/procinterface.html /usr/share/doc/nvidia-drivers-510.60.02/html/profiles.html /usr/share/doc/nvidia-drivers-510.60.02/html/programmingmodes.html /usr/share/doc/nvidia-drivers-510.60.02/html/randr14.html /usr/share/doc/nvidia-drivers-510.60.02/html/retpoline.html /usr/share/doc/nvidia-drivers-510.60.02/html/selectdriver.html /usr/share/doc/nvidia-drivers-510.60.02/html/sli.html /usr/share/doc/nvidia-drivers-510.60.02/html/supportedchips.html /usr/share/doc/nvidia-drivers-510.60.02/html/vdpausupport.html /usr/share/doc/nvidia-drivers-510.60.02/html/xcompositeextension.html /usr/share/doc/nvidia-drivers-510.60.02/html/xconfigoptions.html /usr/share/doc/nvidia-drivers-510.60.02/html/xineramaglx.html /usr/share/doc/nvidia-drivers-510.60.02/html/xrandrextension.html /usr/share/doc/nvidia-drivers-510.60.02/html/xwayland.html /usr/share/doc/nvidia-drivers-510.60.02/supported-gpus.json.bz2 /usr/share/glvnd /usr/share/glvnd/egl_vendor.d /usr/share/glvnd/egl_vendor.d/10_nvidia.json /usr/share/man /usr/share/man/man1 /usr/share/man/man1/nvidia-cuda-mps-control.1.bz2 /usr/share/man/man1/nvidia-modprobe.1.bz2 /usr/share/man/man1/nvidia-settings.1.bz2 /usr/share/man/man1/nvidia-smi.1.bz2 /usr/share/man/man1/nvidia-xconfig.1.bz2 /usr/share/nvidia /usr/share/nvidia/nvidia-application-profiles-510.60.02-key-documentation /usr/share/nvidia/nvidia-application-profiles-510.60.02-rc /usr/share/pixmaps /usr/share/pixmaps/nvidia-settings.png /usr/share/vulkan /usr/share/vulkan/icd.d /usr/share/vulkan/icd.d/nvidia_icd.json /usr/share/vulkan/implicit_layer.d /usr/share/vulkan/implicit_layer.d/nvidia_layers.json
Obviously if you remove the USE flag and install it unconditionally, they'll always be installed. I think you're asking "why not remove the flag and always install these?"
(In reply to Sam James from comment #10) > Obviously if you remove the USE flag and install it unconditionally, they'll > always be installed. > > I think you're asking "why not remove the flag and always install these?" yes correct
(In reply to Andrea Postiglione from comment #11) > > I think you're asking "why not remove the flag and always install these?" > > yes correct To clarify, you mean the static-lib and headers, and not just the headers, right? Again, the headers are useless on their own. We typically don't install static libraries without USE=static-libs
(In reply to Ionen Wolkens from comment #12) > (In reply to Andrea Postiglione from comment #11) > > > I think you're asking "why not remove the flag and always install these?" > > > > yes correct > To clarify, you mean the static-lib and headers, and not just the headers, > right? Again, the headers are useless on their own. > > We typically don't install static libraries without USE=static-libs ok right not to install the static archives but the headers?
(In reply to Andrea Postiglione from comment #13) > (In reply to Ionen Wolkens from comment #12) > > (In reply to Andrea Postiglione from comment #11) > > > > I think you're asking "why not remove the flag and always install these?" > > > > > > yes correct > > To clarify, you mean the static-lib and headers, and not just the headers, > > right? Again, the headers are useless on their own. > > > > We typically don't install static libraries without USE=static-libs > > ok right not to install the static archives but the headers? i think headers might be useful to other applications without necessarily building in static mode
and in any case there are libraries like clang or others that install static archive even if they are build shared
Again, the headers are /not/ useful without the static archive that USE=static-libs is installing. Installing /just/ the headers does /not/ allow hwloc to build with VIDEO_CARDS=nvidia. You'll get: checking for NVCtrl/NVCtrl.h... yes (header is found) checking for XNVCTRLQueryTargetAttribute in -lXNVCtrl... no (static archive is missing) configure: WARNING: Specified --enable-gl switch, but could not configure: WARNING: find appropriate support configure: error: Cannot continue (failed) In the test where you removed the condition, you still installed the static archive through: dolib.a nvidia-settings/src/out/libXNVCtrl.a So it was the equivalent of having USE=static-libs enabled (note that it'd also fail if you had USE="-tools -static-libs" because the library wouldn't have been built at all).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3baa0907a981c1d0046451668e6b9d8c316d86e commit c3baa0907a981c1d0046451668e6b9d8c316d86e Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2022-03-28 15:56:01 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2022-03-28 16:11:15 +0000 x11-drivers/nvidia-drivers: enable static-libs USE by default Now that hwloc depends on this by "default" when VIDEO_CARDS=nvidia, not being enabled by default tend to be an annoyance. This only has a cheap build-only dependency on libX11/Xext, is tiny, and doesn't take long to build. Only makes some sense to disable if wayland-only or headless without X (albeit this is why the USE exists and isn't unconditional, /could/ be merged with USE=X although that USE has more implications.. may revisit later). Bug: https://bugs.gentoo.org/836004 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild | 2 +- x11-drivers/nvidia-drivers/nvidia-drivers-470.103.01.ebuild | 2 +- x11-drivers/nvidia-drivers/nvidia-drivers-470.62.22.ebuild | 2 +- x11-drivers/nvidia-drivers/nvidia-drivers-510.54.ebuild | 2 +- x11-drivers/nvidia-drivers/nvidia-drivers-510.60.02.ebuild | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63f362ef20a72c4404ee107be5e58e29f4d52499 commit 63f362ef20a72c4404ee107be5e58e29f4d52499 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2022-03-28 15:11:09 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2022-03-28 16:10:14 +0000 x11-drivers/nvidia-drivers: set description for static-libs It may have been better to be USE=nvctrl or merged with USE=X, but let's at least provide a description so it's clearer what it's for. Bug: https://bugs.gentoo.org/836004 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> x11-drivers/nvidia-drivers/metadata.xml | 1 + 1 file changed, 1 insertion(+)