LoadError: Cannot find or load libmxnet.dylib

Open
#423 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia

Research direction

Start with MXNet/src/base.jl at line 38 and the loading path from MXNet/src/MXNet.jl at line 25, then review how the package build locates the native library on macOS. Compare the generated libmxnet.so and libmxnet.a with the library name expected during using MXNet; done means the package precompiles and loads successfully on the stated platform.

Written by the indexing model from the issue text.

Description

Hi, I have performed the following steps:

1). built MXNet from source with GPU support which generated the following 2 files:

libmxnet.a
libmxnet.so

2). withing Julia 0.6.2, Pkg.add("MXNet")

julia> Pkg.add("MXNet")
INFO: Installing MXNet v0.3.0
INFO: Building MXNet
INFO: MXNET_HOME environment detected: /Users/conradwt/ai.dir/projects/mxnet
INFO: Trying to load existing libmxnet...
INFO: Failed to load existing libmxnet, trying to build from source...
INFO: Found a CUDA installation.
INFO: Found a CuDNN installation.
INFO: CUDA_HOME -> /usr/local/cuda
INFO: Unsure if we can build against mkl.
INFO: Attempting build anyway.
INFO: USE_JULIA_BLAS -> true
INFO: Package database updated

3). within Julia 0.6.2, using MXNet

julia> using MXNet
INFO: Precompiling module MXNet.
ERROR: LoadError: LoadError: Cannot find or load libmxnet.dylib. Please see the document on how to build it.
Stacktrace:
 [1] error(::String) at ./error.jl:21
 [2] include_from_node1(::String) at ./loading.jl:576
 [3] include(::String) at ./sysimg.jl:14
 [4] include_from_node1(::String) at ./loading.jl:576
 [5] include(::String) at ./sysimg.jl:14
 [6] anonymous at ./<missing>:2
while loading /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/MXNet/src/base.jl, in expression starting on line 38
while loading /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/MXNet/src/MXNet.jl, in expression starting on line 25
ERROR: Failed to precompile MXNet to /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/lib/v0.6/MXNet.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:710
 [2] _require(::Symbol) at ./loading.jl:497
 [3] require(::Symbol) at ./loading.jl:405

Note: libmxnet.dylib was not created but a libmxnet.so and libmxnet.a were created in step (1). Thus, I'm not sure why using MXNet is looking for a different file here.

Comment

Platform

  • macOS 10.13.3
  • Julia 0.6.2
  • MXNet 1.1.0
Dominant language
No language data
Stars
370
Forks
63
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dmlc/MXNet.jl

All issues in dmlc/MXNet.jl

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.