Skip to content

Commit

Permalink
fix apache#8, more informative error when libmxnet not found
Browse files Browse the repository at this point in the history
  • Loading branch information
pluskid committed Oct 26, 2015
1 parent 5bcd859 commit 5a80bf3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ typealias char_pp Ptr{char_p}
const MXNET_LIB = Libdl.find_library(["libmxnet.so","libmxnet.dll"],
[joinpath("$(get(ENV,"MXNET_HOME",""))","lib"),
joinpath(Pkg.dir("MXNet"),"deps/usr/lib")])
if isempty(MXNET_LIB)
# touch this file, so that after the user properly build libmxnet, the precompiled
# MXNet.ji will be re-compiled to get MXNET_LIB properly.
touch(@__FILE__)
error("Cannot find or load libmxnet.so. Please see the document on how to build it.")
end

function __init__()
_import_ndarray_functions()
Expand Down

0 comments on commit 5a80bf3

Please sign in to comment.