Repository navigation
fix(recipe): scope the openblas dep off macOS (Accelerate is the platform BLAS) - #165
Conversation
…form BLAS)
package-macos has been red since at least 2026-07-27 and was being written
off as part of the Xcode 26.5 breakage. It is not. The recipe asked for
openblas unconditionally, and openblas deliberately has NO macOS build --
macOS ships BLAS/LAPACK in Accelerate, so libcvc-deps uses the system
libraries there ("No macOS entry" on openblas's own build matrix).
So every macOS deps-install died at resolution:
Error: requested component(s) not found in the catalog for this
platform tuple: openblas
install-deps is all-or-nothing, so NOTHING got installed -- and the error
CMake then reported was a missing libiimod at src/cvc/CMakeLists.txt:279.
That named an innocent package and sent the diagnosis down the wrong path;
libiimod was collateral damage, not the cause.
This is the same failure mode the assimp dep directly above already guards
against, and levmar already scopes its own openblas dep exactly this way
(platforms: [linux, freebsd, openbsd, netbsd]). The pattern was there; this
dep just did not follow it.
Nothing needs openblas by name on macOS. libcvc reaches BLAS through
levmar, whose config tries find_dependency(OpenBLAS CONFIG QUIET) and falls
back to find_dependency(LAPACK), which resolves to Accelerate.
Verified by running install-deps for macos/arm64 against the edited recipe:
29 components install cleanly, libiimod among them, openblas absent.
Windows is a separate, still-open gap: curl, freetype and libpng have no
windows bundles, so package-windows stays red until those are published.
…e links
Scoping openblas off macOS got the deps-install working, and the build then
reached test discovery and died there:
dyld: Library not loaded: @rpath/libfontconfig.1.dylib
Referenced from: .../libMagickCore-7.Q16HDRI.10.dylib
That reads like a broken test harness but is not: gtest discovery RUNS the
test binary, so dyld resolves MagickCore's whole chain at that moment. An
undeclared delegate surfaces as a CMake discover_tests error, several layers
from the cause.
Rather than fix one dylib per CI round-trip, scanned the installed macOS
prefix for @rpath deps nothing in it provides. Exactly two are missing, and
both are needed by libraries libcvc links -- not just ImageMagick's CLI:
libfontconfig.1.dylib <- libMagickCore, libMagickWand, libMagick++
libbz2.1.0.8.dylib <- libMagickCore, libMagickWand, libMagick++, libfreetype
fontconfig is scoped [linux, macos]: those are the only platforms it is
published for, and libcvc also builds windows, where an unconditional dep
fails the deps-install outright -- the same trap as assimp and openblas.
bzip2 is published everywhere libcvc builds, so it needs no scope.
One false alarm worth recording: the scan also flagged
png.framework/Versions/1.6.44/png as missing. It is present; the scanner
compared basenames against a full relative path. Checked before acting.
BLOCKED on libcvc-deps#437 + a macOS bzip2 republish: the live macOS
bzip2 1.0.8+cvc.2 carries absolute symlinks into a builder scratch dir, so
declaring bzip2 today aborts the install with tarfile.AbsoluteLinkError.
Update: macOS root-caused to the end, but this PR is now BLOCKEDThe openblas scoping worked — macOS went from dying at dependency resolution to installing deps, configuring, compiling, and reaching test discovery, where it hit: That looks like a broken test harness but isn't — gtest discovery runs the test binary, so dyld resolves MagickCore's whole chain at that moment. An undeclared delegate surfaces as a CMake Found the remaining gaps in one passInstead of one dylib per CI round-trip, I scanned the installed macOS prefix for
Both now declared. One false alarm, recorded for honesty: the scan also flagged Blocked on libcvc-deps#437The live macOS so declaring Order to green: merge deps#437 → republish macOS Until then expect the macOS job here to fail earlier (at extraction) than it did before. That is expected, not a regression. |
Adding fontconfig revealed its own link. cvcpkg install is FLAT -- a
bundle's required_deps are not auto-pulled -- so every layer has to be
declared explicitly, and adding one dep can expose the next:
libfontconfig.dylib -> @rpath/libexpat.1.10.0.dylib
Unscoped: expat is published for every platform libcvc builds.
Verified against the real catalog now that macOS bzip2 1.0.8+cvc.3 has
published (libcvc-deps#437): install-deps for macos/arm64 installs 32
components with no AbsoluteLinkError, and a Mach-O scan of the resulting
prefix reports
510 mach-o/dylib, 147 distinct @rpath deps, MISSING 0
Every dylib the tree loads is now satisfied from inside the prefix, so the
dyld failure during gtest discovery cannot recur for a missing delegate.
The scanner used for this had a bug worth noting: it compared dep BASENAMES
against provided basenames, so png.framework/Versions/1.6.44/png -- a path,
and present -- was reported missing. Fixed to also match paths relative to
the prefix before trusting the 0.
ImageTest.CopyOnWrite was the only failing test of 2080 in package-macos.
It is a test bug, not a COW bug, and it is not macOS-specific -- it is
clang vs gcc.
EXPECT_EQ(a.storage().get(), a.data()); // image_test.cpp:93
storage() returns the shared_array BY VALUE, so the returned temporary holds
a reference and pushes use_count() to 2. data() calls detach(), which copies
whenever use_count() > 1. Both calls are arguments of ONE full-expression,
and argument evaluation order is UNSPECIFIED in C++:
data() first -> no extra ref, no detach -> pointers equal
storage() first -> temporary still alive -> data() DETACHES
gcc picked the first order, clang the second. Reproduced locally with the
identical expression against a minimal shared_array model:
gcc : EXPECT_EQ(a.storage().get(), a.data()) -> PASS
clang: EXPECT_EQ(a.storage().get(), a.data()) -> FAIL
matching the CI pointers exactly (0x1070a5940 = the buffer storage() captured,
0x1070a5b40 = the fresh one data() allocated).
Fix is to sequence data() before storage() in its own statement. Verified the
corrected sequence passes under BOTH g++ and clang++.
The implementation is correct and unchanged. Detaching while a storage()
handle is outstanding is exactly right: that handle may be a live zero-copy
view (pycvc numpy, cvcGL vtkTexture) and a mutable data() must not write
through it.
Also replaced the preceding EXPECT_EQ(a.data(), a.data()), which compared one
call to itself and so could never fail. Its comment claimed the copy "shares
the buffer", so it now asserts that via storage() -- which does not detach.
Checking sharing with data() is impossible: the first call detaches and
destroys the aliasing being observed.
Swept the tree for the same trap (a detaching and a non-detaching accessor in
one EXPECT); this was the only instance.
Only reachable now because PR #165 fixed the macOS dependency closure -- the
macOS build previously died in cvcpkg install-deps and never ran a test.
#166) ImageTest.CopyOnWrite was the only failing test of 2080 in package-macos. It is a test bug, not a COW bug, and it is not macOS-specific -- it is clang vs gcc. EXPECT_EQ(a.storage().get(), a.data()); // image_test.cpp:93 storage() returns the shared_array BY VALUE, so the returned temporary holds a reference and pushes use_count() to 2. data() calls detach(), which copies whenever use_count() > 1. Both calls are arguments of ONE full-expression, and argument evaluation order is UNSPECIFIED in C++: data() first -> no extra ref, no detach -> pointers equal storage() first -> temporary still alive -> data() DETACHES gcc picked the first order, clang the second. Reproduced locally with the identical expression against a minimal shared_array model: gcc : EXPECT_EQ(a.storage().get(), a.data()) -> PASS clang: EXPECT_EQ(a.storage().get(), a.data()) -> FAIL matching the CI pointers exactly (0x1070a5940 = the buffer storage() captured, 0x1070a5b40 = the fresh one data() allocated). Fix is to sequence data() before storage() in its own statement. Verified the corrected sequence passes under BOTH g++ and clang++. The implementation is correct and unchanged. Detaching while a storage() handle is outstanding is exactly right: that handle may be a live zero-copy view (pycvc numpy, cvcGL vtkTexture) and a mutable data() must not write through it. Also replaced the preceding EXPECT_EQ(a.data(), a.data()), which compared one call to itself and so could never fail. Its comment claimed the copy "shares the buffer", so it now asserts that via storage() -- which does not detach. Checking sharing with data() is impossible: the first call detaches and destroys the aliasing being observed. Swept the tree for the same trap (a detaching and a non-detaching accessor in one EXPECT); this was the only instance. Only reachable now because PR #165 fixed the macOS dependency closure -- the macOS build previously died in cvcpkg install-deps and never ran a test. Co-authored-by: Joe Rivera <[email protected]>
package-macoshas been red since at least 2026-07-27 and was being written off as part of the Xcode 26.5 breakage. It is not that.Cause
The recipe asked for
openblasunconditionally — but openblas deliberately has no macOS build. macOS ships BLAS/LAPACK in the Accelerate framework, so libcvc-deps uses the system libraries there. From openblas's own recipe:So every macOS deps-install died at resolution:
Why it looked like something else
install-depsis all-or-nothing. When openblas failed to resolve, nothing was installed — so the error CMake reported was a missinglibiimodatsrc/cvc/CMakeLists.txt:279. That named an innocent package and sent the diagnosis down the wrong path. libiimod was collateral damage, not the cause.The pattern was already here
The
assimpdep directly above this line guards against exactly this failure mode, with a comment saying so. Andlevmaralready scopes its own openblas dep the same way:This dep just didn't follow it.
Why nothing breaks
Nothing needs openblas by name on macOS. libcvc reaches BLAS through levmar, whose config tries
find_dependency(OpenBLAS CONFIG QUIET)and falls back tofind_dependency(LAPACK)— which resolves to Accelerate.Verification
Ran
install-depsformacos/arm64against the edited recipe:The package the CMake error blamed now resolves; openblas is correctly absent.
Still open
Windows is a separate gap and stays red:
curl,freetypeandlibpnghave no windows bundles at all. That needs those packages published for windows, not a recipe scope change.