You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Android(bionic)环境的Termux中编译安装glibc遇错求助

在Termux(Android bionic)环境编译glibc的问题

环境信息

  • 实验目的:在Termux中编译安装glibc用于实验
  • 硬件/系统:aarch64架构,Android 12(Termux),依赖bionic而非aarch64-linux-gnu
  • 已安装依赖:gcc、clang、python等

使用的configure命令

../configure CFLAGS="-march=native -Wp,-D_FORTIFY_SOURCE=2 -O2 -pipe" --prefix=$PREFIX --libdir=$PREFIX/lib --libexecdir=$PREFIX/lib --with-headers=$PREFIX/include --enable-bind-now --enable-cet --enable-kernel=5.10 --enable-stack-protector=strong --disable-profile --disable-crypt --disable-werror --enable-systemtap --target=aarch64-linux-android --host=aarch64-linux-android

编译过程中遇到的错误

  1. 初始错误:

In file included from :
syslog.c: In function '__vsyslog_internal':
syslog.c:94:30: error: inlining failed in call to 'always_inline' 'syslog': function not inlinable

删除syslog.c第134行后该问题暂时解决,但后续出现大量未定义引用错误,示例错误包括:

  • undefined reference to '__getauxval'
  • undefined reference to 'arc4random'
  • undefined reference to '__cmsg_nxthdr'
  • undefined reference to '__fdelt_chk'
    涉及多个底层函数符号的链接错误。

请求帮助

本人不懂编程语言,希望得到具体的解决步骤来修复这些编译错误。

内容的提问来源于stack exchange,提问作者Saikat Saha

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 16:45:32