não consigo instalar(dar make) em um arquivo. [RESOLVIDO]

1. não consigo instalar(dar make) em um arquivo. [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 28/04/2023 - 14:49h

Bom, sou iniciante no linux e como primeira distro estou usando o Ubuntu. O próprio sistema já fez os updates e etc, então eu fui instalar o drive do meu adptador de internet(rtl8811cu)
Baixei o git, clonei o repositório (https://github.com/brektrou/rtl8821CU) e ok, mas na hora de dar o
make 
no arquivo, o terminal me devolve:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.19.0-41-generic/build M=/home/titto/build/rtl8821CU modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-41-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
CC [M] /home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.o
/home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_ch_switch_notify’:
/home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:420:9: error: too few arguments to function ‘cfg80211_ch_switch_notify’
420 | cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/titto/build/rtl8821CU/include/osdep_service_linux.h:93,
from /home/titto/build/rtl8821CU/include/osdep_service.h:50,
from /home/titto/build/rtl8821CU/include/drv_types.h:27,
from /home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:17:
./include/net/cfg80211.h:7967:6: note: declared here
7967 | void cfg80211_ch_switch_notify(struct net_device *dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c: At top level:
/home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:9416:20: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, unsigned int)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct net_device *)’ [-Werror=incompatible-pointer-types]
9416 | .stop_ap = cfg80211_rtw_stop_ap,
| ^~~~~~~~~~~~~~~~~~~~
/home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:9416:20: note: (near initialization for ‘rtw_cfg80211_ops.stop_ap’)
/home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_wdev_unregister’:
/home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.c:9682:17: error: ‘struct wireless_dev’ has no member named ‘current_bss’
9682 | if (wdev->current_bss) {
| ^~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:257: /home/titto/build/rtl8821CU/os_dep/linux/ioctl_cfg80211.o] Error 1
make[1]: *** [Makefile:1850: /home/titto/build/rtl8821CU] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-41-generic'
make: *** [Makefile:2217: modules] Error 2


Aparentemente o problema está aqui:
the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0


error: implicit declaration of function ‘complete_and_exit’ [-Werror=implicit-function-declaration] 1297 | complete_and_exit(comp, 0);


Me lembro de ter baixado esse tal "gcc", mas não sei se foi por conta disso que este erro está persistindo :(




  


2. Re: não consigo instalar(dar make) em um arquivo. [RESOLVIDO]

Daniel Lara Souza
danniel-lara

(usa Fedora)

Enviado em 28/04/2023 - 15:54h


acho que falta o kernel-header ai




$ sudo apt install linux-headers-$(uname -r)




3. Re: não consigo instalar(dar make) em um arquivo. [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 28/04/2023 - 16:48h


danniel-lara escreveu:


acho que falta o kernel-header ai




$ sudo apt install linux-headers-$(uname -r)



obrigado pela respota! mas infelizmente não funcionou

~$ sudo apt install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
linux-headers-5.19.0-41-generic is already the newest version (5.19.0-41.42~22.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.



4. RE: não consigo instalar(dar make) em um arquivo

Luiz Eduardo Maia Ribeiro
distromaialinux

(usa Debian)

Enviado em 28/04/2023 - 17:41h

Você chegou a instalar o pacote de compilação essencial, o pacote build-essential?



5. Re: não consigo instalar(dar make) em um arquivo. [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 28/04/2023 - 19:04h


distromaialinux escreveu:

Você chegou a instalar o pacote de compilação essencial, o pacote build-essential?


~$ sudo apt-get install build-essential
[sudo] password for titto:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


hm... parece que nada funciona


6. Re: não consigo instalar(dar make) em um arquivo. [RESOLVIDO]

Samuel Leonardo
SamL

(usa XUbuntu)

Enviado em 28/04/2023 - 19:12h


the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

Aparentemente o make tá confundindo as bolas e pensa que o x86_64-linux-gnu-gcc não é o gcc.

Vc pode abrir o Makefile e trocar onde tem o x86_64-linux-gnu-gcc por gcc
Observe também que a versão do kernel do seu ubuntu tá com patch acima do que tem no seu gcc. O seu kernel foi feito pelo 22.04.1 enquanto que seu gcc tá como 22.04. Acho que um sudo apt update && sudo apt upgrade -y pode resolver de boa e depois pode dar make.

https://nerdki.blogspot.com/ acessa ai, é grátis
Não gostou? O ícone da casinha é serventia do site!


7. Obrigado a todos que tentaram ajudar!

Perfil removido
removido

(usa Nenhuma)

Enviado em 28/04/2023 - 19:31h

depois de muita quebração de cabeça resolvi o problema da maneira mais boba possível.

O problema era no repositório do drive então tentei usar este:
clonei, e dei

make clean
make
sudo make install
sudo make reboot

e funcionou (o passo a passo inteiro lá)




  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts