Commit ba5f1a6
committed
fix(pm): de-inline resolver functions to satisfy musl-gcc 15.1 link
The release.yml musl-static build of v0.0.2 failed at the link step:
obj/cli.m.o: in function `std::_Vector_base<mcpp::version_req::Version>::~_Vector_base()':
undefined reference to `std::_Vector_base<...>::_Vector_impl::~_Vector_impl()'
`pm/resolver.cppm` declared `resolve_semver` `inline`, so every importer
(currently `cli.cppm`) wound up locally instantiating the destructor of
`std::_Vector_base<vr::Version>`. With musl-gcc 15.1's libstdc++ that
specific instantiation is missing the corresponding `_Vector_impl`
destructor symbol, and the linker rejects.
Move the function bodies out of the `export` block in `pm/resolver.cppm`
(declarations only there, definitions in a non-export `mcpp::pm` block
later in the same module unit). Single definition point, single
instantiation site — the cross-module duplicate goes away and musl-gcc
links cleanly.
Reproduced and verified locally with `mcpp build --target x86_64-linux-musl`
on the same musl-gcc 15.1 toolchain CI uses.
`mcpp build` (glibc) + `mcpp test` (9/9 unit) still pass.1 parent 2a603e0 commit ba5f1a6
1 file changed
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
| |||
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
38 | 60 | | |
39 | 61 | | |
40 | 62 | | |
| |||
43 | 65 | | |
44 | 66 | | |
45 | 67 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 68 | + | |
51 | 69 | | |
52 | 70 | | |
53 | 71 | | |
| |||
0 commit comments