Open philtomson opened 6 years ago
This should be related to https://github.com/JuliaGPU/OpenCL.jl/issues/137 in one way or the other!
Hm, I can't find the correct instructions + issues anymore. But I think compiling julia to statically link LLVM should fix this!
Would that be adding the following to the Make.user?
USE_SYSTEM_LLVM = 0 USE_LLVM_SHLIB = 0
I think it was USE_LLVM_SHLIB = 1
. I'm surprised i can't find that issue :( I'm not at my pc right now, but maybe you have more luck googling for it!
ah no, you're right... this is the issue i had in mind: https://github.com/JuliaGL/GLFW.jl/issues/96#comment-265580404
Tried rebuilding julia with those options in the Make.user and oddly enough I'm able to use CLArrays even though prior to that I had tried: Pkg.test("OpenCL") and that segfaulted. But 'using CLArrays' no longer segfaults.
When I ran the package test, though, it failed:
julia> Pkg.test("CLArrays") INFO: Testing CLArrays ASSERTION FAILED: isScalarType(type) at file /build/beignet-5qGeBM/beignet-1.1.1/backend/src/llvm/llvm_gen_backend.cpp, function gbe::ir::Type gbe::getType(gbe::ir::Context&, const llvm::Type*), line 117 ==============================[ ERROR: CLArrays ]===============================
failed process: Process(
/home/phil/build/julia/usr/bin/julia -Cnative -J/home/phil/build/julia/usr/lib/julia/sys.so --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=none --color=yes --compilecache=yes /home/phil/.julia/v0.6/CLArrays/test/runtests.jl
, ProcessSignaled(5)) [0]================================================================================ ERROR: CLArrays had test errors
thats a pretty weird error, and likely related to beignet! did you try the fix in the first issue i linked? @ssfrr was building beignet from source to fix an issue!
i know that quite a lot has happened for beignet lately and intel is trying to make it their official opencl implementation - maybe their version has a fix for it! or maybe you're using it already and it is the problem ;) not sure, i had quite a few problems with setting up beignet on linux!
"Oh, the yaks you will shave!" Dr. Suess book for programmers. :)
Running into a lot of problems building beignet - what did you have to do to get it to build? It's complained about not being able to find OCL_ICD headers (even though ocl-icd-dev is installed on my system), so I disabled ICD support. Now it's complaining about CLANG_LIB being set to NOTFOUND - not sure why that is, seems like the old configure script way of doing things would find that for you.
I don't have any ideas other than the process that worked for me. Maybe double-check that the generated cmake config is looking at the right versions of clang and llvm? (use ccmake
to inspect and modify the configuration)
@ssfrr How do you tell cmake to use clang-3.9? I'm finding that after running cmake as you suggest above that when I look in the CMakeCache.txt file that clang-3.6 is being used.
Platform Ubuntu 16.04 Julia 0.6.2
I suspect this is some sort of mismatch between the version of a shared lib installed on the system vs what CLArrays is expecting.