You are not logged in.
nvidia-390xx-dkms fails to compile on 6.8.9-arch1-2 and 6.6.30-1-lts kernels
Last edited by bostjan (2024-05-09 11:38:23)
Offline
Same error with nvidia-470xx-dkms on 6.8.9-arch1-2
Offline
https://forums.developer.nvidia.com/t/n … -up/279072
https://github.com/NVIDIA/open-gpu-kern … 4b36f13dd5
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
index 093704c..a9db899 100755
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -153,7 +153,8 @@ test_headers() {
build_cflags() {
BASE_CFLAGS="-O2 -D__KERNEL__ \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
--nostdinc -isystem $ISYSTEM"
+-nostdinc -isystem $ISYSTEM \
+-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types"
if [ "$OUTPUT" != "$SOURCES" ]; then
OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
Offline
How to apply this ? Am not a dev so no clue
Offline
Offline
copy the diff loqs posted to a textfile and give it a meaningful name, say gcc14.patch
put gcc14.patch in the folder you build nvidia-390xx-utils from , add it to the source= array of the PKGBUILD and regenerate checksums.
Then add a command to prepare() to apply the patch and test if it builds .
ADDED: For more info follow the link posted by loqs just above this post.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I use 470xx Drivers but ok.. Or downgrade to GCC 13.2.1 n wait it out lol..
Offline
I can confirm that the patch above works. Thanks!
Offline
Thanks, patch is working and pretty easy to install.
Offline
Patch for nvidia-470xx-dkms
--- a/kernel/conftest.sh 2024-05-09 15:36:56.531998145 +0200
+++ b/kernel/conftest.sh 2024-05-09 15:38:08.555897819 +0200
@@ -101,7 +101,8 @@
build_cflags() {
BASE_CFLAGS="-O2 -D__KERNEL__ \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
--nostdinc -isystem $ISYSTEM"
+-nostdinc -isystem $ISYSTEM \
+-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types"
if [ "$OUTPUT" != "$SOURCES" ]; then
OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
Offline
https://forums.developer.nvidia.com/t/n … -up/279072
https://github.com/NVIDIA/open-gpu-kern … 4b36f13dd5diff --git a/kernel/conftest.sh b/kernel/conftest.sh index 093704c..a9db899 100755 --- a/kernel/conftest.sh +++ b/kernel/conftest.sh @@ -153,7 +153,8 @@ test_headers() { build_cflags() { BASE_CFLAGS="-O2 -D__KERNEL__ \ -DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \ --nostdinc -isystem $ISYSTEM" +-nostdinc -isystem $ISYSTEM \ +-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types" if [ "$OUTPUT" != "$SOURCES" ]; then OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
It works for me, too. Thanks.
Offline
Worked for me on 390.157
Offline
Do I have to do this on every DKMS update?
Last edited by twilight0 (2024-05-10 18:58:30)
Proud Arch Linux user since 2007.
Offline
Do I have to do this on every DKMS update?
No.
Offline
I am confused as to which procedure and which package I should patch. Do I have to use ABS? I haven't used ABS since 2011 for crying out loud.
Proud Arch Linux user since 2007.
Offline
nvidia-390xx* is a split package, you can add the patch to its PKGBUILD or just fix kernel/conftest.sh (even manually. with vim) after the build failure and rebuild w/ "makepkg -e"
And since it's an AUR package you don't need to use ABS either. Or rather you can't.
Offline
I am struggling. Build still fails with "makepkg -e" Can't we just include the patch in the AUR package by default for seamless updates?
Proud Arch Linux user since 2007.
Offline
"We" cannot.
The package maintainer can and probably will at some point.
"makepkg -e" doesn't fix the problem, it just prevents the sources from being overwritten after you edited the file.
Offline
The package maintainer can and probably will at some point.
That may be delayed by the maintainer now having 'a more proper patch' to review as well, quotes as changing the build flags for every unit instead of just the broken conftest.sh makes no sense to me and Nvidia itself is not using `-fpermissive`.
Offline
The porting guide nowhere "recommends" to use fpermissive but hints it for
Sources that cannot be ported to standard C
and offers
Alternatively, individual errors can be downgraded to warnings using the relevant -Wno-error=… option, or disabled completely with -Wno-….
The only "more proper" patch is to fix up nvidia's code (some extern's might do)
Offline
"makepkg -e" doesn't fix the problem, it just prevents the sources from being overwritten after you edited the file.
I tried building the package with the gcc14.patch and I am getting error at line 139 "cd NVIDIA.... (yadayada) No such file or directory"
Of course I added the checksum, the patch itself and the extra line at prepare() section
Proud Arch Linux user since 2007.
Offline
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
Post the actual PKGBUILD you created and the actual error/build log.
If you tried to run "makepkg -e" as first run with just a patched PKGBUILD and no downloaded sources, that's wrong.
In that case just run a regular "makepkg"
Offline
Hey @twililight0 I suspect I know what your issue may have been as I have had a similar one and just solved it.
The PKGFILE of 470xx first does
cd kernel
and then applies the patches.
Which makes the patch not possible to apply if you just add it at the same place as the given patch in this topic is kernel/conftest.sh.
Either rename the patch file or move it before the cd.
Last edited by lefteris (2024-05-12 09:13:19)
Offline
copy the diff loqs posted to a textfile and give it a meaningful name, say gcc14.patch
put gcc14.patch in the folder you build nvidia-390xx-utils from , add it to the source= array of the PKGBUILD and regenerate checksums.
Then add a command to prepare() to apply the patch and test if it builds .
ADDED: For more info follow the link posted by loqs just above this post.
When editing prepare() how to know the right directory to cd into and the correct path for the input argument of the patch command?
Offline
For anyone needing more detailed instructions for the nvidia-470xx-* packages:
- Locate the directory the nvidia-470xx-utils package gets built in. I use trizen, so my directory was ~/.cache/trizen/nvidia-470xx-utils/
- Create the file gcc14.patch with the contents:
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
index 093704c..a9db899 100755
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -153,7 +153,8 @@ test_headers() {
build_cflags() {
BASE_CFLAGS="-O2 -D__KERNEL__ \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
--nostdinc -isystem $ISYSTEM"
+-nostdinc -isystem $ISYSTEM \
+-Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-incompatible-pointer-types"
if [ "$OUTPUT" != "$SOURCES" ]; then
OUTPUT_CFLAGS="-I$OUTPUT/include2 -I$OUTPUT/include"
- Get the checksum of your file with "sha512sum gcc14.patch"
- Edit the PKGBUILD file to make these changes:
- Add "gcc14.patch" to the source section
- Add the checksum you got above to the sha512sums section
- Add this line in the prepare() section:
patch -Np2 -i "../../gcc14.patch"
Then run "makepkg -fi" to build and install the -utils, opencl, and -dkms packages.
The arguments to the patch command were different than the others, which was throwing me off.
Offline