Commit 8511831
committed
build: fix stale soname symlink after a library version bump
When a shared library's soname is bumped (e.g. liblinuxcncini.so.0 ->
.so.1), incremental trees keep the old .so.0 on disk. The generic
../lib/%.so symlink has two pattern rules in src/Makefile (matching
%.so.0 and %.so.1, .so.0 listed first), so make repoints the dev symlink
at the stale .so.0. Everything then links against the old library and
fails with undefined symbols (e.g. IniFile::mapLinearUnits), breaking the
python module, linuxcnc_check_ini and startup. Clean builds are immune,
so CI never sees it; only incremental builders across the bump are hit.
make clean did not help either: .so.0 is no longer in TARGETS, so
rm -f $(TARGETS) leaves it behind.
Fixes:
- liblinuxcncini.so.1 rule removes any leftover .so.[0-9]* sibling.
- Add an explicit liblinuxcncini.so -> .so.1 symlink rule. Explicit rules
override the ambiguous pattern pair, so the symlink repoints to the
current soname in a single build pass (the rm alone self-heals only on
a second make).
- genclean also removes ../lib/*.so.[0-9]* so stale versioned libraries
no longer survive make clean.1 parent 77e9f58 commit 8511831
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| 537 | + | |
537 | 538 | | |
538 | 539 | | |
539 | 540 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| |||
0 commit comments