Repository navigation
build(libusb): build libusb without pipe2 on macOS, where pipe2 needs macOS 27 - #19920
Merged
oneandonlydean merged 1 commit intoNov 15, 2026
Merged
Conversation
This was referenced Nov 14, 2026
Open
This was referenced Nov 14, 2026
Contributor
|
Tested
AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
12 tasks done
Contributor
|
Tested on macOS: Apple M5 Pro, macOS 27.2.1, x86_64 build under Rosetta, Vulkan SDK 1.4.363.1 (MoltenVK).
I haven't looked into the causes. AI-assisted: yes (Claude Code) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
libusb-cmake sets
HAVE_PIPE2fromcheck_function_exists(pipe2 HAVE_PIPE2). The macOS 27 SDK declarespipe2with__API_AVAILABLE(macos(27.0), ...), so the check passes,usbi_create_eventcallspipe2, and with a lower minimum version the symbol is weakly imported and null on macOS 26.sceUsbdInitthen jumps to address 0:The compiler also warns
'pipe2' is only available on macOS 27.0 or neweratevents_posix.c:87.On Apple,
HAVE_PIPE2is now preset to false beforeadd_subdirectory(3rdparty/libusb-cmake);check_function_existsskips a variable that is already defined, so libusb takes its ownpipe+fcntl(FD_CLOEXEC)path, which works on every macOS version. No third-party file changes; Linux and Windows are unchanged. This is the libusb side of thelibkernelpipe2call fixed in #19903.Tested
macOS 26.7.3, Apple M4, Xcode SDK 27.2, Apple clang 21.0.0, CMake 4.4.4, Ninja, full build (
-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DCMAKE_OSX_ARCHITECTURES=x86_64, tests under Rosetta) onmainwith #17425, #11049, #11437 and #19903 merged locally:guest_usbdsegfaults with the backtrace above.config.hhas/* #undef HAVE_PIPE2 */, theevents_posix.cavailability warning is gone, andguest_usbdpasses.python3 tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)