summaryrefslogtreecommitdiff
path: root/mrpt-libmath.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-22 02:59:03 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-22 02:59:03 +0000
commitf049562684399d8547908fa7bf2a330e3a74d169 (patch)
tree4982ba46ac739dc14eef49b034e9fbdf3bfb14d6 /mrpt-libmath.spec
parenta4abf70af77280f50237015ef5ae05212f18e26d (diff)
automatic import of ros-humble-mrpt-libmathopeneuler24.03_LTS_SP3
Diffstat (limited to 'mrpt-libmath.spec')
-rw-r--r--mrpt-libmath.spec24
1 files changed, 20 insertions, 4 deletions
diff --git a/mrpt-libmath.spec b/mrpt-libmath.spec
index 996920d..52f993b 100644
--- a/mrpt-libmath.spec
+++ b/mrpt-libmath.spec
@@ -8,7 +8,7 @@
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 2.15.20
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Mobile Robot Programming Toolkit (MRPT) libraries (math C++ libraries)
License: BSD
URL: https://github.com/MRPT/mrpt_ros.git
@@ -167,12 +167,17 @@ fi
# 类型的全套成员显式实例化,另有 A_/MatrixBase_instantiate_* 一组同量级的
# 实例化 TU,-O2 -g 下单进程峰值内存达 GB 级,4 路并行叠峰即打爆 6.9GiB。
# (1) 降单进程内存:CMake 会用环境变量 CXXFLAGS/CFLAGS 初始化 CMAKE_<LANG>_FLAGS
-# (本次构建日志证实内层 "C++ flags (active config.)" 就是透传进去的
-# rpmbuild %{optflags}),故在 make 之前覆盖为 -O1 -g0:本包已
-# %global debug_package %{nil},-g 只烧内存不出产物;-O1 对矩阵运算足够,
+# (build 112579 日志里内层 "C++ flags (active config.)" 就是 rpmbuild 的
+# optflags 透传结果),故在 make 之前覆盖为 -O1 -g0:本包文件头已把
+# debug_package 置空,-g 只烧内存不出产物;-O1 对矩阵运算足够,
# 并保留下游 hardening 项(stack-protector / FORTIFY / GLIBCXX_ASSERTIONS)。
# (2) 限并行:按“每个 cc1plus 预留 2.5GiB”从 MemTotal 反推 job 数,取
# min(nproc, 内存上限)、至少 1 路,避免多路 cc1plus 同时叠峰。
+# ★ 本段注释里禁止再出现百分号前缀的宏指令字样(global / define / undefine):
+# rpm 的 scriptlet 解析器会把注释行里的这类文本当宏定义提取,定义之后同一
+# 行的残留文本会被丢出来当命令执行 —— build 112584 就是这么挂的
+# ("line 105: command not found" → "Bad exit status from ...",而编译
+# 本身已 100% 通过、libmrpt-math.so 已链接)。
export CFLAGS="-O1 -g0 -fstack-protector-strong -Wp,-D_FORTIFY_SOURCE=2 -fasynchronous-unwind-tables"
export CXXFLAGS="-O1 -g0 -fstack-protector-strong -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fasynchronous-unwind-tables"
JOBS="$(nproc 2>/dev/null || echo 1)"
@@ -200,6 +205,17 @@ make install DESTDIR=%{buildroot}
/opt/ros/%{ros_distro}
%changelog
+* Tue Sep 22 2026 ai-importer <ai-importer@openeuler.org> - 2.15.20-3
+- 修复 build 段注释里的宏指令字样被 rpm 当宏定义提取、行尾残留文本被当命令
+ 执行(build 112584:编译已 100% 通过、libmrpt-math.so 已链接,随后
+ "/var/tmp/rpm-tmp.utF2pB: line 105: command not found" 导致
+ "Bad exit status from ... (build 段)")。rpm 的 scriptlet 解析器会把
+ 注释行里「百分号 + global/define + 名字 + 值」形式的文本提取为宏定义,
+ 定义之后同一行的剩余文本会被丢出来当脚本体执行——上一轮把 OOM 结论写进
+ 注释时踩到了这个坑。处置:该注释块改为不含百分号的纯文字(技术结论不变)。
+- 本轮构建日志同时确认上一轮的 OOM 治理已生效:-j2 + 内层 -O1 下全部 CXX
+ TU(含 CMatrixFixed.cpp 等实例化 TU,41 个)编译完成、libmrpt-math.so
+ 链接成功,全程无 cc1plus 被杀记录(build 112584)。
* Tue Sep 22 2026 ai-importer <ai-importer@openeuler.org> - 2.15.20-2
- 修复 %build 阶段 cc1plus 被 OOM killer 杀死(build 112579 实测:编译
libs/math/src/CMatrixFixed.cpp 时 "c++: fatal error: Killed signal