Commit 82d1697
committed
fix: build the SONAME alias under explicit ninja goals (mcpp test), 0.0.107
A shared library that declares `soname` is written as bin/libX11.so but records
SONAME libX11.so.6. Both the linker resolving a transitive NEEDED and the loader
starting a binary look for the alias, never for the plain name — so the alias is
a prerequisite of anything that links the library, not a by-product of building
it.
It was modelled as a standalone ninja edge that nothing depends on, reachable
only through `default`. The 0.0.104 test batch (#274) made `mcpp test` pass
explicit goal targets so it could isolate per-test compiles, and that silently
stopped producing the alias. `mcpp build` and `mcpp run` drive `default` and
were unaffected, which is why this survived three releases: only a project
driven by `mcpp test` hits it.
The symptom lands three levels from the cause — a consumer failing to link with
`libX11.so: undefined reference to xcb_connect` (alongside `libxcb.so.1 ... not
found`), or a test binary exiting 127. mcpp-index CI has been failing this way
on gui-stack, imgui-module and imgui-window since 0.0.104; two probe PRs pinning
only MCPP_VERSION over unmodified descriptors reproduced it at both 0.0.104 and
0.0.106, which is what ruled out the package-identity migration as the cause.
Hang the alias off the consumer's implicit inputs, beside the .so it already
lists. Correct under `default` and under explicit goals alike, and it pulls in
nothing that was not already being built.
e2e 64 covered only `build` + `run` — precisely the two paths that still worked.
It now also runs `mcpp test` from a clean target dir and asserts the alias
exists; without the fix that test binary fails with exit 127.
Verified: unit 37/37; e2e 64 red before / green after; the three real mcpp-index
members pass with `mcpp test` alone (gui-stack 5/5, imgui-module 1/1,
imgui-window 1/1). Remaining local e2e failures (22, 98, 141) reproduce
identically on the released 0.0.106 binary under the same MCPP_HOME — they are
this machine's gcc 15.1.0, not this change.1 parent 96fe161 commit 82d1697
5 files changed
Lines changed: 55 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
6 | 16 | | |
7 | 17 | | |
8 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
730 | 743 | | |
731 | 744 | | |
732 | 745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
98 | 128 | | |
0 commit comments