Commit aabe86e
committed
st: fix CI - static-lib object-name collision and missing Transaction defs
Two platform-build failures on this PR, both from Phase 0, both invisible
to the in-tree build and the Linux shared-lib link:
macOS-static / Alpine: the static "withdeps" archive is assembled by
build-support/merge_archives.sh, which extracts every input archive with
`ar -x` into one flat directory. Merging ST_OBJECT_LIB into libpulsar.a
gave it two members named ClientImpl.cc.o (lib/ClientImpl.cc and
lib/st/ClientImpl.cc) and two MessageId.cc.o, so `ar -x` overwrote the
classic objects and libpulsarwithdeps.a lost pulsar::ClientImpl::* and
pulsar::MessageId::* - the example link then failed. Rename the two
colliding st sources to StClientImpl.cc / StMessageId.cc (and the header
to StClientImpl.h) so no two objects in the archive share a basename.
The classes are unchanged; the source GLOB picks the new names up.
Windows: pulsar::st::Transaction::commitAsync()/abortAsync()/state()
were declared and used by the inline commit()/abort() but defined
nowhere. Transaction is PULSAR_PUBLIC (dllexport), so MSVC emits those
inline members and the DLL link needs the out-of-line async defs - a
hard error on Windows, silently tolerated by the mac/Linux .so. Add
lib/st/Transaction.cc with not-implemented-yet stubs (fail with
ResultOperationNotSupported), matching the existing stub pattern; the
real implementation lands in the transaction phase.
Verified on macOS arm64: libpulsar.a has no duplicate members, the real
merge_archives + static example link succeeds, the Transaction symbols
resolve, clang-tidy and clang-format-11 are clean, st tests pass.1 parent ada08fc commit aabe86e
6 files changed
Lines changed: 49 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
File renamed without changes.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 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 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
0 commit comments