<div dir="ltr">I've found both *tblgens in build folder, not in installed files folder.<div><br></div><div>Then i used the paths above for cross-compiling using cmake and received ld error: that i have previously received:</div>

<div>"relocations in generic elf"  and finally "could not read symbols: file in wrong format" for libLLVMSupport.a file:<br><br>Linking CXX executable ../../bin/llvm-tblgen<br>/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: ../../lib/libLLVMSupport.a(regcomp.c.o): Relocations in generic ELF (EM: 3)<br>
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: ../../lib/libLLVMSupport.a(regcomp.c.o): Relocations in generic ELF (EM: 3)<br>/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/ld: ../../lib/libLLVMSupport.a(regcomp.c.o): Relocations in generic ELF (EM: 3)<br>
../../lib/libLLVMSupport.a: could not read symbols: File in wrong format<br>clang-3.4: error: linker command failed with exit code 1 (use -v to see invocation)<br>make[2]: *** [bin/llvm-tblgen] Error 1<br>make[1]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2<br>
make: *** [all] Error 2<br><br></div><div>The files exists.<br></div><div>What should i do?<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/29 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><div><div><div><div><div><div><div><div><div><div>Since tblgen need host compile to be done I've decided to do everything from scratch.<br>
<br><br></div><div>mkdir & cd in new build folder<br></div>
</div>cmake ../llvm -DCMAKE_INSTALL_PREFIX=/Users/asmirnov/llvm_cmake_host_installed -DCMAKE_BUILD_TYPE=Release<br></div>make<br></div>make install<br></div><br></div>The first time i've used autotools to configure and make clang for host.<br>

</div>Now i decided to use cmake.<br><br></div>Now i don't have clang-tblgen executable for some reason (it was while using autotools but i refused to use it due to previous attempt ld errors):<br>asmirnov@vmb:/Users/asmirnov/llvm_cmake_host_installed/bin$ find /Users/asmirnov/llvm_cmake_host_installed -name "*tblgen"<br>

/Users/asmirnov/llvm_cmake_host_installed/bin/llvm-tblgen<br><br></div>Is it okay? Why while using cmake clang-tblgen was not done.<br></div>There were no errors while cmake or make.<br><br></div>Regards, Anton.<br></div>
<div class="HOEnZb"><div class="h5">
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/29 Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</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>On 28 September 2013 22:07, Anton Smirnov <span dir="ltr"><<a href="mailto:dev@antonsmirnov.name" target="_blank">dev@antonsmirnov.name</a>></span> wrote:<br></div><div class="gmail_extra">
<div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I've specified paths for tblgens for host system. Is it wrong?<br></div></div></div></blockquote>


<div><br></div></div><div>No, that's correct, but it looks like your build directory is not clean. CMake is not that smart, so complete removal and re-creation of the build dir could fix that.</div><span><font color="#888888"><div>

<br></div><div>--renato</div>
</font></span></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>