Hi to you,<br><br>sorry to bother you guys again, but llvm 3.6 is almost out and beignet still doesnt compile with the latest git:<div><br></div><div><div>In file included from /home/groo/devel/intel/beignet/beignet/backend/src/./sys/vector.hpp:28:0,</div><div> from /home/groo/devel/intel/beignet/beignet/backend/src/./ir/register.hpp:27,</div><div> from /home/groo/devel/intel/beignet/beignet/backend/src/./ir/instruction.hpp:27,</div><div> from /home/groo/devel/intel/beignet/beignet/backend/src/./backend/context.hpp:23,</div><div> from /home/groo/devel/intel/beignet/beignet/backend/src/backend/program.hpp:29,</div><div> from /home/groo/devel/intel/beignet/beignet/backend/src/backend/program.cpp:26:</div><div>/usr/lib/llvm-3.6/include/llvm/Support/SpecialCaseList.h: At global scope:</div><div>/home/groo/devel/intel/beignet/beignet/backend/src/./sys/platform.hpp:263:12: error: expected ‘,’ or ‘...’ before ‘(’ token</div><div> #define MB (KB*KB)</div><div> ^</div><div>/usr/lib/llvm-3.6/include/llvm/Support/SpecialCaseList.h:67:70: note: in expansion of macro ‘MB’</div><div> static std::unique_ptr<SpecialCaseList> create(const MemoryBuffer *MB,</div><div> ^</div><div>/home/groo/devel/intel/beignet/beignet/backend/src/./sys/platform.hpp:263:12: error: expected ‘,’ or ‘...’ before ‘(’ token</div><div> #define MB (KB*KB)</div><div> ^</div><div>/usr/lib/llvm-3.6/include/llvm/Support/SpecialCaseList.h:92:34: note: in expansion of macro ‘MB’</div><div> bool parse(const MemoryBuffer *MB, std::string &Error);</div><div> ^</div><div>/home/groo/devel/intel/beignet/beignet/backend/src/backend/program.cpp: In function ‘bool gbe::buildModuleFromSource(const char*, llvm::Module**, llvm::LLVMContext*, std::vector<std::basic_string<char> >&, size_t, char*, size_t*)’:</div><div>/home/groo/devel/intel/beignet/beignet/backend/src/backend/program.cpp:614:44: error: cannot convert ‘std::unique_ptr<llvm::Module>’ to ‘llvm::Module*’ in initialization</div><div> llvm::Module *module = Act->takeModule();</div><div> ^</div><div><span>backend/src/CMakeFiles/<a class="linkclass" href="http://gbe.dir/build.make:586">gbe.dir/build.make:586</a>: recipe for target 'backend/src/CMakeFiles/<a class="linkclass" href="http://gbe.dir/backend/program.cpp.o">gbe.dir/backend/program.cpp.o</a>' failed</span></div><div><span>make[2]: *** [backend/src/CMakeFiles/<a class="linkclass" href="http://gbe.dir/backend/program.cpp.o">gbe.dir/backend/program.cpp.o</a>] Error 1</span></div><div><span>CMakeFiles/Makefile2:114: recipe for target 'backend/src/CMakeFiles/<a class="linkclass" href="http://gbe.dir/all">gbe.dir/all</a>' failed</span></div></div><div><br></div><div>could you guys take a look at it?</div><div><br></div><div>thanks in advance</div><div><br></div><div>Paulo Dias</div><br><div class="gmail_quote">On Tue Nov 04 2014 at 5:18:25 AM Zhenyu Wang <<a href="mailto:zhenyuw@linux.intel.com">zhenyuw@linux.intel.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2014.11.03 08:46:41 +0000, Yang, Rong R wrote:<br>
> Yes, some errors is because llvm use std:: unique_ptr as some function’s return<br>
> value instead of the normal ptr, there are some other errors after fix std::<br>
> unique_ptr error.<br>
><br>
> As we notice that LLVM plan to release LLVM/Clang 3.6 soon, suppose the LLVM<br>
> 3.6 approach to stable now, I am working to support LLVM 3.6 now. Hope could<br>
> finish it soon.<br>
><br>
<br>
One option is to explicitly say the llvm version that beignet does support<br>
and refuse to go on otherwise, like below one?<br>
<br>
From: Zhenyu Wang <<a href="mailto:zhenyuw@linux.intel.com" target="_blank">zhenyuw@linux.intel.com</a>><br>
Date: Tue, 4 Nov 2014 15:14:44 +0800<br>
Subject: [PATCH] Explicitly check LLVM version when building<br>
<br>
Instead of allowing for failure attemps to build with llvm unstable<br>
version this trys to explicitly tell the llvm version that beignet support.<br>
<br>
Signed-off-by: Zhenyu Wang <<a href="mailto:zhenyuw@linux.intel.com" target="_blank">zhenyuw@linux.intel.com</a>><br>
---<br>
CMakeLists.txt | 3 +++<br>
1 file changed, 3 insertions(+)<br>
<br>
diff --git a/CMakeLists.txt b/CMakeLists.txt<br>
index 40cb74c..7059b2b 100644<br>
--- a/CMakeLists.txt<br>
+++ b/CMakeLists.txt<br>
@@ -94,6 +94,9 @@ set (CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG -DGBE_DEBUG=0")<br>
# Front end stuff we need<br>
#INCLUDE(CMake/FindLLVM.cmake)<br>
Find_Package(LLVM 3.3)<br>
+IF(LLVM_VERSION VERSION_GREATER 3.5)<br>
+ MESSAGE(FATAL_ERROR "Don't support LLVM > 3.5 now.")<br>
+ENDIF(LLVM_VERSION VERSION_GREATER 3.5)<br>
<br>
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${LLVM_LDFLAGS}")<br>
<br>
--<br>
2.1.1<br>
<br>
--<br>
Open Source Technology Center, Intel ltd.<br>
<br>
$gpg --keyserver <a href="http://wwwkeys.pgp.net" target="_blank">wwwkeys.pgp.net</a> --recv-keys 4D781827<br>
</blockquote></div>