canonical / nvidia-graphics-drivers

Packaging scripts for nvidia-graphics-drivers in Ubuntu
43 stars 34 forks source link

#include <stdarg.h> missing in 418.113 #46

Closed blastwave closed 8 months ago

blastwave commented 2 years ago

Similar to ( exact same as ? ) issue 44 where I say :+1:


It is not at all clear how to fix this problem with something like 418.113 where
upon --extract of the "run" file there is no stdarg type file anywhere in the
extracted contents. I do see that linux-5.16.12 provides include/linux/stdarg.h in
the source tree however what does one do with that in the NVidia sources?
This problem is poorly documented.

Any attempt to build the NVidia driver fails with : 

make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz5056/NVIDIA-Linux-x86_64-418.113/kernel/nvidia/nv-memdbg.o] Error 1
make[2]: *** [scripts/Makefile.build:287: /tmp/selfgz5056/NVIDIA-Linux-x86_64-418.113/kernel/nvidia/nv-ibmnpu.o] Error 1
In file included from /tmp/selfgz5056/NVIDIA-Linux-x86_64-418.113/kernel/common/inc/nv-linux.h:16,
                 from /tmp/selfgz5056/NVIDIA-Linux-x86_64-418.113/kernel/nvidia/nv-report-err.c:24:
/tmp/selfgz5056/NVIDIA-Linux-x86_64-418.113/kernel/common/inc/nv.h:23:10: fatal error: stdarg.h: No such file or directory
   23 | #include <stdarg.h>
      |          ^~~~~~~~~~
compilation terminated.

In many places.
blastwave commented 2 years ago

perhaps something like :


#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
#include <stdarg.h>
#else
#include <linux/stdarg.h>
#endif