You are not logged in.
Until a couple days ago, I was using a sunix multi-I/O card on my computer for older devices that use a serial and parallel port. but after performing a full system update with pacman -Syu it no longer worked, so I did the logical thing and tried reinstalling it using pamac, only to encounter errors.
Here is the paste of the full output: https://pastebin.com/NnqHuw8i
Thanks in advance!
Offline
so I did the logical thing and tried reinstalling it using pamac
Well, no, the logical thing would be to use makepkg so we could actually give more specific feedback. As I have no idea how pamac works, all I can say is that the error is due to missing dependencies that are listed in the PKGBUILD. Either read the pacman documentation to learn how to use it properly to handle dependencies, or use `makepkg -si` instead.
EDIT: Sorry, this wasn't the issue. Though it is still expected practice on the forums to post output only from running makepkg directly. Perhaps that include is not actually for the system file provided by linux-headers.
Last edited by Trilby (2023-07-10 16:34:21)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: No such file or directory
5 | #include <generated/autoconf.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Something deleted include/generated/autoconf.h provided by linux-headers, could be a bad dkms.conf.
If you restore that file the package is not compatible with linux 6.4
make: Entering directory '/var/lib/dkms/sunix-snx/2.0.7_0/build/driver'
make -C /usr/lib/modules/6.4.2-arch1-1/build M=/var/lib/dkms/sunix-snx/2.0.7_0/build/driver SUBDIRS=/var/lib/dkms/sunix-snx/2.0.7_0/build/driver modules
CC [M] /var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_main.o
CC [M] /var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_devtable.o
CC [M] /var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.o
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:8:53: error: macro "DEFINE_SEMAPHORE" requires 2 arguments, but only 1 given
8 | static DEFINE_SEMAPHORE(ser_port_sem);
| ^
In file included from ./include/linux/fs.h:25,
from ./include/linux/tty.h:5,
from /var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_common.h:46,
from /var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:1:
./include/linux/semaphore.h:34: note: macro "DEFINE_SEMAPHORE" defined here
34 | #define DEFINE_SEMAPHORE(_name, _n) \
|
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:8:24: error: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’ [-Werror=implicit-int]
8 | static DEFINE_SEMAPHORE(ser_port_sem);
| ^~~~~~~~~~~~~~~~
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c: In function ‘snx_ser_set_termios’:
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:3115:37: warning: passing argument 2 of ‘snx_ser_change_speed’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qual
ifiers]
3115 | snx_ser_change_speed(state, old_termios);
| ^~~~~~~~~~~
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:3040:82: note: expected ‘struct ktermios *’ but argument is of type ‘const struct ktermios *’
3040 | extern void snx_ser_change_speed(struct snx_ser_state *state, struct SNXTERMIOS *old_termios)
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c: In function ‘snx_ser_get’:
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:3200:15: error: ‘ser_port_sem’ undeclared (first use in this function); did you mean ‘snx_port_remap’?
3200 | down(&ser_port_sem);
| ^~~~~~~~~~~~
| snx_port_remap
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:3200:15: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c: In function ‘sunix_ser_add_one_port’:
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:4580:15: error: ‘ser_p
ort_sem’ undeclared (first use in this function); did you mean ‘snx_port_remap’?
4580 | down(&ser_port_sem);
| ^~~~~~~~~~~~
| snx_port_remap
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c: In function ‘sunix_ser_remove_one_port’:
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:4716:15: error: ‘ser_port_sem’ undeclared (first use in this function); did you mean ‘snx_port_remap’?
4716 | down(&ser_port_sem);
| ^~~~~~~~~~~~
| snx_port_remap
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c: At top level:
/var/lib/dkms/sunix-snx/2.0.7_0/build/driver/snx_serial.c:8:24: warning: ‘DEFINE_SEMAPHORE’ defined but not used [-Wunused-variable]
8 | static DEFINE_SEMAPHORE(ser_port_sem);
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Offline
Just Endie wrote:so I did the logical thing and tried reinstalling it using pamac
Well, no, the logical thing would be to use makepkg so we could actually give more specific feedback. As I have no idea how pamac works, all I can say is that the error is due to missing dependencies that are listed in the PKGBUILD. Either read the pacman documentation to learn how to use it properly to handle dependencies, or use `makepkg -si` instead.
Using makepkg -si doesn't work, here's the output: https://pastebin.com/Hz1WFW6g
Offline
Using makepkg -si doesn't work
See post #2.
Offline
Just Endie wrote:Using makepkg -si doesn't work
See post #2.
Ah, so if the package isn’t compatible should I just wait for the package maintainer to fix it?
Also should I mark this as solved or not yet?
Offline
Post a message on the packages AUR page to let the maintainer know the package needs patching for 6.4.
I would also suggest you investigate what deleted include/generated/autoconf.h.
Edit:
I missed there is a second incompatible kernel change https://github.com/torvalds/linux/commi … 9c45098ee5
So one possible patch would be
diff --git a/driver/snx_lp.c b/driver/snx_lp.c
index ecbee62..69b4b2c 100644
--- a/driver/snx_lp.c
+++ b/driver/snx_lp.c
@@ -929,8 +929,12 @@ static int snx_lp_init(void)
snx_devfs_handle = devfs_mk_dir(NULL, "sprinter", NULL);
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17))
devfs_mk_dir("sprinter");
+#else
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0))
+ snx_lp_class = class_create("sprinter");
#else
snx_lp_class = class_create(THIS_MODULE, "sprinter");
+#endif
if (IS_ERR(snx_lp_class)) {
err = PTR_ERR(snx_lp_class);
diff --git a/driver/snx_ppdev.c b/driver/snx_ppdev.c
index 9f9444e..c0e2a2d 100644
--- a/driver/snx_ppdev.c
+++ b/driver/snx_ppdev.c
@@ -1156,8 +1156,12 @@ int sunix_par_ppdev_init(void)
for (i = 2; i < SNX_PARPORT_MAX; i++) {
devfs_mk_cdev(MKDEV(SNX_PPD_MAJOR, i), S_IFCHR | S_IRUGO | S_IWUGO, "parports/%d", i);
}
+#else
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0))
+ snx_ppdev_class = class_create(SNX_CHRDEV);
#else
snx_ppdev_class = class_create(THIS_MODULE, SNX_CHRDEV);
+#endif
if (IS_ERR(snx_ppdev_class)) {
err = PTR_ERR(snx_ppdev_class);
goto out_chrdev;
diff --git a/driver/snx_serial.c b/driver/snx_serial.c
index c0c77b6..cc5ce1e 100644
--- a/driver/snx_serial.c
+++ b/driver/snx_serial.c
@@ -4,7 +4,9 @@
#define SNX_ioctl_DBG 0
#define EEPROM_ACCESS_DELAY_COUNT 100000
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0))
+ static DEFINE_SEMAPHORE(ser_port_sem, 1);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37))
static DEFINE_SEMAPHORE(ser_port_sem);
#else
static DECLARE_MUTEX(ser_port_sem);
diff --git a/driver/snx_share.c b/driver/snx_share.c
index 30691c4..d996878 100644
--- a/driver/snx_share.c
+++ b/driver/snx_share.c
@@ -37,10 +37,14 @@ static LIST_HEAD(snx_drivers);
static DECLARE_MUTEX(snx_registration_lock);
-#else
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
static DEFINE_SEMAPHORE(snx_registration_lock);
+#else
+
+static DEFINE_SEMAPHORE(snx_registration_lock,1);
+
#endif
Last edited by loqs (2023-07-10 17:02:48)
Offline