Commit 0adb288
authored
chore: pin mcpp 0.0.109, hoist the compat index redirect, fix compat.openssl (#125)
* chore: pin mcpp 0.0.109, hoist the compat index redirect, fix compat.openssl
## mcpp 0.0.109 (MCPP_VERSION + index.toml floor)
0.0.109 makes a bare dependency take BOTH halves of its wire address from the
descriptor the identity gate accepted (mcpp#286). That is the client-side other
half of the SPEC-001 short-name migration (#120): mcpp used to take the name
from the descriptor and the namespace from the request, so a bare `gtest =
"1.15.2"` addressed `mcpplibs:gtest`, a key no index has. It survived only on a
hardcoded `compat.<short>` retry that the short names removed — leaving every
bare request against this index broken on 0.0.108. min_mcpp moves with the pin
so consumers get a client that can address the index they are handed.
## [indices]: hoisted to the workspace root
The 13 members that consume `compat` no longer repeat `[indices] compat =
{ path = "../../.." }`; the root declares it once and they inherit it, with the
relative path resolved against the workspace root (mcpp#224, 0.0.97).
Exactly one entry, and `compat` specifically, because the table is keyed by
NAMESPACE:
* declared under a name no dependency asks for, the index is never
registered and resolution silently falls through to the published remote
index — the checkout under test is then not what is being tested;
* declared under several namespaces it registers N separate project repos,
and every lookup afterwards fails with an N-way ambiguity between what is
physically one descriptor (mcpp#238 / xlings#374).
Members needing another namespace keep their own declaration, which REPLACES
the inherited table rather than merging — which is what holds each member to
one project index repo. mcpp.toml and index.toml also join the workflow's
paths filter; a change to either can break every member and neither gated a
run before.
## compat.openssl
`name`: `compat.openssl` -> `openssl`. It was the index's last legacy
fully-qualified spelling (SPEC-001 §3.2).
`./config` now passes `--libdir=lib`. Unset, OpenSSL derives the install libdir
as `lib$target{multilib}` and `linux-x86_64` declares `multilib => "64"`, so
the archives landed in $prefix/lib64 while `-Llib` and the post-build check
looked at $prefix/lib. linux-aarch64 and both darwin64 targets declare no
multilib and resolve to plain `lib` — which is how this validated on an arm64
Mac while being broken for every x86_64 Linux consumer. Reproduced against the
published descriptor before fixing: the install tree came out as bin/ include/
lib64/ and install() failed its own archive check.
Also: linux links `-l:libssl.a -l:libcrypto.a` (naming the archive rather than
letting the driver resolve a name a shared object would win — one stray -L
ahead of ours and the consumer picks up the host libssl.so.3) plus `-ldl
-lpthread` for musl and pre-2.34 glibc; the build log moved into the install
prefix, since the old spot was deleted mid-build by the very os.tryrm that
preceded install; `RANLIB=/usr/bin/ranlib` is confined to macOS, the platform
whose llvm-ranlib rejects `-c`; a redundant `os.cd` that would have broken the
relative-srcroot fallback is gone; and install() probes for `perl` up front,
since OpenSSL's ./config IS a Perl script and no xim:perl exists to declare.
## Two members for it
`tests/examples/openssl` — direct dependency, inherits the root `compat`
redirect, so the descriptor in this checkout is what gets built. Asserts both
archives really link (SSL_CTX_new + EVP sha256) and the binary carries no
dynamic ssl/crypto dependency.
`tests/examples/asio-ssl` — the asio `ssl` feature end-to-end, a real TLS
handshake over loopback. It declares no member-level [indices] on purpose:
inheriting `compat` means asio resolves from the published index while its
feature dep, compat.openssl, comes from this checkout — which is how an
unmerged compat descriptor can be exercised through a published consumer.
The test moved out of asio-module, where it had been guarded by
MCPP_FEATURE_SSL. A feature's `defines` apply to the package's own TUs, not to
consumers, so that file compiled to nothing and passed while asserting
nothing — the reason the libdir bug reached main green. It now keys off
HAVE_ASIO_SSL, which the member sets in its own cfg-gated cxxflags.
## Docs
docs/package-types.md still taught `name = "compat.<lib>"`. README, the
repository/schema doc (new "索引重定向" section, corrected `features` row) and
the openssl design spec are updated to match what the code does.
* fix(openssl): declare xim:make on macosx, and print the log tail on failure
The macOS workspace job failed on both new members ~43s after the tarball
landed — far too early for a compile, and with nothing to go on: install()
writes everything to an on-disk log (xim's interface mode swallows subprocess
stdout) and xlings surfaces the failure as a bare
`E_INTERNAL: [openssl] failed:`.
Two changes, one for the likely cause and one so the next failure says what it
was.
macosx now declares `deps = { "xim:make@latest" }`. The previous comment
claimed it was unnecessary because "macOS ships GNU Make at /usr/bin/make" —
it ships GNU Make **3.81**, the last GPLv2 release, frozen in 2006, and
OpenSSL 3.x's generated Makefile does not build with it. That matches the
timing exactly: ~30s of Perl Configure, then make failing on sight.
compat.openblas already declares this dep on macosx.
Each build step now runs through a helper that, on failure, names the step and
prints the last 40 lines of the log. The log also opens with `make --version`,
because 3.81-vs-4.x is precisely the distinction that is invisible after the
fact. The tail is passed as one pre-formatted argument rather than a format
string — build output contains `%` often enough that formatting it is its own
failure mode.
Verified on linux (cold): log opens with "GNU Make 4.3", openssl and asio-ssl
members both pass.
* fix(openssl): drop the macosx xim:make dep, pin Apple's cc, dump build logs in CI
`xim:make` has no macOS build — xim-pkgindex's pkgs/m/make.lua declares only an
`xpm.linux` block — so yesterday's macosx dep failed resolution outright with
`E_INVALID_INPUT: package 'xim:make@latest' not found`, before install() ran.
Reverted, with the finding written down. compat.openblas declares the same dep
on macosx and is broken identically; nobody has noticed because that package is
Windows-only in the test suite, so its macOS path is never taken.
That leaves the original macOS failure — 43s after download, no message —
still undiagnosed, so this stops guessing at it:
* The workspace job gains an `if: failure()` step that finds every
`mcpp_*_build.log` under the members and the registry and prints its tail.
install()-driven packages build through their own Make/Configure system,
xim's interface mode swallows that output, and xlings reports only
`E_INTERNAL: [<pkg>] failed:` — so a platform-specific break otherwise
costs one full CI round-trip per hypothesis.
* The log now opens with make/cc/perl versions, not just make's.
And one likely cause addressed while here: OpenSSL is configured and built
outside mcpp's compile rules, so it inherits none of the resolved toolchain's
flags — it just runs `cc`. On macOS the `cc` in PATH is xim's llvm, which has
no macOS SDK wired up, so every compile would fail on <stdio.h>. macOS now
builds with `CC=/usr/bin/cc`, Apple's driver, which finds the SDK itself
(same spirit as the RANLIB pin, which is already macOS-only). resolve_make()
also prefers a Homebrew gmake when one exists, since /usr/bin/make is GNU Make
3.81.
If the SDK guess is wrong, the log tail now says what is.
Verified on linux (cold): log opens with GNU Make 4.3 / gcc 16.1.0, openssl
member passes.
* fix(openssl): pass RANLIB as a make command-line assignment, not an env var
The macOS build now gets all the way through configure and compile — the CC
pin was the missing piece there — and dies in `make install_sw`, one line after
copying libcrypto.a into place:
install libcrypto.a -> .../3.5.1/lib/libcrypto.a
llvm-ranlib: error: Invalid option: '-c'
make: *** [install_dev] Error 1
which is precisely what the RANLIB override exists to prevent. OpenSSL's
`darwin-common` sets `ranlib => "ranlib -c"` (Configurations/10-main.conf:1844)
and PATH resolves `ranlib` to the toolchain's llvm-ranlib, which rejects `-c`.
The override was not taking effect, and that is a regression I introduced when
confining it to macOS: I moved it from `make RANLIB=… install_sw` to
`RANLIB=… make install_sw`. The first is a command-line assignment and beats
the Makefile's own definition; the second is only an environment variable,
which a Makefile assignment overrides absent `make -e` — so it silently did
nothing and the build failed exactly as if it were not there. Restored to the
command-line form, with a comment saying why the position matters.
Also confirmed from the same log that `--libdir=lib` does its job on macOS:
the archive installs to `3.5.1/lib/`, not `lib64/`.
Verified on linux (cold): openssl member passes.1 parent 9bd385c commit 0adb288
33 files changed
Lines changed: 557 additions & 152 deletions
File tree
- .github/workflows
- docs
- superpowers/specs
- pkgs/c
- tests/examples
- archive
- asio-module
- asio-ssl
- tests
- cjson
- core
- eigen
- ffmpeg-module
- ffmpeg
- fmtlib.fmt
- gui-stack
- imgui-module
- imgui-window
- imgui
- marzer.tomlplusplus
- nlohmann.json
- openblas
- opencv-module-dnn
- opencv-module-unifont
- opencv-module
- openssl
- tests
- spdlog-compiled
- spdlog
- tinyhttps
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
14 | 32 | | |
15 | 33 | | |
16 | 34 | | |
| |||
57 | 75 | | |
58 | 76 | | |
59 | 77 | | |
60 | | - | |
| 78 | + | |
61 | 79 | | |
62 | 80 | | |
63 | 81 | | |
| |||
222 | 240 | | |
223 | 241 | | |
224 | 242 | | |
225 | | - | |
| 243 | + | |
226 | 244 | | |
227 | 245 | | |
228 | 246 | | |
229 | 247 | | |
230 | 248 | | |
231 | 249 | | |
232 | | - | |
| 250 | + | |
233 | 251 | | |
234 | 252 | | |
235 | 253 | | |
236 | 254 | | |
237 | 255 | | |
238 | 256 | | |
239 | | - | |
| 257 | + | |
240 | 258 | | |
241 | 259 | | |
242 | 260 | | |
| |||
375 | 393 | | |
376 | 394 | | |
377 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | | - | |
136 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
79 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
80 | 100 | | |
81 | 101 | | |
82 | 102 | | |
| |||
101 | 121 | | |
102 | 122 | | |
103 | 123 | | |
104 | | - | |
| 124 | + | |
| 125 | + | |
105 | 126 | | |
106 | 127 | | |
107 | 128 | | |
| |||
135 | 156 | | |
136 | 157 | | |
137 | 158 | | |
| 159 | + | |
| 160 | + | |
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
6 | 36 | | |
7 | 37 | | |
8 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
0 commit comments