I receive a strange error when building:
make[1]: Entering directory '/var/cache/private/pikaur/build/nvidia-390xx-settings/src/nvidia-settings-390.157/doc'
HOST_CC ../src/gen-manpage-opts.c
HOST_CC ../src/common-utils/gen-manpage-opts-helper.c
HOST_LINK var/cache/private/pikaur/build/nvidia-390xx-settings/src/nvidia-settings-390.157/doc/_out/Linux_x86_64/gen-manpage-opts
M4 nvidia-settings.1.m4
/bin/sh: line 2: m4: command not found
make[1]: *** [Makefile:108: _out/Linux_x86_64/nvidia-settings.1] Error 127
make[1]: *** Deleting file '_out/Linux_x86_64/nvidia-settings.1'
make[1]: Leaving directory '/var/cache/private/pikaur/build/nvidia-390xx-settings/src/nvidia-settings-390.157/doc'
make: *** [Makefile:25: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4
Service runtime: 2min 12.290s
CPU time consumed: 1min 45.020s
I have the following gcc installed:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/12.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.1 20230201 (GCC)
==> Starting build()...
make[1]: Entering directory '/home/friday13/.cache/yay/nvidia-390xx-settings/src/nvidia-settings-390.157/src'
CC command-line.c
CC config-file.c
In file included from /usr/include/errno.h:28,
from config-file.c:40:
/usr/include/bits/errno.h:26:11: fatal error: linux/errno.h: No such file or directory
26 | # include <linux/errno.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:318: _out/Linux_x86_64/config-file.o] Error 1
make[1]: Leaving directory '/home/friday13/.cache/yay/nvidia-390xx-settings/src/nvidia-settings-390.157/src'
make: *** [Makefile:23: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
-> error making: nvidia-390xx-settings
@jonathon please add provides=('libXNVCtrl.so') to libxnvctrl-390xx package. Without it it's impossible i.e. to install conky. It tries to replace libxnvctrl-390xx with libxnvctrl package but nvidia-390xx-settings depends on libxnvctrl-390xx and installation fails.
PACKAGE NEEDS LONG TERM MAINTAINER
I have adopted the 390xx packages to keep them secure. I do not run any 390xx hardware so will not notice any breakages and cannot test any changes.
Until such time as someone else steps up to maintain these packages - ideally someone who actually has 390xx hardware - I have to rely on you to tell me what changes are needed.
Don't expect a response if you post only "this doesn't work", and do not email me to complain about the package not working!
Use this forum thread for discussion: https://bbs.archlinux.org/viewtopic.php?pid=1946926
A binary package is also available in my kernel-lts unofficial user repository.
Would it be possible to make 32bit version of this package? Mangohud needs it for 32 bit games.
So I'm nto the only one that has found this problem with ctkvdpau.h in that nvidia-setting release (VDPAUDeviceFunctions) struct needs to be moved to .c file and made static. Covered here: https://github.com/NVIDIA/nvidia-settings/commit/a7c1f5fce6303a643fadff7d85d59934bd0cf6b6
applying a patch for this commit will solve the problem.
i.e do as follows:
git clone nvidia-settings
grab the relevant patch
git format-patch -1 a7c1f5fce6303a643fadff7d85d59934bd0cf6b6 > patchforctkvdpau.patch
apply the patch to the tarball in
~/.cache/yay/nvidia-390xx-settings
then makepkg and pacman -U the xz file to install.
/usr/bin/ld: _out/Linux_x86_64/gtk2/ctkvdpau.o:(.bss+0x0): multiple definition of `VDPAUDeviceFunctions'; _out/Linux_x86_64/gtk2/ctkwindow.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:300: _out/Linux_x86_64/libnvidia-gtk2.so.unstripped] Error 1
rm _out/Linux_x86_64/nvidia-settings.unstripped
make[1]: Leaving directory '/home/friday13/.cache/yay/nvidia-390xx-settings/src/nvidia-settings-390.132/src'
make: *** [Makefile:23: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
error making: %!s(func() string=0x73a700
the culprit to the breakage is gcc 10 uses -fno-common to exploit a bug in nvidia-settings. it has been fixed on github repo, but i don't know if they repackage the archive needed in the PKGBUILD.I just got it to work by using the method I described in the update below.
update -->
looks like adding -fcommon to CFLAGS in /etc/makepkg.conf let's you compile the package and you should be able to install it even with gcc10.
Heh, no clue on how to fix this.
If anyone knows let me know. I can apply the patch submitted or transfer the ownership of the package.