MXNet installation fails

mxnetjl

#1

My attempt to install MXNet fails on Mac OSX 10.13 with the following error. I tried in both Mac OSX 10.13 and Ubuntu 16.04.

julia> versioninfo()
Julia Version 0.6.0
Commit 903644385b (2017-06-19 13:05 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i5-4570R CPU @ 2.70GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)


julia> Pkg.add( "MXNet" )
INFO: Cloning cache of Formatting from https://github.com/JuliaIO/Formatting.jl.git
INFO: Cloning cache of MXNet from https://github.com/dmlc/MXNet.jl.git
INFO: Installing Formatting v0.3.0
INFO: Installing MXNet v0.2.3
INFO: Building MXNet
INFO: Did not find a CUDA installation, using CPU-only version of MXNet.
INFO: Attempting to Create directory /Users/vish/.julia/v0.6/MXNet/deps/src
INFO: Attempting to Create directory /Users/vish/.julia/v0.6/MXNet/deps/usr/lib
INFO: Attempting to Create directory /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src
Cloning into 'mxnet'...
remote: Counting objects: 50666, done.
remote: Total 50666 (delta 0), reused 0 (delta 0), pack-reused 50665
Receiving objects: 100% (50666/50666), 27.50 MiB | 3.75 MiB/s, done.
Resolving deltas: 100% (32360/32360), done.
Checking out files: 100% (2002/2002), done.
Submodule 'cub' (https://github.com/dmlc/cub) registered for path 'cub'
Submodule 'dlpack' (https://github.com/dmlc/dlpack) registered for path 'dlpack'
Submodule 'dmlc-core' (https://github.com/dmlc/dmlc-core.git) registered for path 'dmlc-core'
Submodule 'mshadow' (https://github.com/dmlc/mshadow.git) registered for path 'mshadow'
Submodule 'nnvm' (https://github.com/dmlc/nnvm) registered for path 'nnvm'
Submodule 'ps-lite' (https://github.com/dmlc/ps-lite) registered for path 'ps-lite'
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/cub'...
remote: Counting objects: 190, done.        
remote: Total 190 (delta 0), reused 0 (delta 0), pack-reused 190        
Receiving objects: 100% (190/190), 498.22 KiB | 436.00 KiB/s, done.
Resolving deltas: 100% (58/58), done.
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/dlpack'...
remote: Counting objects: 124, done.        
remote: Compressing objects: 100% (11/11), done.        
remote: Total 124 (delta 5), reused 16 (delta 4), pack-reused 104        
Receiving objects: 100% (124/124), 50.63 KiB | 224.00 KiB/s, done.
Resolving deltas: 100% (39/39), done.
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/dmlc-core'...
remote: Counting objects: 4481, done.        
remote: Compressing objects: 100% (4/4), done.        
remote: Total 4481 (delta 0), reused 2 (delta 0), pack-reused 4476        
Receiving objects: 100% (4481/4481), 1.02 MiB | 803.00 KiB/s, done.
Resolving deltas: 100% (2654/2654), done.
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/mshadow'...
remote: Counting objects: 4500, done.        
remote: Compressing objects: 100% (14/14), done.        
remote: Total 4500 (delta 6), reused 13 (delta 4), pack-reused 4482        
Receiving objects: 100% (4500/4500), 1.42 MiB | 1.11 MiB/s, done. 
Resolving deltas: 100% (3080/3080), done.
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/nnvm'...
remote: Counting objects: 2722, done.        
remote: Compressing objects: 100% (54/54), done.        
remote: Total 2722 (delta 22), reused 43 (delta 17), pack-reused 2651        
Receiving objects: 100% (2722/2722), 942.43 KiB | 709.00 KiB/s, done.
Resolving deltas: 100% (1535/1535), done.
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/ps-lite'...
remote: Counting objects: 1910, done.        
remote: Total 1910 (delta 0), reused 0 (delta 0), pack-reused 1910        
Receiving objects: 100% (1910/1910), 581.93 KiB | 588.00 KiB/s, done.
Resolving deltas: 100% (1217/1217), done.
Submodule 'dmlc-core' (https://github.com/dmlc/dmlc-core) registered for path 'nnvm/dmlc-core'
Submodule 'tvm' (https://github.com/dmlc/tvm) registered for path 'nnvm/tvm'
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/nnvm/dmlc-core'...
remote: Counting objects: 4481, done.        
remote: Compressing objects: 100% (4/4), done.        
remote: Total 4481 (delta 0), reused 2 (delta 0), pack-reused 4476        
Receiving objects: 100% (4481/4481), 1.02 MiB | 674.00 KiB/s, done.
Resolving deltas: 100% (2654/2654), done.
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/nnvm/tvm'...
remote: Counting objects: 9381, done.        
remote: Compressing objects: 100% (15/15), done.        
remote: Total 9381 (delta 3), reused 3 (delta 2), pack-reused 9364        
Receiving objects: 100% (9381/9381), 2.55 MiB | 1.47 MiB/s, done.
Resolving deltas: 100% (6259/6259), done.
Submodule 'HalideIR' (https://github.com/dmlc/HalideIR) registered for path 'nnvm/tvm/HalideIR'
Submodule 'dlpack' (https://github.com/dmlc/dlpack) registered for path 'nnvm/tvm/dlpack'
Submodule 'dmlc-core' (https://github.com/dmlc/dmlc-core) registered for path 'nnvm/tvm/dmlc-core'
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/nnvm/tvm/HalideIR'...
remote: Counting objects: 175, done.        
remote: Total 175 (delta 0), reused 0 (delta 0), pack-reused 175        
Receiving objects: 100% (175/175), 174.70 KiB | 256.00 KiB/s, done.
Resolving deltas: 100% (82/82), done.
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/nnvm/tvm/dlpack'...
remote: Counting objects: 124, done.        
remote: Compressing objects: 100% (11/11), done.        
remote: Total 124 (delta 5), reused 16 (delta 4), pack-reused 104        
Receiving objects: 100% (124/124), 50.63 KiB | 238.00 KiB/s, done.
Resolving deltas: 100% (39/39), done.
Cloning into '/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/nnvm/tvm/dmlc-core'...
remote: Counting objects: 4481, done.        
remote: Compressing objects: 100% (4/4), done.        
remote: Total 4481 (delta 0), reused 2 (delta 0), pack-reused 4476        
Receiving objects: 100% (4481/4481), 1.02 MiB | 778.00 KiB/s, done.
Resolving deltas: 100% (2654/2654), done.
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
warning: unable to rmdir dlpack: Directory not empty
Note: checking out 'v0.10.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 8713d257... [R][DOC] update R installation guide (#6457)
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
error: Server does not allow request for unadvertised object 89de7ab20167909bc2c4f8acd397671c47cf3c0d
Fetched in submodule path 'cub', but it did not contain 89de7ab20167909bc2c4f8acd397671c47cf3c0d. Direct fetching of that commit failed.
===================================================================[ ERROR: MXNet ]===================================================================

LoadError: failed process: Process(`git submodule update --init`, ProcessExited(1)) [1]
while loading /Users/vish/.julia/v0.6/MXNet/deps/build.jl, in expression starting on line 58

======================================================================================================================================================

===================================================================[ BUILD ERRORS ]===================================================================

WARNING: MXNet had build errors.

 - packages with build errors remain installed in /Users/vish/.julia/v0.6
 - build the package(s) and all dependencies with `Pkg.build("MXNet")`
 - build a single package by running its `deps/build.jl` script

======================================================================================================================================================
INFO: Package database updated
INFO: METADATA is out-of-date — you may not have the latest version of MXNet
INFO: Use `Pkg.update()` to get the latest versions of your packages

Please help!


#2

I tried the method mentioned here: https://github.com/dmlc/MXNet.jl/issues/263
But it also fails!!

julia> Pkg.build( "MXNet" )
INFO: Building MXNet
INFO: Did not find a CUDA installation, using CPU-only version of MXNet.
INFO: Attempting to Create directory /Users/vish/.julia/v0.6/MXNet/deps/src
INFO: Directory /Users/vish/.julia/v0.6/MXNet/deps/src already created
INFO: Attempting to Create directory /Users/vish/.julia/v0.6/MXNet/deps/usr/lib
INFO: Directory /Users/vish/.julia/v0.6/MXNet/deps/usr/lib already created
INFO: Attempting to Create directory /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Directory /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet already created
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
HEAD is now at 8713d257... [R][DOC] update R installation guide (#6457)
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
INFO: Changing Directory to /Users/vish/.julia/v0.6/MXNet/deps/src/mxnet
In file included from src/operator/contrib/ctc_loss.cc:9:
In file included from src/operator/contrib/./ctc_include/detail/cpu_ctc.h:9:
/Users/vish/.julia/v0.6/MXNet/deps/src/mxnet/dmlc-core/include/dmlc/omp.h:13:9: warning: Warning: OpenMP is not available, project will be compiled
      into single-thread code. Use OpenMP-enabled compiler to get benefit of multi-threading. [-W#pragma-messages]
#pragma message("Warning: OpenMP is not available, "                    \
        ^
1 warning generated.
src/operator/contrib/proposal.cc:329:27: warning: comparison of integers of different signs: 'index_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
    for (index_t i = 0; i < num_anchors; ++i) {
                        ~ ^ ~~~~~~~~~~~
src/operator/contrib/proposal.cc:258:12: note: in instantiation of member function 'mxnet::op::ProposalOp<mshadow::cpu>::Forward' requested here
  explicit ProposalOp(ProposalParam param) {
           ^
src/operator/contrib/proposal.cc:441:14: note: in instantiation of member function 'mxnet::op::ProposalOp<mshadow::cpu>::ProposalOp' requested here
  return new ProposalOp<cpu>(param);
             ^
src/operator/contrib/proposal.cc:330:29: warning: comparison of integers of different signs: 'index_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
      for (index_t j = 0; j < height; ++j) {
                          ~ ^ ~~~~~~
src/operator/contrib/proposal.cc:331:31: warning: comparison of integers of different signs: 'index_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
        for (index_t k = 0; k < width; ++k) {
                            ~ ^ ~~~~~
In file included from src/operator/custom/custom.cc:7:
src/operator/custom/./custom-inl.h:190:14: error: no matching member function for call to 'push_back'
      shapes.push_back(iter->data());
      ~~~~~~~^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:676:36: note: candidate function not viable:
      no known conversion from 'dim_t *' (aka 'long long *') to 'const value_type' (aka 'unsigned int *const') for 1st argument
    _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
                                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:678:36: note: candidate function not viable:
      no known conversion from 'dim_t *' (aka 'long long *') to 'value_type' (aka 'unsigned int *') for 1st argument
    _LIBCPP_INLINE_VISIBILITY void push_back(value_type&& __x);
                                   ^
src/operator/custom/custom.cc:166:12: error: no matching member function for call to 'push_back'
    shapes.push_back(iter->data());
    ~~~~~~~^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:676:36: note: candidate function not viable:
      no known conversion from 'dim_t *' (aka 'long long *') to 'const value_type' (aka 'unsigned int *const') for 1st argument
    _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
                                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:678:36: note: candidate function not viable:
      no known conversion from 'dim_t *' (aka 'long long *') to 'value_type' (aka 'unsigned int *') for 1st argument
    _LIBCPP_INLINE_VISIBILITY void push_back(value_type&& __x);
                                   ^
3 warnings generated.
2 errors generated.
make: *** [build/src/operator/custom/custom.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from src/operator/custom/native_op.cc:7:
src/operator/custom/./native_op-inl.h:146:24: error: const_cast from 'const dim_t *' (aka 'const long long *') to 'index_t *' (aka 'unsigned int *')
      is not allowed
      shapes.push_back(const_cast<index_t*>(vec[i].shape_.data()));
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/operator/custom/./native_op-inl.h:204:14: error: no matching member function for call to 'push_back'
      shapes.push_back(iter->data());
      ~~~~~~~^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:676:36: note: candidate function not viable:
      no known conversion from 'dim_t *' (aka 'long long *') to 'const value_type' (aka 'unsigned int *const') for 1st argument
    _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
                                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/vector:678:36: note: candidate function not viable:
      no known conversion from 'dim_t *' (aka 'long long *') to 'value_type' (aka 'unsigned int *') for 1st argument
    _LIBCPP_INLINE_VISIBILITY void push_back(value_type&& __x);
                                   ^
2 errors generated.
make: *** [build/src/operator/custom/native_op.o] Error 1
===================================================================[ ERROR: MXNet ]===================================================================

LoadError: failed process: Process(`make -j4 USE_BLAS=openblas 'MSHADOW_LDFLAGS=-lm /Applications/Julia-0.6.app/Contents/Resources/julia/lib/julia/libopenblas64_.dylib'`, ProcessExited(2)) [2]
while loading /Users/vish/.julia/v0.6/MXNet/deps/build.jl, in expression starting on line 58

======================================================================================================================================================

===================================================================[ BUILD ERRORS ]===================================================================

WARNING: MXNet had build errors.

 - packages with build errors remain installed in /Users/vish/.julia/v0.6
 - build the package(s) and all dependencies with `Pkg.build("MXNet")`
 - build a single package by running its `deps/build.jl` script

======================================================================================================================================================