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

Debian 11 compilation issues #18

Open
Daniel-M opened this issue Jun 5, 2023 · 0 comments
Open

Debian 11 compilation issues #18

Daniel-M opened this issue Jun 5, 2023 · 0 comments

Comments

@Daniel-M
Copy link

Daniel-M commented Jun 5, 2023

Hi, I'm currently facing the issue where my bluetooth scanning never ends and never shows devices. I have compiled the repository for rtw89 successfully (changing the makefile as below), and have working wifi, investigating into why the bluetooth does not work [I've found a related the issue] (lwfinger/rtw89#148 (comment)) where installation of this repository is advised.

In order for make to work had to changed the Makefile's lines;

# This line
#KSRC := /lib/modules/$(KVER)/build
# Replaced with this line
KSRC := /usr/src/linux-headers-$(KVER)

And the installation worked, have working wifi.

Now. Since I have no bluetooth scanned devices, tried to install this drive but got an error trace. I'm using Debian 11 stable with the kernel

root@tethys:~/rtw89-bt# uname -r
5.10.0-23-amd64

Using GCC version

root@tethys:~/rtw89-bt# gcc --version
gcc (Debian 10.2.1-6) 10.2.1 20210110
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Make version

root@tethys:~/rtw89-bt# make --version
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

That's the configuration that worked on the wifi driver.

When doing make on the root of the current main branch I get the following error trace:

root@tethys:~/rtw89-bt# make
make -C /usr/src/linux-headers-5.10.0-23-amd64 M=/root/rtw89-bt modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-23-amd64'
  CC [M]  /root/rtw89-bt/btusb.o
In file included from /root/rtw89-bt/btusb.c:26:
/root/rtw89-bt/btusb.c: In function ‘btusb_recv_bulk_intel’:
/root/rtw89-bt/btintel.h:183:27: error: implicit declaration of function ‘hci_get_priv’; did you mean ‘hci_get_irk’? [-Werror=implicit-function-declaration]
  183 |  (((struct btintel_data *)hci_get_priv(hdev))->flags)
      |                           ^~~~~~~~~~~~
/root/rtw89-bt/btintel.h:185:52: note: in expansion of macro ‘btintel_get_flag’
  185 | #define btintel_test_flag(hdev, nr) test_bit((nr), btintel_get_flag(hdev))
      |                                                    ^~~~~~~~~~~~~~~~
/root/rtw89-bt/btusb.c:2190:6: note: in expansion of macro ‘btintel_test_flag’
 2190 |  if (btintel_test_flag(hdev, INTEL_BOOTLOADER))
      |      ^~~~~~~~~~~~~~~~~
/root/rtw89-bt/btintel.h:183:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  183 |  (((struct btintel_data *)hci_get_priv(hdev))->flags)
      |    ^
/root/rtw89-bt/btintel.h:185:52: note: in expansion of macro ‘btintel_get_flag’
  185 | #define btintel_test_flag(hdev, nr) test_bit((nr), btintel_get_flag(hdev))
      |                                                    ^~~~~~~~~~~~~~~~
/root/rtw89-bt/btusb.c:2190:6: note: in expansion of macro ‘btintel_test_flag’
 2190 |  if (btintel_test_flag(hdev, INTEL_BOOTLOADER))
      |      ^~~~~~~~~~~~~~~~~
/root/rtw89-bt/btusb.c: In function ‘btusb_recv_event_intel’:
/root/rtw89-bt/btintel.h:183:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  183 |  (((struct btintel_data *)hci_get_priv(hdev))->flags)
      |    ^
/root/rtw89-bt/btintel.h:185:52: note: in expansion of macro ‘btintel_get_flag’
  185 | #define btintel_test_flag(hdev, nr) test_bit((nr), btintel_get_flag(hdev))
      |                                                    ^~~~~~~~~~~~~~~~
/root/rtw89-bt/btusb.c:2198:6: note: in expansion of macro ‘btintel_test_flag’
 2198 |  if (btintel_test_flag(hdev, INTEL_BOOTLOADER)) {
      |      ^~~~~~~~~~~~~~~~~
/root/rtw89-bt/btusb.c: In function ‘btusb_send_frame_intel’:
/root/rtw89-bt/btintel.h:183:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  183 |  (((struct btintel_data *)hci_get_priv(hdev))->flags)
      |    ^
/root/rtw89-bt/btintel.h:185:52: note: in expansion of macro ‘btintel_get_flag’
  185 | #define btintel_test_flag(hdev, nr) test_bit((nr), btintel_get_flag(hdev))
      |                                                    ^~~~~~~~~~~~~~~~
/root/rtw89-bt/btusb.c:2237:7: note: in expansion of macro ‘btintel_test_flag’
 2237 |   if (btintel_test_flag(hdev, INTEL_BOOTLOADER)) {
      |       ^~~~~~~~~~~~~~~~~
/root/rtw89-bt/btusb.c: In function ‘btusb_mtk_setup’:
/root/rtw89-bt/btusb.c:2729:3: error: implicit declaration of function ‘hci_set_aosp_capable’; did you mean ‘lmp_transp_capable’? [-Werror=implicit-function-declaration]
 2729 |   hci_set_aosp_capable(hdev);
      |   ^~~~~~~~~~~~~~~~~~~~
      |   lmp_transp_capable
/root/rtw89-bt/btusb.c: In function ‘btusb_probe’:
/root/rtw89-bt/btusb.c:3738:9: error: implicit declaration of function ‘hci_alloc_dev_priv’; did you mean ‘hci_alloc_dev’? [-Werror=implicit-function-declaration]
 3738 |  hdev = hci_alloc_dev_priv(priv_size);
      |         ^~~~~~~~~~~~~~~~~~
      |         hci_alloc_dev
/root/rtw89-bt/btusb.c:3738:7: warning: assignment to ‘struct hci_dev *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 3738 |  hdev = hci_alloc_dev_priv(priv_size);
      |       ^
In file included from /root/rtw89-bt/btusb.c:26:
/root/rtw89-bt/btintel.h:166:32: warning: initialization of ‘struct btintel_data *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  166 |   struct btintel_data *intel = hci_get_priv((hdev)); \
      |                                ^~~~~~~~~~~~
/root/rtw89-bt/btusb.c:3830:4: note: in expansion of macro ‘btintel_set_flag’
 3830 |    btintel_set_flag(hdev, INTEL_ROM_LEGACY_NO_WBS_SUPPORT);
      |    ^~~~~~~~~~~~~~~~
/root/rtw89-bt/btintel.h:166:32: warning: initialization of ‘struct btintel_data *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  166 |   struct btintel_data *intel = hci_get_priv((hdev)); \
      |                                ^~~~~~~~~~~~
/root/rtw89-bt/btusb.c:3833:4: note: in expansion of macro ‘btintel_set_flag’
 3833 |    btintel_set_flag(hdev, INTEL_BROKEN_INITIAL_NCMD);
      |    ^~~~~~~~~~~~~~~~
/root/rtw89-bt/btintel.h:166:32: warning: initialization of ‘struct btintel_data *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  166 |   struct btintel_data *intel = hci_get_priv((hdev)); \
      |                                ^~~~~~~~~~~~
/root/rtw89-bt/btusb.c:3836:4: note: in expansion of macro ‘btintel_set_flag’
 3836 |    btintel_set_flag(hdev, INTEL_BROKEN_SHUTDOWN_LED);
      |    ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.10.0-23-common/scripts/Makefile.build:291: /root/rtw89-bt/btusb.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.10.0-23-common/Makefile:1852: /root/rtw89-bt] Error 2
make[1]: *** [/usr/src/linux-headers-5.10.0-23-common/Makefile:192: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-23-amd64'
make: *** [Makefile:34: all] Error 2

I will provide any additional information we can use to debug this issue, upon request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant