Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install gasket-dkms not supported on Linux kernel 6.0 #695

Open
lamosty opened this issue Dec 26, 2022 · 11 comments
Open

Install gasket-dkms not supported on Linux kernel 6.0 #695

lamosty opened this issue Dec 26, 2022 · 11 comments
Assignees
Labels
subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:build/install Build and install issues

Comments

@lamosty
Copy link

lamosty commented Dec 26, 2022

Description

Hi. Recently, I've built a PC with the newest Intel 13th gen CPU and Ubuntu 22.04. I had to switch to Linux kernel 6 for proper CPU and iGPU support.

Following the Get started m.2 guide, I was unable to install or build gasket-dkms. I tried to follow the steps from this issue but the result is that it's unsupported:

sudo dpkg -i *.deb
Selecting previously unselected package gasket-dkms.
(Reading database ... 266328 files and directories currently installed.)
Preparing to unpack gasket-dkms_1.0-18_all.deb ...
Unpacking gasket-dkms (1.0-18) ...
Setting up gasket-dkms (1.0-18) ...
Loading new gasket-1.0 DKMS files...
Building for 6.0.9-060009-generic
Building initial module for 6.0.9-060009-generic
ERROR (dkms apport): kernel package linux-headers-6.0.9-060009-generic is not supported
Error! Bad return status for module build on kernel: 6.0.9-060009-generic (x86_64)
Consult /var/lib/dkms/gasket/1.0/build/make.log for more information.
dpkg: error processing package gasket-dkms (--install):
 installed gasket-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 gasket-dkms

Could you please update the gasket-driver to support Linux kernel 6?

Click to expand!

Issue Type

Build/Install

Operating System

Ubuntu

Coral Device

No response

Other Devices

No response

Programming Language

No response

Relevant Log Output

No response

@google-coral-bot google-coral-bot bot added subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:build/install Build and install issues labels Dec 26, 2022
@hjonnala
Copy link
Contributor

hjonnala commented Jan 9, 2023

Hi @lamosty can you please share the gasker-driver build logs with Linux Kernel 6.

@sigxcpu76
Copy link

Wed Jul 26 01:37:04 PM EEST 2023
make: Entering directory '/usr/src/linux-headers-6.4.5-x64v4-xanmod1'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc-12 (Debian 12.3.0-5~bpo12+1) 12.3.0
  You are using:           gcc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_core.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_ioctl.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_interrupt.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_page_table.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/gasket_sysfs.o
  CC [M]  /var/lib/dkms/gasket/1.0/build/apex_driver.o
/var/lib/dkms/gasket/1.0/build/gasket_core.c: In function ‘gasket_register_device’:
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:41: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 1841 |                 class_create(driver_desc->module, driver_desc->name);
      |                              ~~~~~~~~~~~^~~~~~~~
      |                                         |
      |                                         struct module *
In file included from ./include/linux/device.h:31,
                 from ./include/linux/cdev.h:8,
                 from /var/lib/dkms/gasket/1.0/build/gasket_core.h:11,
                 from /var/lib/dkms/gasket/1.0/build/gasket_core.c:12:
./include/linux/device/class.h:230:54: note: expected ‘const char *’ but argument is of type ‘struct module *’
  230 | struct class * __must_check class_create(const char *name);
      |                                          ~~~~~~~~~~~~^~~~
/var/lib/dkms/gasket/1.0/build/gasket_core.c:1841:17: error: too many arguments to function ‘class_create’
 1841 |                 class_create(driver_desc->module, driver_desc->name);
      |                 ^~~~~~~~~~~~
./include/linux/device/class.h:230:29: note: declared here
  230 | struct class * __must_check class_create(const char *name);
      |                             ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:252: /var/lib/dkms/gasket/1.0/build/gasket_core.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:2187: /var/lib/dkms/gasket/1.0/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.4.5-x64v4-xanmod1'

@bawachhe
Copy link

bawachhe commented Sep 8, 2023

According to sources around the internet, it's kernel 6.4 specifically that causes this issue. From the ArchLinux AUR, someone had success simply changing this class_create function call to use one param as specified, so I guess the fix has to determine which kernel version gasket-dkms is being compiled on?

@pgenera
Copy link

pgenera commented Sep 9, 2023

I've simply changed the call to only use the second param and things are working fine. That unblocks me, I'm happy.

@grigio
Copy link

grigio commented Oct 9, 2023

I thinks it's the same bug I had to pin the linux kernel 6.1.0-11-amd64 in Debian 12 stable because the current linux-image-amd64 6.1.0-13-amd64 is broken with gasket

@arigit
Copy link

arigit commented Oct 18, 2023

Same issue with kernel 6.5, and couldn't get the apex driver to work. Disappointed with the lack of support for the edge tpu with newer kernels

@dewet22
Copy link

dewet22 commented Nov 10, 2023

This was fixed a few months ago in https://github.com/google/gasket-driver/ already; for my use case I just built the .deb from that repo directly and deployed across my Coral-bearing machines.

@felixc
Copy link

felixc commented Nov 25, 2023

Glad to see that a fix exists! Is there an update schedule or policy for when we might see this new version added to the https://packages.cloud.google.com/apt coral-edgetpu-stable repository?

@grigio
Copy link

grigio commented Nov 25, 2023

for me this bug is fixed

Debian 12 / Linux 6.1.55-1 (2023-09-29) x86_64 GNU/Linux

Check to have all the repo enabled

cat /etc/apt/sources.list
deb http://deb.debian.org/debian stable  main contrib non-free-firmware non-free
deb http://deb.debian.org/debian stable-updates main contrib non-free-firmware non-free 
deb http://security.debian.org/debian-security/ stable-security main non-free-firmware non-free contrib

@kub3let
Copy link

kub3let commented Apr 24, 2024

For anyone coming here this is broken again in Kernel >=6.8, Proxmox is shipping with kernel 6.8.2 since today.

Working patch is available in google/gasket-driver#26 but not merged yet.

@CraigeryTheKid
Copy link

CraigeryTheKid commented May 21, 2024

For anyone coming here this is broken again in Kernel >=6.8, Proxmox is shipping with kernel 6.8.2 since today.

Working patch is available in google/gasket-driver#26 but not merged yet.

[deleted self-deprecating comment about not being smart enough for linux... it still might be true but see Edit-2]

Edit-1: also, to add to the confusion: it looks like the fix in pull 26 was merged. But only on git source?
So official repo "https://packages.cloud.google.com/apt" is not the same team/code as "https://github.com/google/gasket-driver" ?

Edit-2: kept following the links above, led me to this : Build Driver; and it appears to have worked. No errors following the entire link, and final grep check shows the apex device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests