Build failure with android-8.0.0_r23 (and master)

293 views
Skip to first unread message

Will Newton

unread,
Nov 6, 2017, 12:28:11 PM11/6/17
to Android Building

Hi,

I'm trying to build AOSP on Ubuntu 16.04 and running into this error on the Android 8 and master branches:

[ 73% 47110/64124] host Prebuilt: minigzip (/temp/out/dist/android-repo/host/linux-x86/obj/EXECUTABLES/minigzip_intermediates/minigzip)
[ 73% 47111/64124] //external/llvm/utils/TableGen:llvm-tblgen link llvm-tblgen [linux_glibc]
FAILED: /temp/out/dist/android-repo/soong/.intermediates/external/llvm/utils/TableGen/llvm-tblgen/linux_glibc_x86_64/llvm-tblgen
prebuilts/clang/host/linux-x86/clang-4393122/bin/clang++  @/temp/out/dist/android-repo/soong/.intermediates/external/llvm/utils/TableGen/llvm-tblgen/linux_glibc_x86_64/llvm-tblgen.rsp /temp/out/dist/android-repo/soong/.intermediates/external/llvm/lib/TableGen/libLLVMTableGen/linux_glibc_x86_64_static/libLLVMTableGen.a /temp/out/dist/android-repo/soong/.intermediates/external/llvm/lib/Support/libLLVMSupport/linux_glibc_x86_64_static/libLLVMSupport.a -Wl,--start-group /temp/out/dist/android-repo/soong/.intermediates/external/compiler-rt/libcompiler_rt-extras/linux_glibc_x86_64_static/libcompiler_rt-extras.a -Wl,--end-group /temp/out/dist/android-repo/soong/.intermediates/external/libcxx/libc++/linux_glibc_x86_64_shared/libc++.so  -o /temp/out/dist/android-repo/soong/.intermediates/external/llvm/utils/TableGen/llvm-tblgen/linux_glibc_x86_64/llvm-tblgen -target x86_64-linux-gnu -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--no-undefined-version --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -m64 -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/lib/gcc/x86_64-linux/4.8 -Lprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/lib/gcc/x86_64-linux/4.8 -Lprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/lib64 -lncurses -lgcc_s -ldl -lpthread -lm -lrt -Wl,-rpath,\$ORIGIN/../lib64 -Wl,-rpath,\$ORIGIN/lib64  -pie -nodefaultlibs -lgcc_s -lgcc -lc -lgcc_s -lgcc
external/llvm/include/llvm/ADT/SmallVector.h:81: error: undefined reference to 'llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long)'
external/llvm/include/llvm/ADT/SmallVector.h:81: error: undefined reference to 'llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long)'
external/llvm/include/llvm/ADT/SmallVector.h:81: error: undefined reference to 'llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long)'
external/llvm/include/llvm/ADT/SmallVector.h:81: error: undefined reference to 'llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long)'
external/llvm/include/llvm/Support/CommandLine.h:345: error: undefined reference to 'vtable for llvm::cl::Option'
external/llvm/include/llvm/Support/CommandLine.h:307: error: undefined reference to 'llvm::cl::GeneralCategory'

(many more undefined symbols follow)

The symbols all seem to be in libLLVM.so which is not part of the link as far as I can tell. Any ideas why this might be happening?

Thanks,

Will Newton

unread,
Nov 7, 2017, 3:06:56 PM11/7/17
to Android Building

It looks like these symbols should be in libLLVMSupport but aren't. After making some changes and then reverting them the problem has fixed itself, which makes me suspect it could be related to concurrency (I was using make -j 4) or possibly some kind of ccache issue (I also nuked the cache at some point).
Reply all
Reply to author
Forward
0 new messages