pluskid / Mocha.jl

Deep Learning framework for Julia
Other
1.29k stars 254 forks source link

Update the compatibility.jl for new blasfunc location #211

Closed pwl closed 7 years ago

pwl commented 7 years ago

As of https://github.com/JuliaLang/julia/pull/16600 the blasfunc has been moved to Base.LinAlg. This results in the following error on 0.5-rc2

julia> Pkg.test("Mocha")
INFO: Testing Mocha
WARNING: Method definition info(Any...) in module Base at util.jl:320 overwritten in module Logging at /home/pawel/.julia/v0.5/Logging/src/Logging.jl:61.
WARNING: Method definition warn(Any...) in module Base at util.jl:350 overwritten in module Logging at /home/pawel/.julia/v0.5/Logging/src/Logging.jl:61.
Configuring Mocha...
 * CUDA       disabled by default
 * Native Ext disabled by default
Mocha configured, continue loading module...
ERROR: LoadError: LoadError: LoadError: UndefVarError: @blasfunc not defined
 in blasfunc; at /home/pawel/.julia/v0.5/Mocha/src/compatibility.jl:14 [inlined]
 in macro expansion; at /home/pawel/.julia/v0.5/Mocha/src/utils/blas.jl:9 [inlined]
 in anonymous at ./<missing>:?
 in include_from_node1(::String) at ./loading.jl:426 (repeats 2 times)
 in eval(::Module, ::Any) at ./boot.jl:234
 in require(::Symbol) at ./loading.jl:357
 in include_from_node1(::String) at ./loading.jl:426
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:318
while loading /home/pawel/.julia/v0.5/Mocha/src/utils/blas.jl, in expression starting on line 8
while loading /home/pawel/.julia/v0.5/Mocha/src/Mocha.jl, in expression starting on line 15
while loading /home/pawel/.julia/v0.5/Mocha/test/runtests.jl, in expression starting on line 8
=======================================================================[ ERROR: Mocha ]=======================================================================

failed process: Process(`/home/pawel/Sources/julia/usr/bin/julia -Cnative -J/home/pawel/Sources/julia/usr/lib/julia/sys.so --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=none --color=yes --compilecache=yes /home/pawel/.julia/v0.5/Mocha/test/runtests.jl`, ProcessExited(1)) [1]

==============================================================================================================================================================
ERROR: Mocha had test errors
 in #test#61(::Bool, ::Function, ::Array{AbstractString,1}) at ./pkg/entry.jl:740
 in (::Base.Pkg.Entry.#kw##test)(::Array{Any,1}, ::Base.Pkg.Entry.#test, ::Array{AbstractString,1}) at ./<missing>:0
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}})() at ./pkg/dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#test,Tuple{Array{AbstractString,1}}}, ::String) at ./file.jl:59
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./pkg/dir.jl:31
 in (::Base.Pkg.Dir.#kw##cd)(::Array{Any,1}, ::Base.Pkg.Dir.#cd, ::Function, ::Array{AbstractString,1}, ::Vararg{Array{AbstractString,1},N}) at ./<missing>:0
 in #test#3(::Bool, ::Function, ::String, ::Vararg{String,N}) at ./pkg/pkg.jl:258
 in test(::String, ::Vararg{String,N}) at ./pkg/pkg.jl:258
pwl commented 7 years ago

Changing the line https://github.com/pluskid/Mocha.jl/blob/master/src/compatibility.jl#L14 to

fnc_symb = eval(:(Base.LinAlg.BLAS.@blasfunc $str_name))

solves the issue for me. I would have created a PR for this but I have no idea which version should I put in the version check.

pluskid commented 7 years ago

Thanks for reporting this! I will try to incorporate it over the weekend.

pluskid commented 7 years ago

This has now been fixed on the master. Will tag a new maintenance release soon.

lostanlen commented 7 years ago

Hi @pluskid, it would be good if you could tag v0.1.3 so that we don't have to rely on the bleeding-edge master branch.

pluskid commented 7 years ago

https://github.com/JuliaLang/METADATA.jl/pull/7328