编译Android 4.0源码错误整理

host StaticLib: libclangBasic (out/host/linux-x86/obj/STATIC_LIBRARIES/libclangBasic_intermediates/libclangBasic.a)
host Executable: llvm-rs-cc (out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/llvm-rs-cc)
out/host/linux-x86/obj/STATIC_LIBRARIES/libslang_intermediates/libslang.a(slang.o): In function `ForcePassLinking':
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:51: undefined reference to `llvm::createArgumentPromotionPass(unsigned int)'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:59: undefined reference to `llvm::createConstantMergePass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:61: undefined reference to `llvm::createDeadArgEliminationPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:73: undefined reference to `llvm::createFunctionInliningPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:74: undefined reference to `llvm::createAlwaysInlinerPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:75: undefined reference to `llvm::createGlobalDCEPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:76: undefined reference to `llvm::createGlobalOptimizerPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:78: undefined reference to `llvm::createIPConstantPropagationPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:82: undefined reference to `llvm::createInternalizePass(bool)'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:87: undefined reference to `llvm::createLoopExtractorPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:124: undefined reference to `llvm::createSingleLoopExtractorPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:140: undefined reference to `llvm::createFunctionAttrsPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:141: undefined reference to `llvm::createMergeFunctionsPass()'
~/android_ics_404/external/llvm/include/llvm/LinkAllPasses.h:146: undefined reference to `llvm::createPartialInliningPass()'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMipo_intermediates/libLLVMipo.a(PassManagerBuilder.o): In function `llvm::PassManagerBuilder::populateModulePassManager(llvm::PassManagerBase&)':
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:187: undefined reference to `llvm::createConstantMergePass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:130: undefined reference to `llvm::createFunctionAttrsPass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:132: undefined reference to `llvm::createArgumentPromotionPass(unsigned int)'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:113: undefined reference to `llvm::createGlobalOptimizerPass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:116: undefined reference to `llvm::createDeadArgEliminationPass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:184: undefined reference to `llvm::createGlobalDCEPass()'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMipo_intermediates/libLLVMipo.a(PassManagerBuilder.o): In function `llvm::PassManagerBuilder::populateLTOPassManager(llvm::PassManagerBase&, bool, bool)':
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:209: undefined reference to `llvm::createGlobalOptimizerPass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:213: undefined reference to `llvm::createConstantMergePass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:216: undefined reference to `llvm::createDeadArgEliminationPass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:233: undefined reference to `llvm::createGlobalDCEPass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:237: undefined reference to `llvm::createArgumentPromotionPass(unsigned int)'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:246: undefined reference to `llvm::createFunctionAttrsPass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:264: undefined reference to `llvm::createGlobalDCEPass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:201: undefined reference to `llvm::createInternalizePass(bool)'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:226: undefined reference to `llvm::createFunctionInliningPass()'
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:232: undefined reference to `llvm::createGlobalOptimizerPass()'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMipo_intermediates/libLLVMipo.a(PassManagerBuilder.o): In function `LLVMPassManagerBuilderUseInlinerWithThreshold':
~/android_ics_404/external/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:316: undefined reference to `llvm::createFunctionInliningPass(int)'
collect2: ld 返回 1
make[1]: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/llvm-rs-cc] 错误 1
make[1]:正在离开目录 `~/android_ics_404'

解决:

1.把make -j4 修改为 make -j2(或者直接 make)

2.上面的方法不行, 就只好直接删除out这个目录了.




你可能感兴趣的:(环境搭建,android,4.0,源码,llvm)