编译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:
te_assertionssymbol redefinition error- 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-develdependencies
- Repeated
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 definete_assertions. Remove any redundant includes or module additions. - Locate where
te_assertionsis 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-develinstead 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_assertionsis duplicated—this lets you target the exact conflict point. - Verify your device tree's
Android.mkandBoardConfig.mkfollow 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
相关产品推荐
相关产品推荐

