4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Discussions about using Linux guests in VirtualBox.
Post Reply
KernelU
Posts: 2
Joined: 28. Dec 2014, 00:08

4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by KernelU »

Virtualbox additions 4.3.20 fails to build using gcc 4.9.2 and the 3.19 kernel:

Code: Select all

  gcc -Wp,-MD,/tmp/vbox.0/.dirops.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/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 -m64 -mno-80387 -mno-fp-ret-in-387 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=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=2048 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -Wno-declaration-after-statement -fshort-wchar -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I/lib/modules/3.19.0-rc1-00011-g53262d1-dirty/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxsf/ -I/tmp/vbox.0/vboxsf/include -I/tmp/vbox.0/vboxsf/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST_R0 -DRT_NO_EXPORT_SYMBOL -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(dirops)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxsf)" -c -o /tmp/vbox.0/dirops.o /tmp/vbox.0/dirops.c
In file included from /tmp/vbox.0/dirops.c:19:0:
/tmp/vbox.0/dirops.c: In function ‘sf_getdent’:
/tmp/vbox.0/dirops.c:129:29: error: ‘struct file’ has no member named ‘f_dentry’
     sf_g = GET_GLOB_INFO(dir->f_dentry->d_inode->i_sb);
                             ^
/tmp/vbox.0/vfsmod.h:144:60: note: in definition of macro ‘GET_GLOB_INFO’
 # define GET_GLOB_INFO(sb)       ((struct sf_glob_info *) (sb)->s_fs_info)
                                                            ^
/tmp/vbox.0/dirops.c:135:16: error: ‘struct file’ has no member named ‘f_dentry’
     inode = dir->f_dentry->d_inode;
                ^
scripts/Makefile.build:257: recipe for target '/tmp/vbox.0/dirops.o' failed
make[2]: *** [/tmp/vbox.0/dirops.o] Error 1
Makefile:1381: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
/tmp/vbox.0/Makefile.include.footer:79: recipe for target 'vboxsf' failed
make: *** [vboxsf] Error 2

loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: 4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by loukingjr »

The 3.19 kernel isn't in release yet.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
KernelU
Posts: 2
Joined: 28. Dec 2014, 00:08

Re: 4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by KernelU »

loukingjr wrote:The 3.19 kernel isn't in release yet.
That is not a useful or big thought reply, people will run into the problem eventually. The sooner it gets fixed the better.

About the issue: dentry structure changed. I managed to patch it and it works. See the readme from Torvalds: people must stop using dentry completely in its next version.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: 4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by loukingjr »

The point was it's hardly surprising that the modules don't build on a RC kernel released 6 days ago. Or is 6 days too long to wait for VirtualBox to support 3.19? Not to mention 4.3.20 was released a month before.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
dr-claw
Posts: 3
Joined: 15. May 2015, 08:23

Re: 4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by dr-claw »

Hello. I'm hitting this problem too. The content of /var/log/vboxadd-install.log is almost identical to what is posted above. I am trying to install Kubuntu 15.04 as a guest.

The host is Kubuntu 14.10 running VirtualBox 4.3.18 .

On the guest, I've installed these packages:

gcc
autoconf
automake
build-essential
module-assistant
linux-headers-`uname -r`
dkms
xorg-dev

Yet the guest tools installer program keeps telling me the kernel headers aren't installed and fails with the same error message as listed above. Perhaps there is another package I am missing? Or does anybody have any other suggestions?

Thanks
dr-claw
Posts: 3
Joined: 15. May 2015, 08:23

Re: 4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by dr-claw »

Part of the problem was that I needed to update to a version of Virtual Box better than what is provided by default with Kubuntu. This page:

xmodulo.c o m / how-to-install-or-upgrade-virtualbox-on-ubuntu-or-debian. h t m l

was very helpful. I've updated Virutal Box to 4.3.28 . But I also needed to remove the old version of Virtual Box

Code: Select all

apt-get remove virtualbox virtualbox-dkms virtualbox-qt
and also once I rebooted the guest, I also still had the .iso file for the 4.3.18 version mounted to the guest, so I needed to go into the Virtual Box settings for the guest and change the .iso file mounted to the virtual CDROM.

Hope this helps anybody else who's stuck.
dr-claw
Posts: 3
Joined: 15. May 2015, 08:23

Re: 4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by dr-claw »

(remove the extra spaces in the U R L above).
J-P
Posts: 1
Joined: 11. Aug 2015, 09:45

Re: 4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by J-P »

With the latest release of Ubuntu LTS 14.04.03, Virtualbox Guest Additions do not build anymore, for the same reason as described above.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: just about all that run

Re: 4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by loukingjr »

J-P wrote:With the latest release of Ubuntu LTS 14.04.03, Virtualbox Guest Additions do not build anymore, for the same reason as described above.
Which version of VirtualBox are you using? On what host? I just downloaded and installed Ubuntu 14.04.3 and the guest additions installed without a problem.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
subuta
Posts: 1
Joined: 16. Aug 2015, 19:13

Re: 4.3.20 -- ‘struct file’ has no member named ‘f_dentry’

Post by subuta »

J-P wrote:With the latest release of Ubuntu LTS 14.04.03, Virtualbox Guest Additions do not build anymore, for the same reason as described above.
I am experiencing this issue too, although for me the term "anymore" doesn't apply as I am new to Guest Additions on an Ubuntu guest.
Post Reply