[Beignet] opencl-1.2 branch head compile error and warnings
Robert Jobbagy
jobbagy.robert at gmail.com
Tue Jan 7 09:49:34 PST 2014
And I always gave this cmake error too:
LLVM llvm-config found at: /usr/bin/llvm-config-3.2
CMake Error at CMake/FindLLVM.cmake:29 (message):
imcompatible LLVM version 3.2
required 3.3
Call Stack (most recent call first):
CMakeLists.txt:68 (Find_Package)
and I always choose llvm-3.3 by manually
I made a little patch what fix this :
diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake
index 339a099..48c495f 100644
--- a/CMake/FindLLVM.cmake
+++ b/CMake/FindLLVM.cmake
@@ -7,9 +7,9 @@
# LLVM_MODULE_LIBS - list of llvm libs for working with modules.
# LLVM_FOUND - True if llvm found.
if (LLVM_INSTALL_DIR)
- 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
+ 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-
else (LLVM_INSTALL_DIR)
- 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
+ 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-
endif (LLVM_INSTALL_DIR)
if (LLVM_CONFIG_EXECUTABLE)
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 ?
2014/1/7 Robert Jobbagy <jobbagy.robert at gmail.com>
> Hi,
>
> After the update I gave this error :
>
> /beignet_opencl_1_2/backend/src/ocl_barrier.ll:9:50: error: expected
> top-level entity
> declare void @__gen_ocl_barrier_local() nounwind noduplicate alwaysinline
> ^
> make[2]: *** [backend/src/ocl_barrier.ll.bc] Error 1
> make[1]: *** [backend/src/CMakeFiles/beignet.bc.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs....
>
> I used llvm 3.3-5ubuntu4
>
> workaround:
> I removed all noduplicate marker from declares and defines
>
> I saw these warnings too:
>
> In file included from
> /usr/lib/llvm-3.3/include/clang/Basic/VersionTuple.h:19:0,
> from
> /usr/lib/llvm-3.3/include/clang/Basic/ObjCRuntime.h:18,
> from
> /usr/lib/llvm-3.3/include/clang/Basic/LangOptions.h:20,
> from
> /usr/lib/llvm-3.3/include/clang/Frontend/FrontendAction.h:22,
> from
> /usr/lib/llvm-3.3/include/clang/CodeGen/CodeGenAction.h:13,
> from
> /home/evil85/workspace/cpp/beignet_opencl_1_2/backend/src/backend/program.cpp:56:
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h: In instantiation of ‘T*
> llvm::Optional<T>::getPointer() [with T = unsigned int]’:
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:123:76: required from ‘T&
> llvm::Optional<T>::operator*() [with T = unsigned int]’
> /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]’
> /usr/lib/llvm-3.3/include/clang/Basic/VersionTuple.h:60:14: required
> from here
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:114:79: warning:
> dereferencing type-punned pointer will break strict-aliasing rules
> [-Wstrict-aliasing]
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h: In instantiation of ‘T*
> llvm::Optional<T>::getPointer() [with T = bool]’:
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:123:76: required from ‘T&
> llvm::Optional<T>::operator*() [with T = bool]’
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:104:7: required from ‘void
> llvm::Optional<T>::reset() [with T = bool]’
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:110:5: required from
> ‘llvm::Optional<T>::~Optional() [with T = bool]’
> /usr/lib/llvm-3.3/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:397:27:
> required from here
> /usr/lib/llvm-3.3/include/llvm/ADT/Optional.h:114:79: warning:
> dereferencing type-punned pointer will break strict-aliasing rules
> [-Wstrict-aliasing]
>
> /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'
>
>
> I made something wrong ? Previous version (2013-12-05) compiled fine.
>
>
>
>
> --
> Best Regards,
>
> Robert
>
--
Best Regards,
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/beignet/attachments/20140107/8751cfea/attachment.html>
More information about the Beignet
mailing list