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

Cannot Build on Arch Linux #12

Open
KirisameLonnet opened this issue Jun 20, 2024 · 9 comments
Open

Cannot Build on Arch Linux #12

KirisameLonnet opened this issue Jun 20, 2024 · 9 comments
Labels
awaiting response Need a response from the reporter bug Something isn't working

Comments

@KirisameLonnet
Copy link

Cannot Build on Arch Linux
SYS INFO:
OS: Arch Linux x86_64
Kernel: 6.9.5-arch1-1
CPU: 12th Gen Intel i7-12700KF (20) @ 4.900GHz
Wireless Network Adapter : MT7902 (On Motherboard: ASUS B760)

ERROR INFO:
run:

sudo git clone https://github.com/samveen/mt7902-dkms /usr/src/mt7902
sudo ln -s /usr/src/mt7902 /usr/src/mt7902-0.0.1
sudo dkms add --verbose -m mt7902 -v 0.0.1
sudo dkms build --verbose -m mt7902 -v 0.0.1

error:
/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/../mac80211.c: 在函数‘__mt7902_mt76_csa_finish’中:
/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/../mac80211.c:1624:41: 错误:提供给函数‘ieee80211_beacon_cntdwn_is_complete’的实参太少
1624 | if (vif->bss_conf.csa_active && ieee80211_beacon_cntdwn_is_complete(vif))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/../mt76.h:17,
from /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/../mac80211.c:7:
./include/net/mac80211.h:5605:6: 附注:在此声明
5605 | bool ieee80211_beacon_cntdwn_is_complete(struct ieee80211_vif *vif,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/../mac80211.c:1625:17: 错误:提供给函数‘ieee80211_csa_finish’的实参太少
1625 | ieee80211_csa_finish(vif);
| ^~~~~~~~~~~~~~~~~~~~
./include/net/mac80211.h:5596:6: 附注:在此声明
5596 | void ieee80211_csa_finish(struct ieee80211_vif *vif, unsigned int link_id);
| ^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/../mac80211.c: 在函数‘__mt7902_mt76_csa_check’中:
/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/../mac80211.c:1649:30: 错误:提供给函数‘ieee80211_beacon_cntdwn_is_complete’的实参太少
1649 | dev->csa_complete |= ieee80211_beacon_cntdwn_is_complete(vif);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/net/mac80211.h:5605:6: 附注:在此声明
5605 | bool ieee80211_beacon_cntdwn_is_complete(struct ieee80211_vif *vif,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:244:/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/../mac80211.o] 错误 1
make[2]: *** [/usr/lib/modules/6.9.5-arch1-1/build/Makefile:1918:/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902] 错误 2
make[1]: *** [Makefile:240:__sub-make] 错误 2
make[1]: 离开目录“/usr/lib/modules/6.9.5-arch1-1/build”
make: *** [Makefile:19:modules] 错误 2
make: 离开目录“/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902”

Full log:
make.log

@samveen
Copy link
Owner

samveen commented Jun 26, 2024

@LostConnet The code has been tested against Linux v6.8. There may have been changes in the kernel data structures, which might have caused this issue. I'll try and make some time to see if I can replicate your issue, and what the fix might be. that said, time is unfortunately a problem as of now.

@samveen samveen added bug Something isn't working awaiting response Need a response from the reporter labels Jul 19, 2024
@samveen
Copy link
Owner

samveen commented Jul 22, 2024

@LostConnet Please test the latest changes, if you are able to.

@chippisc
Copy link

chippisc commented Aug 7, 2024

Just built on a fresh Manjaro install (Kernel 6.9.10).

Installation works, bluetooth and wifi are not working.

Attaching output of inxi -n and lspci.
Output changed from having no driver before the install to having a driver that does not seem to work after ;)

inxi -n                                                                                                                                                                                        127 ✘ 
Network:
  Device-1: Realtek RTL8125 2.5GbE driver: r8169
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <mac_address>
  Device-2: MEDIATEK driver: mt7902
lspci
...
Network controller: MEDIATEK Corp. Device 7902
        Subsystem: AzureWave Device 6040
        Kernel driver in use: mt7902
        Kernel modules: mt7902
...

@branchwag
Copy link

Thank you for working on this. I am encountering the same issue as well trying to build on archlinux. Here are my logs if helpful:

sudo dkms build --verbose -m mt7902 -v 0.0.1 -k 6.10.5-arch1-1
Sign command: /usr/lib/modules/6.10.5-arch1-1/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/mt7902/0.0.1/source/dkms.conf)

Building module:
make -C mt76/mt7902 clean
make: Entering directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'
make -C /lib/modules/6.10.5-arch1-1/build M=/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 clean
make[1]: Entering directory '/usr/lib/modules/6.10.5-arch1-1/build'
make[1]: Leaving directory '/usr/lib/modules/6.10.5-arch1-1/build'
make: Leaving directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'

{ bash build.sh --kver 6.10.5-arch1-1; } >> /var/lib/dkms/mt7902/0.0.1/build/make.log 2>&1
(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.10.5-arch1-1 (x86_64)
Consult /var/lib/dkms/mt7902/0.0.1/build/make.log for more information.


# CC [M]  /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/main.o
  gcc -Wp,-MMD,/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/.main.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -fmacro-prefix-map=./= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=branch -fno-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -gdwarf-5  -DMODULE  -DKBUILD_BASENAME='"main"' -DKBUILD_MODNAME='"mt7902_common"' -D__KBUILD_MODNAME=kmod_mt7902_common -c -o /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/main.o /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/main.c  
/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/main.c:1415:17: error: initialization of ‘void (*)(struct ieee80211_hw *)’ from incompatible pointer type ‘void (*)(struct ieee80211_hw *, bool)’ {aka ‘void (*)(struct ieee80211_hw *, _Bool)’} [-Wincompatible-pointer-types]
 1415 |         .stop = mt7902_mt792x_stop,
      |                 ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/main.c:1415:17: note: (near initialization for ‘mt7902_ops.stop’)
make[3]: *** [scripts/Makefile.build:244: /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/main.o] Error 1
make[2]: *** [/usr/lib/modules/6.10.5-arch1-1/build/Makefile:1934: /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.10.5-arch1-1/build'
make: *** [Makefile:19: modules] Error 2
make: Leaving directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'
(END)

@samveen
Copy link
Owner

samveen commented Aug 19, 2024

@alesliehughes for your kind attention.

@samveen
Copy link
Owner

samveen commented Aug 19, 2024

@branchwag The build issue is fixed by #18 by Alistair . Please update and retry the build.

@branchwag
Copy link

@samveen @alesliehughes Works for me now! Thanks everyone :D

sudo dkms status --verbose -m mt7902 -v 0.0.1

mt7902/0.0.1, 6.10.5-arch1-1, x86_64: installed

@Spacenot4me
Copy link

@branchwag Is it work on manjaro? I just tried on my pc, it says that driver installed but doesnt work

@av4sin
Copy link

av4sin commented Oct 10, 2024

@samveen @alesliehughes Works for me now! Thanks everyone :D

sudo dkms status --verbose -m mt7902 -v 0.0.1

mt7902/0.0.1, 6.10.5-arch1-1, x86_64: installed

To me also apears to be installed but the wifi card doesn't seems to be detected, just the "lo". Does anyone knows how to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Need a response from the reporter bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants