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

编译TWRP自定义Recovery时缺失pcre目标文件,请求技术帮助

Compiling TWRP for Lyf Flame 7s: Fixing te_assertions Redefinition & PCRE Missing Files Errors

Problem Details

  • Device: Lyf Flame 7s (LS_4008)
  • Setup: Building custom TWRP with self-created device tree, synced TWRP Omni manifest source code
  • Host Env: Fedora Linux 40 x86_64, kernel 6.8.5-301.fc40.x86_64
  • Errors:
    1. te_assertions symbol redefinition error
    2. Massive PCRE-related object file missing errors leading to compilation failure
  • Attempted Fixes:
    • Repeated make clean && make -j$(nproc --all) recoveryimage
    • Installed pcre-cpp, pcre-devel dependencies

Solutions

Fix te_assertions Redefinition Error

  • Check your device tree files (especially BoardConfig.mk, Android.mk, or included headers) for duplicate references to modules or headers that define te_assertions. Remove any redundant includes or module additions.
  • Locate where te_assertions is defined in the TWRP source tree, then check if your device tree has a custom symbol with the same name. Rename the custom symbol or remove the conflicting definition.

Fix PCRE Missing Object Files Error

  • Install pcre2-devel instead of (or alongside) pcre-devel—many recent TWRP branches depend on PCRE2 rather than the older PCRE library.
  • Run repo sync -j$(nproc) before compiling to ensure all TWRP dependency sources are fully synced, as missing PCRE modules could be due to incomplete source pull.
  • Add explicit PCRE linker flags to your device tree's BoardConfig.mk:
    LOCAL_LDFLAGS += -lpcre -lpcrecpp
    
  • Try compiling with a single thread (make -j1 recoveryimage) to avoid race conditions in multi-threaded builds that might cause file dependency issues. This can also help pinpoint the exact missing file for further debugging.

Additional Troubleshooting Steps

  • Check the full compilation log to get the exact file paths where te_assertions is duplicated—this lets you target the exact conflict point.
  • Verify your device tree's Android.mk and BoardConfig.mk follow TWRP's standard structure, ensuring proper inheritance of Omni build configurations.
  • Switch to a stable TWRP branch (e.g., twrp-12.1) instead of the latest dev branch, as newer branches may have untested compatibility with Fedora 40's libraries.

内容的提问来源于stack exchange,提问作者Random Guy

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.21 10:38:24