|
71 | 71 | `target("goldfish")`) |
72 | 72 | - `xmake.lua`(`add_requires` 与两处 `add_packages` 由 s7 改为 goldfish) |
73 | 73 | - `xmake/tests.lua`(两处 `add_packages` 由 s7 改为 goldfish) |
| 74 | +- `moebius/xmake.lua`(原 1129 遗漏:`add_requires("s7")` 与 |
| 75 | + `libmoebius` 的 `add_packages("s7")` 由 s7 改为 goldfish) |
74 | 76 | - `xmake/packages/s/s7/xmake.lua`(删除) |
75 | 77 | - `xmake/packages/s/s7/port/xmake.lua`(删除) |
76 | 78 | - `devel/1129.md`(新增,本文档) |
|
82 | 84 | - `xmake f -c --yes` 配置通过,goldfish package 成功安装到缓存。 |
83 | 85 | - `xmake b stem` 构建通过(`libmogan.a` / `moganstem` 均链接成功, |
84 | 86 | 证明 goldfish package 正确暴露了 s7 头文件与符号)。 |
| 87 | + |
| 88 | +## 7 补遗:迁移 `moebius/xmake.lua` |
| 89 | + |
| 90 | +### 7.1 背景 |
| 91 | + |
| 92 | +原 1129 删除本地 `xmake/packages/s/s7/` 后,只迁移了 `xmake.lua` 与 |
| 93 | +`xmake/tests.lua` 两处引用,**漏掉了 `moebius/xmake.lua`**: |
| 94 | + |
| 95 | +- `add_requires("s7", {system=false})` |
| 96 | +- `libmoebius` 的 `add_packages("s7")` |
| 97 | + |
| 98 | +本地 `liii-repo` 不再定义 `s7` 包,xmake 便回退到全局 `xmake-repo` |
| 99 | +的上游 `s7` 包。上游包相对本地删除的版本多出一个 `WITH_MAIN` 的 |
| 100 | +`s7` 二进制 target,并在 Linux 上强制 |
| 101 | +`add_ldflags("-static", "-static-libgcc", {force = true})`, |
| 102 | +导致无静态库的发行版(如 Fedora)在链接该二进制时报 |
| 103 | +`找不到 -lstdc++/-lm/-lc`。 |
| 104 | + |
| 105 | +`moebius/src/` 本身不引用任何 s7 头文件/符号(`libmoebius` 的 |
| 106 | +`add_packages("s7")` 实为历史遗留的死依赖),因此此前一直潜伏。 |
| 107 | + |
| 108 | +### 7.2 修复 |
| 109 | + |
| 110 | +将 `moebius/xmake.lua` 的上述两处 `s7` 同步改为 `goldfish`,与 |
| 111 | +`xmake.lua` / `xmake/tests.lua` 的迁移保持一致。并清理 |
| 112 | +`~/.xmake/cache/packages/.../s/s7/` 残留缓存,避免回退到上游包。 |
| 113 | + |
| 114 | +### 7.3 验证 |
| 115 | + |
| 116 | +- `grep -rn 'add_requires.*"s7"\|add_packages.*"s7"' xmake.lua xmake/*.lua moebius/xmake.lua` |
| 117 | + 无匹配。 |
| 118 | +- `xmake f -c --yes -m releasedbg` 配置通过,安装列表不再出现 `s7`。 |
| 119 | +- `xmake b libmoebius` 构建通过(`libmoebius.a` 归档成功)。 |
| 120 | + |
0 commit comments