CLFFT.jl icon indicating copy to clipboard operation
CLFFT.jl copied to clipboard

Cannot build on Ubuntu 14.04

Open AStupidBear opened this issue 7 years ago • 9 comments

julia> Pkg.build("CLFFT")                                                                                                                      
INFO: Building CLFFT                                                                                                                           
================================================================[ ERROR: CLFFT ]===============================================================
                                                                                                                                               
                                                                                                                                               
LoadError: None of the selected providers can install dependency libCLFFT.                                                                     
Use BinDeps.debug(package_name) to see available providers                                                                                     
                                                                                                                                               
while loading /home/luyao/.julia/v0.5/CLFFT/deps/build.jl, in expression starting on line 40                                                   
                                                                                                                                               
===============================================================================================================================================
                                                                                                                                               
                                                                                                                                               
================================================================[ BUILD ERRORS ]===============================================================
                                                                                                                                               
                                                                                                                                               
WARNING: CLFFT had build errors.                                                                                                               
                                                                                                                                               
 - packages with build errors remain installed in /home/luyao/.julia/v0.5                                                                      
 - build the package(s) and all dependencies with `Pkg.build("CLFFT")`                                                                         
 - build a single package by running its `deps/build.jl` script                                                                                
                                                                                                                                               
===============================================================================================================================================
                    ```                                                                                                                           

AStupidBear avatar May 29 '17 12:05 AStupidBear

Can you give your versioninfo()? And are you by any chance on 32bit?

vchuravy avatar May 30 '17 07:05 vchuravy

julia> versioninfo()
Julia Version 0.5.2
Commit f4c6c9d (2017-05-06 16:34 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, haswell)

AStupidBear avatar May 30 '17 08:05 AStupidBear

Ubuntu 14.04 is quite old, not sure it provides libCLFFT at all. Can you run the following from the command line?

sudo apt-get install libclfft-dev

dfdx avatar Jun 02 '17 19:06 dfdx

@dfdx

E: Unable to locate package libclfft-dev

AStupidBear avatar Jun 09 '17 11:06 AStupidBear

Maybe I have to manually download the binary. It'll be better if this can be handled in the build process of this package.

AStupidBear avatar Jun 12 '17 01:06 AStupidBear

Can you please modify this block from deps/build.jl:

if is_linux()
    provides(AptGet, "libclfft-dev", libCLFFT)
    if Sys.ARCH == :x86_64
        uri = URI(baseurl * "Linux-x64.tar.gz")
        basedir = joinpath(@__DIR__, "clFFT-$(version)-Linux-x64")
        provides(
            Binaries, uri,
            libCLFFT, unpacked_dir = basedir,
            installed_libpath = joinpath(basedir, "bin"), os = :Linux
        )
    end
end

to looks like this:

if is_linux()
    # provides(AptGet, "libclfft-dev", libCLFFT)   -- commented out
    if Sys.ARCH == :x86_64
        uri = URI(baseurl * "Linux-x64.tar.gz")
        basedir = joinpath(@__DIR__, "clFFT-$(version)-Linux-x64")
        provides(
            Binaries, uri,
            libCLFFT, unpacked_dir = basedir,
            installed_libpath = joinpath(basedir, "bin"), os = :Linux
        )
    else
       error("Architecture $(Sys.ARCH) is not supported")
    end
end

and post the output?

dfdx avatar Jun 12 '17 23:06 dfdx

Is @__DIR__ a julia 0.5 macro?

AStupidBear avatar Jun 13 '17 16:06 AStupidBear

It's in Compat, so it should work fine on Julia 0.5. Please checkout master branch before testing or modifying anything.

dfdx avatar Jun 13 '17 18:06 dfdx

2017-06-14_120612

julia> Pkg.build("CLFFT")                                                                                                                       
INFO: Building CLFFT                                                                                                                            
================================================================[ ERROR: CLFFT ]================================================================
                                                                                                                                                
                                                                                                                                                
LoadError: None of the selected providers can install dependency libCLFFT.                                                                      
Use BinDeps.debug(package_name) to see available providers                                                                                      
                                                                                                                                                
while loading /home/luyao/.julia/v0.5/CLFFT/deps/build.jl, in expression starting on line 47                                                    
                                                                                                                                                
================================================================================================================================================
                                                                                                                                                
                                                                                                                                                
================================================================[ BUILD ERRORS ]================================================================
                                                                                                                                                
                                                                                                                                                
WARNING: CLFFT had build errors.                                                                                                                
                                                                                                                                                
 - packages with build errors remain installed in /home/luyao/.julia/v0.5                                                                       
 - build the package(s) and all dependencies with `Pkg.build("CLFFT")`                                                                          
 - build a single package by running its `deps/build.jl` script                                                                                 
                                                                                                                                                
================================================================================================================================================

AStupidBear avatar Jun 14 '17 04:06 AStupidBear