<div dir="ltr"><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><a href="http://stackoverflow.com/questions/12993460/why-am-i-getting-undefined-reference-to-dladdr-even-with-ldl-for-this-simpl" target="_blank">http://stackoverflow.com/questions/12993460/why-am-i-getting-undefined-reference-to-dladdr-even-with-ldl-for-this-simpl</a><div>
<br></div><div>So i wonder what should i do and is it bug or my dev env issue?</div></div></blockquote><div></div></div></div><br></div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">> Did you try the solution in that question?</div>
<div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px"><br></div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">I did not actually catch what should i do.</div><div class="gmail_extra" style="font-size:13px">
<font face="arial, sans-serif">Should i just run </font><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">`</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">llvm</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">-</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">config </span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">--</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">libs core</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">`</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline"> </span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">`</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">llvm</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">-</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">config </span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">--</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">ldflags</span><span class="" style="font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline">`</span><span class="" style="background-color:transparent;color:rgb(0,0,0);font-size:14px;line-height:18px;margin:0px;padding:0px;border:0px;vertical-align:baseline"><font face="arial, helvetica, sans-serif"> before "make"?</font></span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/3 Anton Smirnov <span dir="ltr"><<a href="mailto:dev@antonsmirnov.name" target="_blank">dev@antonsmirnov.name</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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 <div class="im">
<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><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="HOEnZb"><div class="h5"><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><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><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>