Android 7.1 使用mmm编译模块失败

平台:

RK3288 + android 7.1

问题:

rk3288_n712$ mmm frameworks/base/cmds/app_process/

....
Starting build with ninja
ninja: Entering directory `.'
ninja: error: 'out/target/product/rk3288/system/bin/linker_asan', needed by 'out/target/product/rk3288/system/bin/asan/app_process32', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

#### make failed to build some targets (19 seconds) ####

提示这个模块/文件没找到:out/target/product/rk3288/system/bin/linker_asan
rk3288_n712$ ll out/target/product/rk3288/system/bin/linker_asan
ls: cannot access 'out/target/product/rk3288/system/bin/linker_asan': No such file or directory
确实没有.

分析:

    单独编译不能通过? 但是全部编译却可以成功, 这种问题之前也遇到过, 只是一直忽略它.
    按旧版本的SDK编译解决方案, 找出linker_asan这个模块, 并编译它, 可惜, 搜索全部模块, 也找不到它.

无意间, 在查看najia脚本中发现了点端倪.

|-- out/build-rk3288.ninja: 
command = /bin/bash -c "(rm -rf out/target/product/rk3288/system/bin/linker_asan ) && (ln -sf linker out/target/product/rk3288/system/bin/linker_asan )"

什么意思?
linker_asan 只是linker的软链

解决:

ln -sf linker out/target/product/rk3288/system/bin/linker_asan
执行后再编译, 问题解决:

rk3288_n712$ mmm frameworks/base/cmds/app_process/
Running kati to generate build-rk3288-mmm-frameworks_base_cmds_app_process_Android.mk.ninja...
[100% 15/15] Install: out/target/product/rk3288/system/bin/asan/app_process32

#### make completed successfully (39 seconds) ####

PS: 在后续编译中, 更暴力地解决:

cp out/target/product/rk3288/system/bin/linker out/target/product/rk3288/system/bin/linker_asan
 

你可能感兴趣的:(Android 7.1 使用mmm编译模块失败)