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

可能需要适配新的内核 #4

Open
blackt3a opened this issue Jun 19, 2024 · 0 comments
Open

可能需要适配新的内核 #4

blackt3a opened this issue Jun 19, 2024 · 0 comments

Comments

@blackt3a
Copy link

xxxx@xxxx-virtual-machine:/Downloads/CH341SER_LINUX/driver$ make
make -C /lib/modules/6.5.0-35-generic/build M=/home/xxxx/Downloads/CH341SER_LINUX/driver
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-35-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1
22.04) 12.3.0
You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
CC [M] /home/xxxx/Downloads/CH341SER_LINUX/driver/ch341.o
/home/xxxx/Downloads/CH341SER_LINUX/driver/ch341.c:1095:20: error: initialization of ‘void (*)(struct tty_port , bool)’ {aka ‘void ()(struct tty_port , _Bool)’} from incompatible pointer type ‘void ()(struct tty_port *, int)’ [-Werror=incompatible-pointer-types]
1095 | .dtr_rts = ch341_port_dtr_rts,
| ^~~~~~~~~~~~~~~~~~
/home/xxxx/Downloads/CH341SER_LINUX/driver/ch341.c:1095:20: note: (near initialization for ‘ch341_port_ops.dtr_rts’)
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:251: /home/xxxx/Downloads/CH341SER_LINUX/driver/ch341.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-35-generic/Makefile:2039: /home/xxxx/Downloads/CH341SER_LINUX/driver] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-35-generic'
make: *** [Makefile:5: default] Error 2

我是在ubuntu22上编译的有如上报错,查资料说是新内核的指针类型不匹配,需要修改源码,在我写的时候还没解决。

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