glibc-2.17 编译失败

报错如下:

Error: `_obstack@GLIBC_2.2.5' can't be versioned to common symbol '_obstack_compat'

修复方法: 修改代码

diff --git a/malloc/obstack.c b/malloc/obstack.c
index 5786da0aa4..c27a422077 100644
--- a/malloc/obstack.c
+++ b/malloc/obstack.c
@@ -116,7 +116,7 @@ int obstack_exit_failure = EXIT_FAILURE;
/* A looong time ago (before 1994, anyway; we're not sure) this global variable
was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
library still exports it because somebody might use it. */
-struct obstack *_obstack_compat;
+struct obstack *_obstack_compat = 0;
compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
# endif
# endif

reference: https://www.lordaro.co.uk/posts/2018-08-26-compiling-glibc.html
reference: https://forum.slitaz.org/topic/unable-to-compile-glibc-dev-glibc-locale

posted @   stdpain  阅读(146)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
历史上的今天:
2020-09-05 有趣的BUG
点击右上角即可分享
微信分享提示