Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 876328 - dev-util/android-tools-33.0.3-r1: fails to build with sys-kernel/linux-headers-6.0
Summary: dev-util/android-tools-33.0.3-r1: fails to build with sys-kernel/linux-header...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Zac Medico
URL: https://github.com/nmeum/android-tool...
Whiteboard:
Keywords: PATCH
: 877243 877399 (view as bug list)
Depends on:
Blocks: 876331
  Show dependency tree
 
Reported: 2022-10-09 18:12 UTC by pva
Modified: 2022-10-17 21:07 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
adb patch (android_tools.patch,3.05 KB, patch)
2022-10-12 14:10 UTC, Dmitry Suloev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pva 2022-10-09 18:12:40 UTC
dev-util/android-tools-33.0.3-r1 fails to build with sys-kernel/linux-headers-6.0 with the following error:

/usr/lib/ccache/bin/g++ -DADB_HOST=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/home/mae/.cache/kiss/proc/121205/build/android-tools/build/vendor -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/base/libs/androidfw/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/boringssl/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/adb -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/adb/crypto/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/adb/pairing_auth/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/adb/pairing_connection/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/adb/tls/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/core/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/core/libcrypto_utils/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/core/libcutils/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/libbase/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/libziparchive/include -I/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/native/include -march=x86-64-v3 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Wno-error=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -O3 -DNDEBUG -Wno-attributes -std=gnu++20 -MD -MT vendor/CMakeFiles/libadb.dir/adb/client/usb_linux.cpp.o -MF vendor/CMakeFiles/libadb.dir/adb/client/usb_linux.cpp.o.d -o vendor/CMakeFiles/libadb.dir/adb/client/usb_linux.cpp.o -c /home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/adb/client/usb_linux.cpp
In file included from /home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/adb/client/usb_linux.cpp:28:
/usr/include/linux/usbdevice_fs.h:134:41: error: flexible array member ‘usbdevfs_urb::iso_frame_desc’ not at end of ‘struct usb_handle’
  134 |         struct usbdevfs_iso_packet_desc iso_frame_desc[];
      |                                         ^~~~~~~~~~~~~~
/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/adb/client/usb_linux.cpp:76:18: note: next member ‘usbdevfs_urb usb_handle::urb_out’ declared here
   76 |     usbdevfs_urb urb_out;
      |                  ^~~~~~~
/home/mae/.cache/kiss/proc/121205/build/android-tools/vendor/adb/client/usb_linux.cpp:61:8: note: in the definition of ‘struct usb_handle’
   61 | struct usb_handle {
      |        ^~~~~~~~~~


Downgrade of linux-headers to 5.19 fixes build problem. This issue was reported upstream: https://github.com/nmeum/android-tools/issues/74 but no fix at the moment. I suggest to add DEPEND on <sys-kernel/linux-headers-6.0.
Comment 1 Dmitry Suloev 2022-10-12 14:10:00 UTC
Created attachment 823709 [details, diff]
adb patch
Comment 2 Dmitry Suloev 2022-10-12 14:11:50 UTC
(In reply to Dmitry Suloev from comment #1)
> Created attachment 823709 [details, diff] [details, diff]
> adb patch
After applying this patch android-tools compiling fine with linux-headers-6.0 in my case.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-15 20:48:11 UTC
*** Bug 877243 has been marked as a duplicate of this bug. ***
Comment 4 Justin Keogh 2022-10-16 17:53:44 UTC
The patch fixes it for me as well on sys-kernel/linux-headers-6.0
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-16 23:35:47 UTC
The patch is merged upstream now so I'll pull it in.
Comment 6 Larry the Git Cow gentoo-dev 2022-10-16 23:41:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6a7d4c9d8258282768f10a9b47c8ecadcbdf726

commit c6a7d4c9d8258282768f10a9b47c8ecadcbdf726
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-16 23:41:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-16 23:41:28 +0000

    dev-util/android-tools: fix build w/ linux-headers-6.0
    
    Closes: https://bugs.gentoo.org/876328
    Signed-off-by: Sam James <sam@gentoo.org>

 .../android-tools/android-tools-33.0.3-r1.ebuild   |   6 ++
 ...e-of-usbdevfs_urb-to-match-new-kernel-UAP.patch | 120 +++++++++++++++++++++
 2 files changed, 126 insertions(+)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-17 21:07:57 UTC
*** Bug 877399 has been marked as a duplicate of this bug. ***