Skip to content

Commit

Permalink
build: more Libdl.dlext
Browse files Browse the repository at this point in the history
  • Loading branch information
iblislin committed Sep 6, 2017
1 parent 0d274db commit 4c423df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ if !libmxnet_detected
_libdir = joinpath(_prefix, "lib")
# We have do eagerly delete the installed libmxnet.so
# Otherwise we won't rebuild on an update.
run(`rm -f $_libdir/libmxnet.so`)
run(`rm -f $_libdir/libmxnet.$(Libdl.dlext)`)
provides(BuildProcess,
(@build_steps begin
CreateDirectory(_srcdir)
Expand Down Expand Up @@ -183,8 +183,10 @@ if !libmxnet_detected
`make -j$(get_cpucore())`
end
end
FileRule(joinpath(_libdir, "libmxnet.so"), @build_steps begin
`cp $_mxdir/lib/libmxnet.so $_libdir/`
FileRule(joinpath(_libdir, "libmxnet.$(Libdl.dlext)"), @build_steps begin
# the output file on macos is still in `.so` suffix
# so we rename it
`cp $_mxdir/lib/libmxnet.so $_libdir/libmxnet.$(Libdl.dlext)`
end)
end
end), mxnet, installed_libpath=_libdir)
Expand Down
2 changes: 1 addition & 1 deletion src/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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.$(Libdl.dlext)." *
error("Cannot find or load libmxnet.$(Libdl.dlext). " *
"Please see the document on how to build it.")
else
include_dependency(MXNET_LIB)
Expand Down

0 comments on commit 4c423df

Please sign in to comment.