<div dir="ltr"><div>Hey, guys.</div><div><br></div>I'm using androideabi linker as i'm compiling for android (ARM Linux).<div><br></div><div>thanks for verbose flag tip, i've tried and output is pretty largeso dive in it if you have time and wish:</div>
<div><br></div><div>/home/asmirnov/arm-toolchain-clang33/bin/arm-linux-androideabi-clang++ -target arm-linux-androideabi -mcpu=cortex-a9 -I/home/asmirnov/android-ndk-r9/platforms/android-8/arch-arm/include -I/home/asmirnov/android-ndk-r9/platforms/android-8/arch-arm/usr/include -mfloat-abi=soft -ccc-gcc-name arm-linux-androideabi -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -Wno-nested-anon-types -fno-rtti -ldl CMakeFiles/c-index-test.dir/c-index-test.c.o -o ../../../../bin/c-index-test -L/home/asmirnov/arm-toolchain-clang33/lib/gcc/arm-linux-androideabi/4.6 -L/home/asmirnov/arm-toolchain-clang33/arm-linux-androideabi/lib -L/home/asmirnov/arm-toolchain-clang33/sysroot/usr/lib ../../../../lib/libLLVMMC.a ../../../../lib/libLLVMObject.a ../../../../lib/libLLVMSupport.a -ldl -lz ../../../../lib/libclang.so.3.3 ../../../../lib/libclangARCMigrate.a ../../../../lib/libclangFormat.a ../../../../lib/libclangTooling.a ../../../../lib/libclangRewriteFrontend.a ../../../../lib/libclangRewriteCore.a ../../../../lib/libclangFrontend.a ../../../../lib/libclangDriver.a ../../../../lib/libclangSerialization.a ../../../../lib/libLLVMBitReader.a ../../../../lib/libclangParse.a ../../../../lib/libclangSema.a ../../../../lib/libLLVMARMCodeGen.a ../../../../lib/libLLVMARMAsmParser.a ../../../../lib/libLLVMARMDisassembler.a ../../../../lib/libLLVMAsmParser.a ../../../../lib/libLLVMAsmPrinter.a ../../../../lib/libLLVMSelectionDAG.a ../../../../lib/libLLVMARMDesc.a ../../../../lib/libLLVMMCParser.a ../../../../lib/libLLVMCodeGen.a ../../../../lib/libLLVMARMAsmPrinter.a ../../../../lib/libLLVMARMInfo.a ../../../../lib/libLLVMObjCARCOpts.a ../../../../lib/libLLVMScalarOpts.a ../../../../lib/libLLVMInstCombine.a ../../../../lib/libLLVMTransformUtils.a ../../../../lib/libLLVMipa.a ../../../../lib/libLLVMAnalysis.a ../../../../lib/libLLVMTarget.a ../../../../lib/libLLVMCore.a ../../../../lib/libclangEdit.a ../../../../lib/libclangAnalysis.a ../../../../lib/libclangASTMatchers.a ../../../../lib/libclangAST.a ../../../../lib/libclangLex.a ../../../../lib/libclangBasic.a ../../../../lib/libLLVMMC.a ../../../../lib/libLLVMObject.a ../../../../lib/libLLVMSupport.a -ldl -lz -ldl -lc -ldl -Wl,-rpath,/home/asmirnov/llvm_arm_build/lib <br>
/home/asmirnov/arm-toolchain-clang33/bin/arm-linux-androideabi-ld: ../../../../lib/libclang.so.3.3: error: undefined reference to 'dladdr'<br>clang33: error: linker command failed with exit code 1 (use -v to see invocation)<br>
</div><div><br></div><div>I will keep trying to solve it but your help is appreciated too.</div><div>thank you.</div><div><br></div><div>PS. Actually my current cmake command-line is:</div><div><br></div><div>CC="arm-linux-androideabi-clang" CXX="arm-linux-androideabi-clang++" PATH=/home/asmirnov/arm-toolchain-clang33:${PATH} cmake ../llvm -DCMAKE_CROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=/home/asmirnov/llvm_arm_installed -DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-androideabi -DLLVM_TARGET_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DLLVM_TABLEGEN=/home/asmirnov/llvm_host_build/Release+Asserts/bin/llvm-tblgen -DCLANG_TABLEGEN=/home/asmirnov/llvm_host_build/Release+Asserts/bin/clang-tblgen -DCMAKE_CXX_FLAGS='-target arm-linux-androideabi -mcpu=cortex-a9 -I/home/asmirnov/android-ndk-r9/platforms/android-8/arch-arm/include -I/home/asmirnov/android-ndk-r9/platforms/android-8/arch-arm/usr/include -mfloat-abi=soft -ccc-gcc-name arm-linux-androideabi' <br>
</div><div><br></div><div>I'm using standalone toolchain from android ndk (clang 3.3)</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/3 Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It sounds like Android might put libdl in an odd place, though I've<br>
never tried to build for it. You might have to tell CMake about this<br>
location before it will work.<br>
<br>
Anton: running "make VERBOSE=1" will show the actual command-line<br>
that's failing. That could shed some light on what's going on (e.g.<br>
whether -ldl is completely missing or just in the wrong place).<br>
<div class="im"><br>
> Did you try the solution in that question?<br>
<br>
</div>Even I wouldn't know how to do that. This is LLVM's own build system.<br>
Set CMAKE_CXX_FLAGS? Set CMAKE_EXE_LINKER_FLAGS?<br>
<br>
Cheers.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br></div>