WCHSoftGroup / ch341ser_linux

USB to serial driver for USB to serial chip ch340, ch341, etc.
68 stars 27 forks source link

1.7以前的版本都会函数报错,最新的直接Exec format error #16

Open hejunv opened 4 months ago

hejunv commented 4 months ago

最新的直接1.7编译 /bin/sh: 1: scripts/basic/fixdep: Exec format error 环境是 root@openstick OS: Debian GNU/Linux 11 (bullseye) aarch64 Host: Handsome OpenStick UFI003MB Kernel: 5.15.0-handsomekernel+ 编译器: You are using: aarch64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110

hejunv commented 4 months ago

老版本报错信息: CC [M] /root/CH341PAR_LINUX/driver/ch34x.o /root/CH341PAR_LINUX/driver/ch34x.c:1636:17: error: initialization of 'unsigned int ()(struct tty_struct )' from incompatible pointer type 'int ()(struct tty_struct )' [-Werror=incompatible-pointer-types] 1636 | .write_room = ch34x_tty_write_room, | ^~~~~~~~ /root/CH341PAR_LINUX/driver/ch34x.c:1636:17: note: (near initialization for 'ch34x_ops.write_room') /root/CH341PAR_LINUX/driver/ch34x.c:1638:21: error: initialization of 'unsigned int ()(struct tty_struct )' from incompatible pointer type 'int ()(struct tty_struct )' [-Werror=incompatible-pointer-types] 1638 | .chars_in_buffer = ch34x_tty_chars_in_buffer, | ^~~~~~~~~ /root/CH341PAR_LINUX/driver/ch34x.c:1638:21: note: (near initialization for 'ch34x_ops.chars_in_buffer') /root/CH341PAR_LINUX/driver/ch34x.c: In function 'ch34x_init': /root/CH341PAR_LINUX/driver/ch34x.c:1652:21: error: implicit declaration of function 'alloc_tty_driver' [-Werror=implicit-function-declaration] 1652 | ch34x_tty_driver = alloc_tty_driver(CH34X_TTY_MINORS); | ^~~~ /root/CH341PAR_LINUX/driver/ch34x.c:1652:19: warning: assignment to 'struct tty_driver *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 1652 | ch34x_tty_driver = alloc_tty_driver(CH34X_TTY_MINORS); | ^ /root/CH341PAR_LINUX/driver/ch34x.c:1669:3: error: implicit declaration of function 'put_tty_driver' [-Werror=implicit-function-declaration] 1669 | put_tty_driver(ch34x_tty_driver); | ^~~~~~ cc1: some warnings being treated as errors

WCHSoftGroup commented 4 months ago

从上面的编译日志来看,你实际编译的文件并不是本仓库下面的文件,建议重新核实下。