[Solved] Fedora 28, kernel 4.18, vboxsf failed to compile

Discussions about using Linux guests in VirtualBox.
Post Reply
lelegard
Posts: 15
Joined: 14. Sep 2018, 11:49
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux, BSD, Windows
Location: Paris, France

[Solved] Fedora 28, kernel 4.18, vboxsf failed to compile

Post by lelegard »

Hi,

Using VBox 5.2.18 r124319 on Windows 7 host with Fedora 28 guest.

Fedora 28 just switched from kernel 4.17 to 4.18. Since then, the vboxsf driver failed to compile in the guest additions.

Code: Select all

$ uname -a
Linux vmfedora 4.18.5-200.fc28.x86_64 #1 SMP Tue Sep 4 15:56:14 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Excerpt from /var/log/vboxadd-setup.log :

Code: Select all

/tmp/vbox.0/utils.c: In function ‘sf_init_inode’:
/tmp/vbox.0/utils.c:165:28: error: passing argument 1 of ‘sf_ftime_from_timespec’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     sf_ftime_from_timespec(&inode->i_atime, &info->AccessTime);
                            ^~~~~~~~~~~~~~~
/tmp/vbox.0/utils.c:53:53: note: expected ‘struct timespec *’ but argument is of type ‘struct timespec64 *’
 static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
                                    ~~~~~~~~~~~~~~~~~^~
/tmp/vbox.0/utils.c:166:28: error: passing argument 1 of ‘sf_ftime_from_timespec’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     sf_ftime_from_timespec(&inode->i_ctime, &info->ChangeTime);
                            ^~~~~~~~~~~~~~~
/tmp/vbox.0/utils.c:53:53: note: expected ‘struct timespec *’ but argument is of type ‘struct timespec64 *’
 static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
                                    ~~~~~~~~~~~~~~~~~^~
/tmp/vbox.0/utils.c:167:28: error: passing argument 1 of ‘sf_ftime_from_timespec’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     sf_ftime_from_timespec(&inode->i_mtime, &info->ModificationTime);
                            ^~~~~~~~~~~~~~~
/tmp/vbox.0/utils.c:53:53: note: expected ‘struct timespec *’ but argument is of type ‘struct timespec64 *’
 static void sf_ftime_from_timespec(struct timespec *tv, RTTIMESPEC *ts)
                                    ~~~~~~~~~~~~~~~~~^~
/tmp/vbox.0/utils.c: In function ‘sf_setattr’:
/tmp/vbox.0/utils.c:377:54: error: passing argument 2 of ‘sf_timespec_from_ftime’ from incompatible pointer type [-Werror=incompatible-pointer-types]
             sf_timespec_from_ftime(&info.AccessTime, &iattr->ia_atime);
                                                      ^~~~~~~~~~~~~~~~
/tmp/vbox.0/utils.c:63:69: note: expected ‘struct timespec *’ but argument is of type ‘struct timespec64 *’
 static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec *tv)
                                                    ~~~~~~~~~~~~~~~~~^~
/tmp/vbox.0/utils.c:379:60: error: passing argument 2 of ‘sf_timespec_from_ftime’ from incompatible pointer type [-Werror=incompatible-pointer-types]
             sf_timespec_from_ftime(&info.ModificationTime, &iattr->ia_mtime);
                                                            ^~~~~~~~~~~~~~~~
/tmp/vbox.0/utils.c:63:69: note: expected ‘struct timespec *’ but argument is of type ‘struct timespec64 *’
 static void sf_timespec_from_ftime(RTTIMESPEC *ts, struct timespec *tv)
                                                    ~~~~~~~~~~~~~~~~~^~
I assume that kernel 4.18 introduced a non-backward compatible change which must be handled in the driver source code.

Any update of the guest addition CD ?
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Fedora 28, kernel 4.18, vboxsf failed to compile

Post by andyp73 »

Can you try Guest Additions 5.2.97-124971 from the bottom of the TestBuilds page? From the related bug tickets it looks as though it has been fixed in there and presumably will get added to the next release.

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
lelegard
Posts: 15
Joined: 14. Sep 2018, 11:49
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux, BSD, Windows
Location: Paris, France

Re: Fedora 28, kernel 4.18, vboxsf failed to compile

Post by lelegard »

Well done!
Guest Additions 5.2.97-124971 work fine with VBox 5.2.18 and Linux guest kernel 4.18. The shared folders are back.
Thank you.
awynne
Posts: 4
Joined: 19. Sep 2018, 16:50

Re: [Solved] Fedora 28, kernel 4.18, vboxsf failed to compile

Post by awynne »

I was having the same compile problem listed in by the OP. Then I pulled the latest dev build as suggested (currently VirtualBox-5.2.97-125151-Linux_amd64.run). This builds ok, but I'm still not able to access my shared folders. Any ideas?

my system:

Code: Select all

> uname -a
Linux wynne 4.18.7-200.fc28.x86_64 #1 SMP Mon Sep 10 15:44:45 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Solved] Fedora 28, kernel 4.18, vboxsf failed to compile

Post by socratis »

@awynne
1) Avoid the Development builds, go for the Test builds.
2) Since your question is different, open a new thread.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply