showing error with ubuntu
anshuman-8 opened this issue · 2 comments
anshuman-8 commented
make -C /lib/modules/5.15.0-57-generic/build M=/home/anshuman/Downloads/CH341SER_LINUX
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-57-generic'
CC [M] /home/anshuman/Downloads/CH341SER_LINUX/ch34x.o
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c: In function ‘ch34x_close’:
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:562:2: error: unknown type name ‘wait_queue_t’; did you mean ‘wait_event’?
562 | wait_queue_t wait;
| ^~~~~~~~~~~~
| wait_event
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:573:24: error: passing argument 1 of ‘init_waitqueue_entry’ from incompatible pointer type [-Werror=incompatible-pointer-types]
573 | init_waitqueue_entry( &wait, current );
| ^~~~~
| |
| int *
In file included from ./include/linux/mmzone.h:10,
from ./include/linux/gfp.h:6,
from ./include/linux/slab.h:15,
from /home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:21:
./include/linux/wait.h:82:66: note: expected ‘struct wait_queue_entry *’ but argument is of type ‘int *’
82 | ic inline void init_waitqueue_entry(struct wait_queue_entry *wq_entry, struct task_struct *p)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:574:36: error: passing argument 2 of ‘add_wait_queue’ from incompatible pointer type [-Werror=incompatible-pointer-types]
574 | add_wait_queue( &tty->write_wait, &wait );
| ^~~~~
| |
| int *
In file included from ./include/linux/mmzone.h:10,
from ./include/linux/gfp.h:6,
from ./include/linux/slab.h:15,
from /home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:21:
./include/linux/wait.h:166:86: note: expected ‘struct wait_queue_entry *’ but argument is of type ‘int *’
166 | wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:585:39: error: passing argument 2 of ‘remove_wait_queue’ from incompatible pointer type [-Werror=incompatible-pointer-types]
585 | remove_wait_queue( &tty->write_wait, &wait );
| ^~~~~
| |
| int *
In file included from ./include/linux/mmzone.h:10,
from ./include/linux/gfp.h:6,
from ./include/linux/slab.h:15,
from /home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:21:
./include/linux/wait.h:169:89: note: expected ‘struct wait_queue_entry *’ but argument is of type ‘int *’
169 | wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c: In function ‘wait_modem_info’:
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:756:3: error: implicit declaration of function ‘interruptible_sleep_on’ [-Werror=implicit-function-declaration]
756 | interruptible_sleep_on( &priv->delta_msr_wait );
| ^~~~~~~~~~~~~~~~~~~~~~
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c: At top level:
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:1256:20: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
1256 | .write_room = ch34x_write_room,
| ^~~~~~~~~~~~~~~~
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:1256:20: note: (near initialization for ‘ch34x_device.write_room’)
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:1257:21: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
1257 | .chars_in_buffer = ch34x_chars_in_buffer,
| ^~~~~~~~~~~~~~~~~~~~~
/home/anshuman/Downloads/CH341SER_LINUX/ch34x.c:1257:21: note: (near initialization for ‘ch34x_device.chars_in_buffer’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:297: /home/anshuman/Downloads/CH341SER_LINUX/ch34x.o] Error 1
make[1]: *** [Makefile:1902: /home/anshuman/Downloads/CH341SER_LINUX] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-57-generic'
make: *** [Makefile:5: default] Error 2
kartiksomani commented
any solution for this? I'm facing the same error for fedora
jaques-sam commented
Confirmed, same issue on Fedora (41).
Workaround is using docker on an older gcc version I'm afraid, yet to figure out which.
This at first didn't work for me as the kernel is different, it's not possible to run that on a newer kernel :-(