Fix build when targeting Android 7 or later #130
No reviewers
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi!130
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-android-7-build"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Support for pthread_barrier was introduced in Android 7, so trying to build a custom implementation of that clashes with the system headers.
Can confirm that compilation works fine with this patch for sdk 29 (
~/Android/Sdk/ndk/20.0.5594570/ndk-build APP_PLATFORM=android-29and the patch from #24) and it fails without this patch.(also the reference for "pthread_barrier was introduced in Android 7" can be found at https://android.googlesource.com/platform/bionic/+/master/docs/status.md)
@fornwall Do you have a better solution for #24 or how are you compiling hidapi for Android?
Thanks @z3ntu for checking.
@z3ntu Thanks! Regarding #24, I'm not using ndk-build when building here, instead using the NDK as a traditional cross-compilation toolchain to build a package for Termux.