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

android-tools 35.0.2 requires new unreleased libusb changes #154

Closed
Biswa96 opened this issue Aug 8, 2024 · 2 comments · Fixed by #156
Closed

android-tools 35.0.2 requires new unreleased libusb changes #154

Biswa96 opened this issue Aug 8, 2024 · 2 comments · Fixed by #156
Labels
bug Something isn't working

Comments

@Biswa96
Copy link
Collaborator

Biswa96 commented Aug 8, 2024

android-tools 35.0.2 fails to compile with libusb 1.0.27.

android-tools/vendor/adb/client/usb_libusb.cpp:539:46: error: ‘libusb_ssplus_usb_device_capability_descriptor’ has not been declared
  539 |     static uint64_t ExtractMaxSuperSpeedPlus(libusb_ssplus_usb_device_capability_descriptor* cap) {
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
android-tools/vendor/adb/client/usb_libusb.cpp: In static member function ‘static uint64_t

The above code was added in this adb commit https://android.googlesource.com/platform/packages/modules/adb.git/+/bb1d542466bfe7675022bec7345cbfdad0354d84%5E%21/

It depends on the this libusb commit libusb/libusb@f00f06e

What should be done to fix the issue? Possible solution:

  1. Do not update android-tools until new libusb version is released.
  2. Add libusb from googlesource in vendor.
  3. Revert the commit which added new feature in adb repository.

(I prefer no.2)

@omasanori @Arnavion

@Biswa96 Biswa96 added the question Further information is requested label Aug 8, 2024
@Arnavion
Copy link

Arnavion commented Aug 8, 2024

I don't maintain android-tools package for any distros. nmeum maintains it for Alpine so you could ask him for his opinion. FWIW some distros have strong policy to link to distro libraries, so they might do (3) in their build system even if you do (2), or they might cherry-pick the libusb commit.

@Biswa96
Copy link
Collaborator Author

Biswa96 commented Aug 8, 2024

Nice idea. The cmake file could have an option to choose bundled libusb or system one. That can also be done with fmt library. I am planning to do a minor release with the modifications.

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

Successfully merging a pull request may close this issue.

2 participants