Heyo,
I was trying to compile a VCOM Driver for unbricking a MediaTek phone, but unfortunetly it crashed. I was using yay to build the package and that's the log:
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] advantech-vcom-2.2.1-4
1 advantech-vcom (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: PKGBUILD up to date, Skipping (1/0): advantech-vcom
1 advantech-vcom (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: advantech-vcom
==> Making package: advantech-vcom 2.2.1-4 (czw, 1 gru 2022, 12:18:43)
==> Retrieving sources...
-> Found vcom_linux_2.2.1.rar
-> Found 0000-advman.systemd.patch
-> Found 0001-adv_main-access_ok_kernel-5-0.patch
-> Found 0002-adv_mmap-vm_fault_t-5-1.patch
-> Found 0003-gcc-10-duplicate-variables-vc_mon-stk_mon.patch
-> Found 0004-adv_main-proc_create_data-kernel-5.6.patch
==> Validating source files with md5sums...
vcom_linux_2.2.1.rar ... Passed
0000-advman.systemd.patch ... Passed
0001-adv_main-access_ok_kernel-5-0.patch ... Passed
0002-adv_mmap-vm_fault_t-5-1.patch ... Passed
0003-gcc-10-duplicate-variables-vc_mon-stk_mon.patch ... Passed
0004-adv_main-proc_create_data-kernel-5.6.patch ... Passed
==> Validating source files with sha256sums...
vcom_linux_2.2.1.rar ... Passed
0000-advman.systemd.patch ... Passed
0001-adv_main-access_ok_kernel-5-0.patch ... Passed
0002-adv_mmap-vm_fault_t-5-1.patch ... Passed
0003-gcc-10-duplicate-variables-vc_mon-stk_mon.patch ... Passed
0004-adv_main-proc_create_data-kernel-5.6.patch ... Passed
==> Making package: advantech-vcom 2.2.1-4 (czw, 1 gru 2022, 12:18:48)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found vcom_linux_2.2.1.rar
-> Found 0000-advman.systemd.patch
-> Found 0001-adv_main-access_ok_kernel-5-0.patch
-> Found 0002-adv_mmap-vm_fault_t-5-1.patch
-> Found 0003-gcc-10-duplicate-variables-vc_mon-stk_mon.patch
-> Found 0004-adv_main-proc_create_data-kernel-5.6.patch
==> Validating source files with md5sums...
vcom_linux_2.2.1.rar ... Passed
0000-advman.systemd.patch ... Passed
0001-adv_main-access_ok_kernel-5-0.patch ... Passed
0002-adv_mmap-vm_fault_t-5-1.patch ... Passed
0003-gcc-10-duplicate-variables-vc_mon-stk_mon.patch ... Passed
0004-adv_main-proc_create_data-kernel-5.6.patch ... Passed
==> Validating source files with sha256sums...
vcom_linux_2.2.1.rar ... Passed
0000-advman.systemd.patch ... Passed
0001-adv_main-access_ok_kernel-5-0.patch ... Passed
0002-adv_mmap-vm_fault_t-5-1.patch ... Passed
0003-gcc-10-duplicate-variables-vc_mon-stk_mon.patch ... Passed
0004-adv_main-proc_create_data-kernel-5.6.patch ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
==> Starting prepare()...
UNRAR 6.20 beta 2 freeware Copyright (c) 1993-2022 Alexander Roshal
Extracting from vcom_linux_2.2.1.rar
Creating vcom_linux_2.2.1 OK
Creating vcom_linux_2.2.1/advps OK
Extracting vcom_linux_2.2.1/advps/advps.c OK
Extracting vcom_linux_2.2.1/advps/Makefile OK
Creating vcom_linux_2.2.1/config OK
Extracting vcom_linux_2.2.1/config/advttyd.conf OK
Extracting vcom_linux_2.2.1/COPYING OK
Creating vcom_linux_2.2.1/daemon OK
Extracting vcom_linux_2.2.1/daemon/Makefile OK
Extracting vcom_linux_2.2.1/daemon/vcom.h OK
Extracting vcom_linux_2.2.1/daemon/vcom_client.c OK
Extracting vcom_linux_2.2.1/daemon/vcom_debug.h OK
Extracting vcom_linux_2.2.1/daemon/vcom_monitor.h OK
Extracting vcom_linux_2.2.1/daemon/vcom_monitor_dbg.h OK
Extracting vcom_linux_2.2.1/daemon/vcom_monitor_pre_stat.h OK
Extracting vcom_linux_2.2.1/daemon/vcom_proto.h OK
Extracting vcom_linux_2.2.1/daemon/vcom_proto_cmd.h OK
Extracting vcom_linux_2.2.1/daemon/vcom_proto_ioctl.h OK
Extracting vcom_linux_2.2.1/daemon/vc_client_common.c OK
Extracting vcom_linux_2.2.1/daemon/vc_client_common.h OK
Extracting vcom_linux_2.2.1/daemon/vc_client_idle.c OK
Extracting vcom_linux_2.2.1/daemon/vc_client_idle.h OK
Extracting vcom_linux_2.2.1/daemon/vc_client_netdown.c OK
Extracting vcom_linux_2.2.1/daemon/vc_client_netdown.h OK
Extracting vcom_linux_2.2.1/daemon/vc_client_netup.c OK
Extracting vcom_linux_2.2.1/daemon/vc_client_netup.h OK
Extracting vcom_linux_2.2.1/daemon/vc_client_pause.c OK
Extracting vcom_linux_2.2.1/daemon/vc_client_pause.h OK
Extracting vcom_linux_2.2.1/daemon/vc_client_sync.c OK
Extracting vcom_linux_2.2.1/daemon/vc_client_sync.h OK
Creating vcom_linux_2.2.1/driver OK
Extracting vcom_linux_2.2.1/driver/advconf.h OK
Extracting vcom_linux_2.2.1/driver/advioctl.h OK
Extracting vcom_linux_2.2.1/driver/advtype.h OK
Extracting vcom_linux_2.2.1/driver/advvcom.h OK
Extracting vcom_linux_2.2.1/driver/adv_main.c OK
Extracting vcom_linux_2.2.1/driver/adv_mmap.c OK
Extracting vcom_linux_2.2.1/driver/adv_uart.c OK
Extracting vcom_linux_2.2.1/driver/dkms.conf OK
Extracting vcom_linux_2.2.1/driver/Makefile OK
Creating vcom_linux_2.2.1/initd OK
Extracting vcom_linux_2.2.1/initd/advttyd.c OK
Extracting vcom_linux_2.2.1/initd/advttyd.h OK
Extracting vcom_linux_2.2.1/initd/Makefile OK
Creating vcom_linux_2.2.1/inotify OK
Extracting vcom_linux_2.2.1/inotify/Makefile OK
Extracting vcom_linux_2.2.1/inotify/vcom_inotf.c OK
Extracting vcom_linux_2.2.1/Makefile OK
Extracting vcom_linux_2.2.1/readme.txt OK
Creating vcom_linux_2.2.1/script OK
Extracting vcom_linux_2.2.1/script/advadd OK
Extracting vcom_linux_2.2.1/script/advls OK
Extracting vcom_linux_2.2.1/script/advman OK
Extracting vcom_linux_2.2.1/script/advrm OK
Extracting SOP_EKI-1500 series_LinuxVCOMDriver_LoopbackTestingGuide.pdf OK
Extracting VCOM 2 0 Driver for Linux Installation Guide.pdf OK
All OK
patching file driver/adv_main.c
patching file driver/adv_mmap.c
patching file daemon/vcom_client.c
patching file daemon/vcom.h
patching file daemon/vcom_monitor_dbg.h
patching file daemon/vcom_monitor.h
patching file daemon/vcom_monitor_pre_stat.h
patching file driver/adv_main.c
patching file script/advman
==> Sources are ready.
==> Making package: advantech-vcom 2.2.1-4 (czw, 1 gru 2022, 12:18:57)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
make -C ./daemon
make[1]: Entering directory '/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon'
gcc -Wall -I /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon/../driver -o vcomd /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon/vcom_client.c /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon/vc_client_pause.c /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon/vc_client_netdown.c /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon/vc_client_common.c /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon/vc_client_sync.c /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon/vc_client_idle.c /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon/vc_client_netup.c
make[1]: Leaving directory '/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/daemon'
make -C ./driver
make[1]: Entering directory '/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver'
make -C /lib/modules/6.0.7-artix1-1/build M=/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver LDDINC=/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver modules
make[2]: Entering directory '/usr/lib/modules/6.0.7-artix1-1/build'
CC [M] /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver/adv_main.o
/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver/adv_main.c: In function ‘adv_proc_open’:
/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver/adv_main.c:198:16: error: implicit declaration of function ‘PDE_DATA’; did you mean ‘NODE_DATA’? [-Werror=implicit-function-declaration]
198 | data = PDE_DATA(inode);
| ^~~~~~~~
| NODE_DATA
/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver/adv_main.c:198:14: warning: assignment to ‘struct adv_vcom *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
198 | data = PDE_DATA(inode);
| ^
/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver/adv_main.c: In function ‘adv_proc_release’:
/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver/adv_main.c:208:14: warning: assignment to ‘struct adv_vcom *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
208 | data = PDE_DATA(inode);
| ^
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:249: /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver/adv_main.o] Error 1
make[2]: *** [Makefile:1852: /home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver] Error 2
make[2]: Leaving directory '/usr/lib/modules/6.0.7-artix1-1/build'
make[1]: *** [Makefile:30: modules] Error 2
make[1]: Leaving directory '/home/gameplayer/.cache/yay/advantech-vcom/src/vcom_linux_2.2.1/driver'
make: *** [Makefile:7: all] Error 2
==> ERROR: A failure occurred in build().
/usr/share/makepkg/util/message.sh: line 57: QUIET: unbound variable
/usr/bin/makepkg: line 131: logpipe: unbound variable
-> error making: advantech-vcom
I was also trying to install it from Advantech page, but that's how it ended up:
make -C ./daemon
make[1]: Entering directory '/home/gameplayer/Downloads/vcom_linux_2.3.0/daemon'
cc -Wall -Werror -I /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/../driver -I /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/../shared/container -I /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/../shared/json -I /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/../shared/ssl_select -o vcomd /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/vcom_client.c /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/vc_client_pause.c /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/vc_client_netdown.c /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/vc_client_common.c /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/vc_client_sync.c /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/vc_client_idle.c /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/vc_client_netup.c /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/../shared/ssl_select/ssl_select.c /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/../shared/json/jstree.c /home/gameplayer/Downloads/vcom_linux_2.3.0/daemon/../shared/json/jsmn.c -lssl -lcrypto -D_VCOM_SUPPORT_TLS
/usr/bin/ld: /tmp/ccT6orQd.o:(.bss+0x0): multiple definition of `vc_mon'; /tmp/ccZVhetq.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/ccT6orQd.o:(.bss+0x118): multiple definition of `stk_mon'; /tmp/ccZVhetq.o:(.bss+0x118): first defined here
/usr/bin/ld: /tmp/ccYOSgZb.o:(.bss+0x0): multiple definition of `vc_mon'; /tmp/ccZVhetq.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/ccYOSgZb.o:(.bss+0x118): multiple definition of `stk_mon'; /tmp/ccZVhetq.o:(.bss+0x118): first defined here
/usr/bin/ld: /tmp/cccn0U4Y.o:(.bss+0x0): multiple definition of `vc_mon'; /tmp/ccZVhetq.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/cccn0U4Y.o:(.bss+0x118): multiple definition of `stk_mon'; /tmp/ccZVhetq.o:(.bss+0x118): first defined here
/usr/bin/ld: /tmp/ccMt4AR9.o:(.bss+0x0): multiple definition of `vc_mon'; /tmp/ccZVhetq.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/ccMt4AR9.o:(.bss+0x118): multiple definition of `stk_mon'; /tmp/ccZVhetq.o:(.bss+0x118): first defined here
/usr/bin/ld: /tmp/ccfgNUzG.o:(.bss+0x0): multiple definition of `vc_mon'; /tmp/ccZVhetq.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/ccfgNUzG.o:(.bss+0x118): multiple definition of `stk_mon'; /tmp/ccZVhetq.o:(.bss+0x118): first defined here
/usr/bin/ld: /tmp/cc2Q6xJd.o:(.bss+0x0): multiple definition of `vc_mon'; /tmp/ccZVhetq.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/cc2Q6xJd.o:(.bss+0x118): multiple definition of `stk_mon'; /tmp/ccZVhetq.o:(.bss+0x118): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:55: vcomd] Error 1
make[1]: Leaving directory '/home/gameplayer/Downloads/vcom_linux_2.3.0/daemon'
make: *** [Makefile:29: build_basic] Error 2
Is there some way to install that driver on Artix with OpenRC init system & kernel 6.0+?