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

Build failed on PopOS 22.04 #37

Open
hieunguyenmevn opened this issue Feb 22, 2023 · 0 comments
Open

Build failed on PopOS 22.04 #37

hieunguyenmevn opened this issue Feb 22, 2023 · 0 comments

Comments

@hieunguyenmevn
Copy link

hieunguyenmevn commented Feb 22, 2023

Description

When I run make on my machine (PopOS 22.04), it build failed.

Logs

➜  CH341SER git:(ubuntu) ✗ sudo make
make -C /lib/modules/6.0.12-76060006-generic/build  M=/home/nguyenhieu/Desktop/CH341SER 
make[1]: Entering directory '/usr/src/linux-headers-6.0.12-76060006-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.2.0-19ubuntu1) 11.2.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  CC [M]  /home/nguyenhieu/Desktop/CH341SER/ch34x.o
/home/nguyenhieu/Desktop/CH341SER/ch34x.c:1298:27: error: initialization of ‘void (*)(struct tty_struct *, struct usb_serial_port *, struct ktermios *)’ from incompatible pointer type ‘void (*)(struct tty_struct *, struct usb_serial_port *, const struct ktermios *)’ [-Werror=incompatible-pointer-types]
 1298 |         .set_termios    = ch34x_set_termios,
      |                           ^~~~~~~~~~~~~~~~~
/home/nguyenhieu/Desktop/CH341SER/ch34x.c:1298:27: note: (near initialization for ‘ch34x_device.set_termios’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:249: /home/nguyenhieu/Desktop/CH341SER/ch34x.o] Error 1
make[1]: *** [Makefile:1852: /home/nguyenhieu/Desktop/CH341SER] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.0.12-76060006-generic'
make: *** [Makefile:7: default] Error 2

How to fix (note for other guys)

I checkout to this commit: e70c14c

Then I can build successfully.

Thank you for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant