nvidia kernel module failed to build [error: ‘struct file’ has no member named ‘f_dentry’]

Bug #1409190 reported by J.D.
362
This bug affects 68 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-304 (Ubuntu)
Fix Released
Undecided
Unassigned
nvidia-graphics-drivers-304-updates (Ubuntu)
Fix Released
Undecided
Unassigned
nvidia-graphics-drivers-331-updates (Ubuntu)
Confirmed
Undecided
Unassigned
nvidia-graphics-drivers-346 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Trying to update to newer kernel, received

Setting up linux-image-3.19.0-031900rc3-lowlatency (3.19.0-031900rc3.201501060135) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-031900rc3-lowlatency /boot/vmlinuz-3.19.0-031900rc3-lowlatency
run-parts: executing /etc/kernel/postinst.d/dkms 3.19.0-031900rc3-lowlatency /boot/vmlinuz-3.19.0-031900rc3-lowlatency
Error! Bad return status for module build on kernel: 3.19.0-031900rc3-lowlatency (i686)
Consult /var/lib/dkms/nvidia-331-updates-uvm/331.113/build/make.log for more information.
Error! Bad return status for module build on kernel: 3.19.0-031900rc3-lowlatency (i686)
Consult /var/lib/dkms/nvidia-331-updates/331.113/build/make.log for more information.

That log file:

DKMS make.log for nvidia-331-updates-331.113 for kernel 3.19.0-031900rc3-lowlatency (i686)
Fri Jan 9 18:43:18 PST 2015
NVIDIA: calling KBUILD...
make[1]: Entering directory `/usr/src/linux-headers-3.19.0-031900rc3-lowlatency'
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)
mkdir -p /var/lib/dkms/nvidia-331-updates/331.113/build/.tmp_versions ; rm -f /var/lib/dkms/nvidia-331-updates/331.113/build/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia-331-updates/331.113/build
  cc -Wp,-MD,/var/lib/dkms/nvidia-331-updates/331.113/build/.nv.o.d -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/4.8/include -I./arch/x86/include -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -DNV_MODULE_INSTANCE=0 -DNV_BUILD_MODULE_INSTANCES=0 -UDEBUG -U_DEBUG -DNDEBUG -I/var/lib/dkms/nvidia-331-updates/331.113/build -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"331.113\" -Wno-unused-function -Wuninitialized -DNV_UVM_ENABLE -D__linux__ -DNV_DEV_NAME=\"nvidia\" -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)" -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /var/lib/dkms/nvidia-331-updates/331.113/build/.tmp_nv.o /var/lib/dkms/nvidia-331-updates/331.113/build/nv.c
In file included from include/uapi/linux/stddef.h:1:0,
                 from include/linux/stddef.h:4,
                 from ./include/uapi/linux/posix_types.h:4,
                 from include/uapi/linux/types.h:13,
                 from include/linux/types.h:5,
                 from include/uapi/linux/capability.h:16,
                 from include/linux/capability.h:15,
                 from include/linux/sched.h:15,
                 from include/linux/utsname.h:5,
                 from /var/lib/dkms/nvidia-331-updates/331.113/build/nv-linux.h:44,
                 from /var/lib/dkms/nvidia-331-updates/331.113/build/nv.c:13:
include/asm-generic/qrwlock.h: In function ‘queue_write_trylock’:
include/asm-generic/qrwlock.h:93:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          cnts, cnts | _QW_LOCKED) == cnts);
                                   ^
include/linux/compiler.h:159:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
./arch/x86/include/asm/uaccess.h: In function ‘copy_from_user’:
./arch/x86/include/asm/uaccess.h:712:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
include/linux/compiler.h:159:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
./arch/x86/include/asm/uaccess.h: In function ‘copy_to_user’:
./arch/x86/include/asm/uaccess.h:730:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (likely(sz < 0 || sz >= n))
                          ^
include/linux/compiler.h:159:40: note: in definition of macro ‘likely’
 # define likely(x) __builtin_expect(!!(x), 1)
                                        ^
/var/lib/dkms/nvidia-331-updates/331.113/build/nv.c: In function ‘nvidia_unlocked_ioctl’:
/var/lib/dkms/nvidia-331-updates/331.113/build/nv.c:2027:29: error: ‘struct file’ has no member named ‘f_dentry’
     return nvidia_ioctl(file->f_dentry->d_inode, file, cmd, i_arg);
                             ^
make[2]: *** [/var/lib/dkms/nvidia-331-updates/331.113/build/nv.o] Error 1
make[1]: *** [_module_/var/lib/dkms/nvidia-331-updates/331.113/build] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.19.0-031900rc3-lowlatency'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [nvidia.ko] Error 1

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: nvidia-331-updates 331.113-0ubuntu0.0.4
ProcVersionSignature: Ubuntu 3.13.0-43.72-lowlatency 3.13.11.11
Uname: Linux 3.13.0-43-lowlatency i686
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: i386
DKMSKernelVersion: 3.19.0-031900rc3-lowlatency
Date: Fri Jan 9 18:44:31 2015
DuplicateSignature: dkms:nvidia-331-updates:331.113-0ubuntu0.0.4:/var/lib/dkms/nvidia-331-updates/331.113/build/nv.c:2027:29: error: ‘struct file’ has no member named ‘f_dentry’
InstallationDate: Installed on 2014-11-15 (56 days ago)
InstallationMedia: Ubuntu-Studio 14.04.1 LTS "Trusty Tahr" - Release i386 (20140722.1)
PackageVersion: 331.113-0ubuntu0.0.4
SourcePackage: nvidia-graphics-drivers-331-updates
Title: nvidia-331-updates 331.113-0ubuntu0.0.4: nvidia-331-updates kernel module failed to build
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.modprobe.d.nvidia.331.updates.hybrid.conf: [deleted]

Revision history for this message
J.D. (omega-me) wrote :
tags: removed: need-duplicate-check
summary: nvidia-331-updates 331.113-0ubuntu0.0.4: nvidia-331-updates kernel
- module failed to build
+ module failed to build [error: ‘struct file’ has no member named
+ ‘f_dentry’]
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: nvidia-331-updates 331.113-0ubuntu0.0.4: nvidia-331-updates kernel module failed to build [error: ‘struct file’ has no member named ‘f_dentry’]

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-331-updates (Ubuntu):
status: New → Confirmed
Revision history for this message
Simon Hausmann (shausman) wrote :

Since the 3.19 kernel update in vivid, this now affects everyone using nvidia-304 updates "out of the box" :(

Revision history for this message
kary (kari-kivioja) wrote :

ROOT CAUSE: In kernel headers, a feature that nvidia code depends on, has been removed in kernel 3.19:

    $ diff linux-headers-3.18.0-13/include/linux/fs.h linux-headers-3.19.0-7/include/linux/fs.h | grep f_dentry
    < #define f_dentry f_path.dentry

WORKAROUND: Make nvidia code live without that feature:

    $ sudo sed -i~ s/f_dentry/f_path.dentry/ /usr/src/nvidia-304-304.125/nv.c
    $ apt list --installed 'linux*' | cut -d / -f 1 | grep 3.19 | xargs sudo apt install --reinstall

kary (kari-kivioja)
Changed in nvidia-graphics-drivers-304 (Ubuntu):
status: New → Confirmed
Revision history for this message
Simon Hausmann (shausman) wrote :

Thanks! that's a convenient workaround :)

Revision history for this message
kary (kari-kivioja) wrote :

This Bug #1409190 is about nvidia-graphics-drivers-304 and nvidia-graphics-drivers-331-updates .
The Bug #1427924 is about nvidia-graphics-drivers-304 and ubuntu-drivers-common autopkgtests.
The nvidia-graphics-drivers-304 parts are duplicates of each other and a fix was released through Bug #1427924.
I have no knowledge of the status of the nvidia-graphics-drivers-331-updates part.

This bug was fixed in the package nvidia-graphics-drivers-304 - 304.125-0ubuntu2

---------------
nvidia-graphics-drivers-304 (304.125-0ubuntu2) vivid; urgency=medium

  * debian/templates/dkms.conf.in,
    debian/dkms/patches/buildfix_kernel_3.19.patch:
    - Add support for Linux 3.19 (LP: #1427924).
 -- Alberto Milone <email address hidden> Wed, 04 Mar 2015 17:52:08 +0100

Changed in nvidia-graphics-drivers-304 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-graphics-drivers-304-updates (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-304-updates (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Doug McMahon (mc3man) wrote :

This will cause an issue with 14.04.3 unless -
either fix 331.xxx or make 340.xxx or 346.xxx available in 14.04.
304.xxx is not suitable for use on Nvidia mobile chips so please address before releasing 14.04.3

tags: added: lts-vivid
Revision history for this message
Galen Thurber (godfree2) wrote :

304.125 updates also not building for me
3.19.0-20-generic x86_64
Bug #1427924

Changed in nvidia-graphics-drivers-346 (Ubuntu):
status: New → Confirmed
summary: - nvidia-331-updates 331.113-0ubuntu0.0.4: nvidia-331-updates kernel
- module failed to build [error: ‘struct file’ has no member named
- ‘f_dentry’]
+ nvidia kernel module failed to build [error: ‘struct file’ has no member
+ named ‘f_dentry’]
Revision history for this message
Pavel Podkorytov (tierpod) wrote :

Hey, we need this patch https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1427924 on ubuntu 14.04.3. Nvidia driver failed to build with new lts stack (kernel 3.19)!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers