Created attachment 452278 [details] build.log Fresh install of nvidia-drivers-375.10 fails with the following error: x86_64-pc-linux-gnu-gcc -O2 -pipe -fno-strict-aliasing -fno-omit-frame-pointer -Wformat=2 -Wno-unused-parameter -Wno-format-zero-length -DNV_LINUX -DNV_X86_64 -DNV_ARCH_BITS=64 -I /usr/include/nvidia/gdk -I . -I image_data -I libXNVCtrl -I XF86Config-parser/.. -I libXNVCtrlAttributes -I xpm_data -I common-utils -I common-unix/virtual-resolutions -I _out/Linux_x86_64 -I /usr/include -DPROGRAM_NAME=\"nvidia-settings\" -Wl,-O1 -Wl,--as-needed -L/usr/X11R6/lib64 \ -rdynamic -o _out/Linux_x86_64/nvidia-settings.unstripped _out/Linux_x86_64/command-line.o _out/Linux_x86_64/config-file.o _out/Linux_x86_64/lscf.o _out/Linux_x86_64/nvidia-settings.o _out/Linux_x86_64/parse.o _out/Linux_x86_64/query-assign.o _out/Linux_x86_64/app-profiles.o _out/Linux_x86_64/glxinfo.o _out/Linux_x86_64/NvCtrlAttributes.o _out/Linux_x86_64/NvCtrlAttributesNvControl.o _out/Linux_x86_64/NvCtrlAttributesVidMode.o _out/Linux_x86_64/NvCtrlAttributesXv.o _out/Linux_x86_64/NvCtrlAttributesGlx.o _out/Linux_x86_64/NvCtrlAttributesXrandr.o _out/Linux_x86_64/NvCtrlAttributesUtils.o _out/Linux_x86_64/NvCtrlAttributesNvml.o _out/Linux_x86_64/nvgetopt.o _out/Linux_x86_64/common-utils.o _out/Linux_x86_64/msg.o _out/Linux_x86_64/nvvr.o _out/Linux_x86_64/g_stamp.o libXNVCtrl/libXNVCtrl.a -L../../ -lnvidia-ml -lXxf86vm -ljansson -lX11 -lXext -lm -ldl /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnvidia-ml collect2: error: ld returned 1 exit status make: *** [Makefile:287: _out/Linux_x86_64/nvidia-settings.unstripped] Error 1 make: Leaving directory '/var/tmp/portage/x11-drivers/nvidia-drivers-375.10/work/nvidia-settings-375.10/src' * ERROR: x11-drivers/nvidia-drivers-375.10::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-375.10::gentoo'`, * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-375.10::gentoo'`. * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-375.10/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-375.10/temp/environment'. * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-375.10/work' * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-375.10/work/' As a workaround one can build without tools first: USE="-tools" emerge -1 nvidia-drivers Then building with tools comples fine as expected: USE="tools" emerge -1 nvidia-drivers
Created attachment 452280 [details] emerge --info
Do we need to add the associated patch as well perhaps?? https://github.com/NVIDIA/nvidia-settings/commit/168e17f53098254b4a5ab93eeb2f23c80ca1d97f See: https://devtalk.nvidia.com/default/topic/974286/linux/nvidia-settings-375-10-libxnvctrlattributes-nvctrlattributesnvml-c-36-18-fatal-error-nvml-h-no-such-file-or-directory/
Created attachment 452396 [details, diff] Patch for x11-drivers/nvidia-drivers-375.10-r1 This works for me.
(In reply to David Haller from comment #3) > Created attachment 452396 [details, diff] [details, diff] > Patch for x11-drivers/nvidia-drivers-375.10-r1 > > This works for me. Same here. I guess it didn't fail for jer because he had an installed libnvidia-ml.so for it to link against.
(In reply to Zac Medico from comment #4) > I guess it didn't fail for jer because he had an installed > libnvidia-ml.so for it to link against. No.
This happens because no library symlinks are in place.
Comment on attachment 452396 [details, diff] Patch for x11-drivers/nvidia-drivers-375.10-r1 >diff -urN a/nvidia-drivers-375.10-r1.ebuild b/nvidia-drivers-375.10-r1.ebuild >--- a/nvidia-drivers-375.10-r1.ebuild 2016-11-04 21:57:32.523464933 +0100 >+++ b/nvidia-drivers-375.10-r1.ebuild 2016-11-04 21:57:50.047464833 +0100 >@@ -176,6 +176,7 @@ > if use tools; then > cp "${DISTDIR}"/nvml.h-${PV} "${S}"/nvidia-settings-${PV}/src/nvml.h || die > sed -i -e 's|-lnvidia-ml|-L../../ &|g' nvidia-settings-${PV}/src/Makefile || die >+ ln -sf libnvidia-ml.so.${PV} libnvidia-ml.so That doesn't fix the 32/libnvidia-ml.so case.
Please try again with -r1. commit 38279d34de57f768e1bcc79a264f5b096059e734 Author: Jeroen Roovers <jer@gentoo.org> Date: Fri Nov 11 10:39:57 2016 +0100 x11-drivers/nvidia-drivers: Set up libnvidia-ml.so symlinks (bug #598874). Package-Manager: portage-2.3.2
375.10-r1 works for me now. Thanks!
(In reply to Jeroen Roovers from comment #8) > Please try again with -r1. > > commit 38279d34de57f768e1bcc79a264f5b096059e734 Please, do proper patch handling. Your patch (see below) looks good, but overwriting -r1 is bad! I had to reconstruct the old -r1 from my local overlay... ==== saved nvidia-drivers-375.10-r1.ebuild vs. current (with diff -U4) ==== diff -U4 a/nvidia-drivers-375.10-r1.ebuild b/nvidia-drivers-375.10-r1.ebuild @@ -174,8 +174,16 @@ src_prepare() { if use tools; then cp "${DISTDIR}"/nvml.h-${PV} "${S}"/nvidia-settings-${PV}/src/nvml.h || die + + ln -s libnvidia-ml.so.${PV} libnvidia-ml.so || die + if use multilib; then + pushd 32/ 2>/dev/null || die + ln -s libnvidia-ml.so.${PV} libnvidia-ml.so || die + popd 2>/dev/null || die + fi + sed -i -e "s|-lnvidia-ml|-L../../ &|g" nvidia-settings-${PV}/src/Makefile || die fi eapply "${FILESDIR}"/${P}-profiles-rc.patch ==== Will that work on 32bit non-multilib hosts??? Also, I'd propose a slightly different patch: ==== a/nvidia-drivers-375.10-r1.ebuild b/nvidia-drivers-375.10-r1.ebuild @@ -176,6 +176,8 @@ if use tools; then cp "${DISTDIR}"/nvml.h-${PV} "${S}"/nvidia-settings-${PV}/src/nvml.h || die sed -i -e "s|-lnvidia-ml|-L../../ &|g" nvidia-settings-${PV}/src/Makefile || die + ln -s libnvidia-ml.so.${PV} libnvidia-ml.so || die + test -d 32 && ln -sf libnvidia-ml.so.${PV} 32/libnvidia-ml.so fi eapply "${FILESDIR}"/${P}-profiles-rc.patch ==== (does the 32/ subdir exists in all 64bit builds? Anyway the symlink is relative, thus it'll point to the 32/libnvidia-ml.so.${PV} lib and the 'test' catches it missing (on 32bit?)). Anyway: the real reason for the build failure was the missing libnvidia-ml.so symlink to the actual lib. So, please do credit me in your patches / Changelog entries! Pinning the problem (what/where and why) down is often much harder than the actual fix. Of course, ultimately nvidia should fix their build.
(In reply to David Haller from comment #10) > (In reply to Jeroen Roovers from comment #8) > > Please try again with -r1. > > > > commit 38279d34de57f768e1bcc79a264f5b096059e734 > > Please, do proper patch handling. Your patch (see below) looks good, but > overwriting -r1 is bad! I have no idea why that would be bad. The Gentoo revision wasn't changed because the commit fixed a build failure. > I had to reconstruct the old -r1 from my local overlay... Blame git?
(In reply to Zac Medico from comment #9) > 375.10-r1 works for me now. Thanks! Thanks.