<div dir="ltr">And I always gave this cmake error too:<br><br>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">LLVM llvm-config found at: /usr/bin/llvm-config-3.2</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">CMake Error at CMake/FindLLVM.cmake:29 (message):</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"> imcompatible LLVM version 3.2</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"><br></font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"> required 3.3</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">Call Stack (most recent call first):</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"> CMakeLists.txt:68 (Find_Package)<br><br>and I always choose llvm-3.3 by manually <br><br>I made a little patch what fix this :<br><br>
</font></p><p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake</font></p><p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">index 339a099..48c495f 100644</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">--- a/CMake/FindLLVM.cmake</font></p><p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">+++ b/CMake/FindLLVM.cmake</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">@@ -7,9 +7,9 @@</font></p><p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"> # LLVM_MODULE_LIBS - list of llvm libs for working with modules.</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"> # LLVM_FOUND - True if llvm found.</font></p><p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"> if (LLVM_INSTALL_DIR)</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">- find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-32 llvm-config-3.2 llvm-config-31 llvm-config-3.1 llvm-config-3.4 llvm-config DOC "llv</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">+ find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-33 llvm-config-3.3 llvm-config-32 llvm-config-3.2 llvm-config-31 llvm-config-3.1 llvm-</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"> else (LLVM_INSTALL_DIR)</font></p><p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">- find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-32 llvm-config-3.2 llvm-config-31 llvm-config-3.1 llvm-config-3.4 llvm-config DOC "llv</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)">+ find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-33 llvm-config-3.3 llvm-config-32 llvm-config-3.2 llvm-config-31 llvm-config-3.1 llvm-</font></p>
<p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"> endif (LLVM_INSTALL_DIR)</font></p><p style="margin:0px"><font color="#000000" style="background-color:rgb(255,255,255)"> </font></p><p style="margin:0px">
<font color="#000000" style="background-color:rgb(255,255,255)"> if (LLVM_CONFIG_EXECUTABLE)</font></p><p style="margin:0px"><span style="color:rgb(255,0,0)"><br></span></p><p style="margin:0px"><span style="color:rgb(255,0,0)"><br>
</span></p><p style="margin:0px"><font color="#000000">Another one suggestion if required llvm version is 3.3 maybe llvm 3.1 and 3.2 is not necessary in this file, what do you think ? </font></p></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014/1/7 Robert Jobbagy <span dir="ltr"><<a href="mailto:jobbagy.robert@gmail.com" target="_blank">jobbagy.robert@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,<br><br>After the update I gave this error :<div><br></div><div><div>/beignet_opencl_1_2/backend/src/ocl_barrier.ll:9:50: error: expected top-level entity</div><div>declare void @__gen_ocl_barrier_local() nounwind noduplicate alwaysinline</div>
<div> ^</div><div>make[2]: *** [backend/src/ocl_barrier.ll.bc] Error 1</div><div>make[1]: *** [backend/src/CMakeFiles/beignet.bc.dir/all] Error 2</div><div>make[1]: *** Waiting for unfinished jobs....</div>
<div><br></div><div>I used llvm 3.3-5ubuntu4 </div><div><br></div><div>workaround:</div><div>I removed all noduplicate marker from declares and defines</div><div><br></div><div>I saw these warnings too:</div><div><br></div>
<div><div>In file included from /usr/lib/llvm-3.3/include/clang/Basic/VersionTuple.h:19:0,</div><div> from /usr/lib/llvm-3.3/include/clang/Basic/ObjCRuntime.h:18,</div><div> from /usr/lib/llvm-3.3/include/clang/Basic/LangOptions.h:20,</div>
<div> from /usr/lib/llvm-3.3/include/clang/Frontend/FrontendAction.h:22,</div><div> from /usr/lib/llvm-3.3/include/clang/CodeGen/CodeGenAction.h:13,</div><div> from /home/evil85/workspace/cpp/beignet_opencl_1_2/backend/src/backend/program.cpp:56:</div>
<div>/usr/lib/llvm-3.3/include/llvm/ADT/Optional.h: In instantiation of ‘T* llvm::Optional<T>::getPointer() [with T = unsigned int]’:</div><div>/usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:123:76: required from ‘T& llvm::Optional<T>::operator*() [with T = unsigned int]’</div>
<div>/usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:51:7: required from ‘llvm::Optional<T>::Optional(llvm::Optional<T>&&) [with T = unsigned int]’</div><div>/usr/lib/llvm-3.3/include/clang/Basic/VersionTuple.h:60:14: required from here</div>
<div>/usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:114:79: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]</div><div>/usr/lib/llvm-3.3/include/llvm/ADT/Optional.h: In instantiation of ‘T* llvm::Optional<T>::getPointer() [with T = bool]’:</div>
<div>/usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:123:76: required from ‘T& llvm::Optional<T>::operator*() [with T = bool]’</div><div>/usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:104:7: required from ‘void llvm::Optional<T>::reset() [with T = bool]’</div>
<div>/usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:110:5: required from ‘llvm::Optional<T>::~Optional() [with T = bool]’</div><div>/usr/lib/llvm-3.3/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:397:27: required from here</div>
<div>/usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:114:79: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]</div><div><br></div><div><div>/home/evil85/workspace/cpp/beignet_opencl_1_2/backend/src/backend/program.cpp:652: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'</div>
</div><div><br></div><div><br></div>I made something wrong ? Previous version (2013-12-05) compiled fine.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><br>
<br clear="all"><div><br></div>-- <br>Best Regards,<br><br>Robert
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<br><br>Robert
</div>