Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940000 - app-laptop/framework-laptop-kmod fails to build for kernel version 6.11.0
Summary: app-laptop/framework-laptop-kmod fails to build for kernel version 6.11.0
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-09-21 14:45 UTC by truffle074
Modified: 2024-10-08 09:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,9.94 KB, text/x-log)
2024-09-21 14:45 UTC, truffle074
Details
emerge info (emerge-info.txt,7.70 KB, text/plain)
2024-09-21 14:47 UTC, truffle074
Details
temporary.patch (file_940000.txt,734 bytes, patch)
2024-10-08 09:30 UTC, Oleg Hoefling
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description truffle074 2024-09-21 14:45:24 UTC
Created attachment 903511 [details]
build log

Hi, don't normally submit bugs but I noticed when building with kernel versions >= 6.11.0 that =app-laptop/framework-laptop-kmod-0_pre20240506 fails to build with an invalid function pointer error.

I look into this a bit and found as of version 6.11.0 the kernel refines 'struct platform_driver', changing some of the function pointers to void, instead of the int like in previous versions.

This ebuild uses a slightly older commit from the upstream github which doesn't include a fix for this. Using commit 6164bc3dec24b6bb2806eedd269df6a170bcc930, the latest as of today, fixes this issue by including a preprocessor check:

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
static void framework_remove(struct platform_device *pdev)
#else
static int framework_remove(struct platform_device *pdev)
#endif

I was able to get it to compile by just doing a version bump, but wanted to report this in case someone else runs into it :P
Comment 1 truffle074 2024-09-21 14:47:10 UTC
Created attachment 903512 [details]
emerge info
Comment 2 Oleg Hoefling 2024-10-08 09:30:58 UTC
Created attachment 905103 [details, diff]
temporary.patch

I have submitted the package update to Gentoo's Github mirror. Until then, putting the attached patch into `/etc/portage/patches/app-laptop/framework-laptop-kmod` is a viable workaround. This is the same patch as https://patch-diff.githubusercontent.com/raw/DHowett/framework-laptop-kmod/pull/24.diff