New: nvidia-driver package fails to build
https://bugs.busybox.net/show_bug.cgi?id=14856
Bug ID: 14856
Summary: nvidia-driver package fails to build
Product: buildroot
Version: 2022.05
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]Target Milestone: ---
Created attachment 9326
--> https://bugs.busybox.net/attachment.cgi?id=9326&action=edit
config files
I an trying to build a system with kernel 5.15.44-rt46 to use openCl on an nvidia graphics card. If I enable Target packages->Hardware handling->nvidia-driver I get the following build error:
Quoted 1 line
Quoted 1 line
Quoted 1 line
linux 5.15.44 Installing to images directory
/usr/bin/install -m 0644 -D /home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/linux-5.15.44/arch/x86/boot/bzImage /home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/images/bzImage
touch /home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/linux-5.15.44/.stamp_images_installed touch /home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/linux-5.15.44/.stamp_installed
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
nvidia-driver 390.132 Building
nvidia-driver 390.132 Building kernel module(s)
PATH="/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/bin:/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/sbin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/ian/bin" PKG_CONFIG="/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/bin/pkg-config"
PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/lib/pkgconfig:/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/share/pkgconfig" BR_BINARIES_DIR=/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/images
KCFLAGS=-Wno-attribute-alias /usr/bin/make -j17 -C/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/linux-5.15.44
HOSTCC="/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/bin/ccache/usr/lib64/ccache/gcc -O2
-I/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/include
-L/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/lib
-Wl,-rpath,/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/lib"
ARCH=x86_64
INSTALL_MOD_PATH=/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/target
CROSS_COMPILE="/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/bin/x86_64-WatersAMST-linux-gnu-"
WERROR=0
DEPMOD=/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/host/sbin/depmod
NV_KERNEL_SOURCES="/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/linux-5.15.44"
NV_KERNEL_OUTPUT="/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/linux-5.15.44"
NV_KERNEL_MODULES="nvidia nvidia-modeset nvidia-drm nvidia-uvm"
PWD=/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/nvidia-driver-390.132/kernel
M=/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/nvidia-driver-390.132/kernel
modules
make[2]: Entering directory
'/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/linux-5.15.44'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
\
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are
missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix
it."; \
echo >&2 ; \/bin/false)/usr/bin/make -f ./scripts/Makefile.build obj=/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/nvidia-driver-390.132/kernel \
single-build= \
need-builtin=1 need-modorder=1
Compiler version check failed:
The major and minor number of the compiler used to compile the kernel:
x86_64-WatersAMST-linux-gnu-gcc.br_real (Buildroot 2022.05) 9.4.0, GNU ld (GNU Binutils) 2.37
does not match the compiler used here:
x86_64-WatersAMST-linux-gnu-gcc.br_real (Buildroot 2022.05) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
It is recommended to set the CC environment variable to the compiler that was used to compile the kernel.
The compiler version check can be disabled by setting the IGNORE_CC_MISMATCH environment variable to "1". However, mixing compiler versions between the kernel and kernel modules can result in subtle bugs that are difficult to diagnose.
*** Failed CC version check. Bailing out! ***
make[3]: *** [/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/nvidia-driver-390.132/kernel/Kbuild:189:cc_version_check] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:1868:/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/nvidia-driver-390.132/kernel] Error 2
make[2]: Leaving directory '/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/linux-5.15.44'
make[1]: *** [package/pkg-generic.mk:294:/home/ian/build/amst-hiwire-linux-8009b251-x86_64/buildroot/build/nvidia-driver-390.132/.stamp_built] Error 2
make[1]: Leaving directory
'/home/ian/projects/amst-hiwire-linux/source/buildroot'
make: *** [Makefile:616: buildroot] Error 2
My development system is Fedora 36 GNU/Linux 5.18.5-200.fc36.x86_64
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14856] nvidia-driver package fails to build
https://bugs.busybox.net/show_bug.cgi?id=14856
--- Comment #1 from Dr I J Ormshaw <[email protected]> --- I get the same issue with gcc 9, 10, and 11
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14856] nvidia-driver package fails to build
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14856
--- Comment #2 from Dr I J Ormshaw <[email protected]> --- Created attachment 9331
--> https://bugs.busybox.net/attachment.cgi?id=9331&action=edit
Fedora 35 build log
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14856] nvidia-driver package fails to build
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14856
--- Comment #3 from Vincent Fazio <[email protected]> --- Pretty sure the CC error may be addressed by
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
version 390.151 has been released which adds support up to 5.17rc, the 390.132 package I think only technically supports through 5.4
I can resubmit my patch with the version bump and kick off a build to make sure it at least compiles OK but I don't have the bandwidth to do actual hardware testing at the moment.
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14856] nvidia-driver package fails to build
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14856
--- Comment #4 from Vincent Fazio <[email protected]> --- hopefully fixed by
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14856] nvidia-driver package fails to build
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14856
--- Comment #5 from Dr I J Ormshaw <[email protected]> ---
I am still not able to compile the drivers. It would appear from
https://gist.github.com/joanbm/144a965c36fc1dc0d1f1b9be3438a368. That the patch you have applied only works for 5.10 -> 5.13 and the build breaks again from 5.14 on.
In file included from ../nvidia-driver-390.144/kernel/common/inc/os-interface.h:27,
from ../nvidia-driver-390.144/kernel/nvidia/nv-procfs.c:14:
../../host/lib/gcc/x86_64-WatersAMST-linux-gnu/11.3.0/include/stdarg.h:52:
note: this is the location of the previous definition
52 | #define va_copy(d,s) __builtin_va_copy(d,s)
| ../nvidia-driver-390.144/kernel/nvidia-drm/nvidia-drm-drv.c: In function ‘nv_drm_register_drm_device’:../nvidia-driver-390.144/kernel/nvidia-drm/nvidia-drm-drv.c:814:10: error:
‘struct drm_device’ has no member named ‘pdev’; did you mean ‘dev’?
814 | dev->pdev = pdev;
| ^~~~
| devmake[3]: *** [scripts/Makefile.build:288:/home/ian/build/amst-hiwire-linux-9297fa84-x86_64/buildroot/build/nvidia-driver-390.144/kernel/nvidia-drm/nvidia-drm-drv.o] Error 1../nvidia-driver-390.144/kernel/nvidia/nvlink_linux.c: In function
‘nvlink_sleep’:../nvidia-driver-390.144/kernel/nvidia/nvlink_linux.c:600:18: error: ‘struct
task_struct’ has no member named ‘state’; did you mean ‘__state’?
600 | current->state = TASK_INTERRUPTIBLE;
| ^~~~~
| __statemake[3]: *** [scripts/Makefile.build:288:/home/ian/build/amst-hiwire-linux-9297fa84-x86_64/buildroot/build/nvidia-driver-390.144/kernel/nvidia/nvlink_linux.o] Error 1
make[2]: *** [Makefile:1868:/home/ian/build/amst-hiwire-linux-9297fa84-x86_64/buildroot/build/nvidia-driver-390.144/kernel] Error 2
make[2]: Leaving directory '/home/ian/build/amst-hiwire-linux-9297fa84-x86_64/buildroot/build/linux-5.15.44'
make[1]: *** [package/pkg-generic.mk:294:/home/ian/build/amst-hiwire-linux-9297fa84-x86_64/buildroot/build/nvidia-driver-390.144/.stamp_built] Error 2
make[1]: Leaving directory
'/home/ian/projects/amst-hiwire-linux/source/buildroot'
make: *** [Makefile:616: buildroot] Error 2
The no cc check patch works as expected on Fedora 36
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14856] nvidia-driver package fails to build
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14856
--- Comment #6 from Dr I J Ormshaw <[email protected]> --- Created attachment 9336
--> https://bugs.busybox.net/attachment.cgi?id=9336&action=edit
source tree patch
I've applied this patch to the source tree and it now build for me on my system.
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14856] nvidia-driver package fails to build
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14856
--- Comment #7 from Vincent Fazio <[email protected]> --- I've submitted
https://patchwork.ozlabs.org/project/buildroot/list/?series=305651
Which uses the upstream 390.151 package. I was able to successfully compile the driver using the vanilla 5.17 kernel
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14856] nvidia-driver package fails to build
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14856
--- Comment #8 from Dr I J Ormshaw <[email protected]> --- Thanks,
Compiles with my realtime 5.15 kernel too.
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
[Buildroot] [Bug 14856] nvidia-driver package fails to build
In reply to [email protected]https://bugs.busybox.net/show_bug.cgi?id=14856
Yann E. MORIN <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |MOVED
Status|NEW |RESOLVED
CC| |[email protected]--- Comment #9 from Yann E. MORIN <[email protected]> --- Thank you for your report.
The issue tracker for the Buildroot project has been moved to the Gitlab.com issue tracker:
https://gitlab.com/buildroot.org/buildroot/-/issues
We are taking this opportunity to close old issues in this old tracker. If you believe your issue is still relevant, please open one in the new issue tracker.
Thank you!
Signature · 6 lines
You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot