Repository navigation
Apple xcframeworks: merge archives built for only one arch (KleidiCV arm64) into the universal archive - #709
Merged
danoli3 merged 1 commit intoNov 1, 2026
Conversation
…arm64) into the universal archive
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.
Since #706 the macOS
opencv.xcframeworkreferences KleidiCV but doesn't contain it:opencv.ahas 48 undefinedkleidicv::hal::*symbols and defines none, so anything linking ofxOpenCv on arm64 fails (Undefined symbols for architecture arm64: kleidicv::hal::bgr_to_bgr ...): allAddonsExample in openframeworks/projectGenerator#696 CI and openFrameworks CI build-macos (makefiles) / build-cmake (macos), with thelatestosx packages from 2026-11-01.The libs are in the package (
opencv/lib/osx/MAC_ARM64/libkleidicv{,_hal,_thread}.a), but the Apple merge inframeworkFormula/xframeworkFormulawalks theMAC(x86_64) folder and lipos each archive with itsMAC_ARM64pair. KleidiCV is arm64 only (x86_64 builds withWITH_KLEIDICV=OFF), so those three archives are never visited andMERGE_MAC_MAC_ARM64/opencv.ais made from the 4 shared ones (see the osx opencv log of run 41305652529).Archives that exist only in the pair arch's folder are now copied into the merge folder too;
libtool -staticputs a thin arm64 archive into the arm64 slice of the universalopencv.a(x86_64 unchanged).Tested on macOS by running
xframeworkFormula opencvfrombleedingand from this branch on a fakeout/opencv/lib/osx/{MAC,MAC_ARM64}(2 shared archives, 3 arm64-onlylibkleidicv*.a):opencv.xcframework/macos-arm64_x86_64/opencv.aarm64 symbols 2, kleidicv 0 (same as the published package)Other libraries are unchanged unless they have archives in only one arch folder.