You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/03/21 06:53:11 UTC

[GitHub] conradwt opened a new issue #10185: Building From Source Has Incomplete Instructions For macOS 10.13.3

conradwt opened a new issue #10185: Building From Source Has Incomplete Instructions For macOS 10.13.3 
URL: https://github.com/apache/incubator-mxnet/issues/10185
 
 
   Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.
   
   For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io 
   
   ## Description
   (Brief description of the problem in no more than 2 sentences.)
   
   ## Environment info (Required)
   
   ```
   What to do:
   1. Download the diagnosis script from https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py
   2. Run the script using `python diagnose.py` and paste its output here.
   
   $ python diagnose.py
   ----------Python Info----------
   Version      : 3.6.4
   Compiler     : GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)
   Build        : ('default', 'Jan 16 2018 12:04:33')
   Arch         : ('64bit', '')
   ------------Pip Info-----------
   Version      : 9.0.2
   Directory    : /Users/conradwt/anaconda3/lib/python3.6/site-packages/pip
   ----------MXNet Info-----------
   Version      : 1.2.0
   Directory    : /Users/conradwt/ai.dir/projects/mxnet/python/mxnet
   Hashtag not found. Not installed from pre-built package.
   ----------System Info----------
   Platform     : Darwin-17.4.0-x86_64-i386-64bit
   system       : Darwin
   node         : Conrads-MBP
   release      : 17.4.0
   version      : Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64
   ----------Hardware Info----------
   machine      : x86_64
   processor    : i386
   b'machdep.cpu.brand_string: Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz'
   b'machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C'
   b'machdep.cpu.leaf7_features: SMEP ERMS RDWRFSGS TSC_THREAD_OFFSET BMI1 HLE AVX2 BMI2 INVPCID RTM FPU_CSDS'
   b'machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT RDTSCP TSCI'
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0068 sec, LOAD: 0.6478 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.1527 sec, LOAD: 0.0476 sec.
   Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0389 sec, LOAD: 0.2178 sec.
   Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0357 sec, LOAD: 0.1938 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0110 sec, LOAD: 0.1353 sec.
   Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0109 sec, LOAD: 0.0642 sec.
   
   ```
   
   Package used (Python/R/Scala/Julia):
   (I'm using ...)
   
   ```
    $ python -V
   Python 3.6.4 :: Anaconda custom (64-bit)
   ```
   
   For Scala user, please provide:
   1. Java version: (`java -version`)
   2. Maven version: (`mvn -version`)
   3. Scala runtime if applicable: (`scala -version`)
   
   For R user, please provide R `sessionInfo()`:
   
   ## Build info (Required if built from source)
   
   Compiler (gcc/clang/mingw/visual studio):
   
   MXNet commit hash:
   (Paste the output of `git rev-parse HEAD` here.)
   
   ```
    $ git rev-parse HEAD
   91c2daa8c602a0f1a8ff945c317e0859a032358d
   ```
   
   Build config:
   (Paste the content of config.mk, or the build command.)
   
   ```
   # Licensed to the Apache Software Foundation (ASF) under one
   # or more contributor license agreements.  See the NOTICE file
   # distributed with this work for additional information
   # regarding copyright ownership.  The ASF licenses this file
   # to you under the Apache License, Version 2.0 (the
   # "License"); you may not use this file except in compliance
   # with the License.  You may obtain a copy of the License at
   #
   #   http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing,
   # software distributed under the License is distributed on an
   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   # KIND, either express or implied.  See the License for the
   # specific language governing permissions and limitations
   # under the License.
   
   #-------------------------------------------------------------------------------
   #  Template configuration for compiling mxnet
   #
   #  If you want to change the configuration, please use the following
   #  steps. Assume you are on the root directory of mxnet. First copy the this
   #  file so that any local changes will be ignored by git
   #
   #  $ cp make/config.mk .
   #
   #  Next modify the according entries, and then compile by
   #
   #  $ make
   #
   #  or build in parallel with 8 threads
   #
   #  $ make -j8
   #-------------------------------------------------------------------------------
   
   #---------------------
   # choice of compiler
   #--------------------
   
   export CC = gcc
   export CXX = g++
   export NVCC = nvcc
   
   # whether compile with options for MXNet developer
   DEV = 0
   
   # whether compile with debug
   DEBUG = 0
   
   # the additional link flags you want to add
   ADD_LDFLAGS =
   
   # the additional compile flags you want to add
   ADD_CFLAGS =
   
   #---------------------------------------------
   # matrix computation libraries for CPU/GPU
   #---------------------------------------------
   
   # whether use CUDA during compile
   USE_CUDA = 1
   
   # add the path to CUDA library to link and compile flag
   # if you have already add them to environment variable, leave it as NONE
   # USE_CUDA_PATH = /usr/local/cuda
   USE_CUDA_PATH = /usr/local/cuda
   
   # whether to enable CUDA runtime compilation
   ENABLE_CUDA_RTC = 1
   
   # whether use CUDNN R3 library
   USE_CUDNN = 1
   
   # whether use opencv during compilation
   # you can disable it, however, you will not able to use
   # imbin iterator
   USE_OPENCV = 1
   
   # use openmp for parallelization
   USE_OPENMP = 1
   
   # choose the version of blas you want to use
   # can be: mkl, blas, atlas, openblas
   USE_BLAS = apple
   
   # whether use lapack during compilation
   # only effective when compiled with blas versions openblas/apple/atlas/mkl
   USE_LAPACK = 1
   
   # by default, disable lapack when using MKL
   # switch on when there is a full installation of MKL available (not just MKL_ML)
   ifeq ($(USE_BLAS), mkl)
   USE_LAPACK = 0
   endif
   
   # add path to intel library, you may need it for MKL, if you did not add the path
   # to environment variable
   USE_INTEL_PATH = NONE
   
   #----------------------------
   # distributed computing
   #----------------------------
   
   # whether or not to enable multi-machine supporting
   USE_DIST_KVSTORE = 0
   
   # whether or not allow to read and write HDFS directly. If yes, then hadoop is
   # required
   USE_HDFS = 0
   
   # path to libjvm.so. required if USE_HDFS=1
   LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server
   
   # whether or not allow to read and write AWS S3 directly. If yes, then
   # libcurl4-openssl-dev is required, it can be installed on Ubuntu by
   # sudo apt-get install -y libcurl4-openssl-dev
   USE_S3 = 0
   
   #----------------------------
   # additional operators
   #----------------------------
   
   # path to folders containing projects specific operators that you don't want to put in src/operators
   EXTRA_OPERATORS =
   
   #----------------------------
   # other features
   #----------------------------
   
   # Create C++ interface package
   USE_CPP_PACKAGE = 0
   
   #----------------------------
   # plugins
   #----------------------------
   
   # whether to use torch integration. This requires installing torch.
   # TORCH_PATH = $(HOME)/torch
   # MXNET_PLUGINS += plugin/torch/torch.mk
   ```
   
   ## Error Message:
   (Paste the complete error message, including stack trace.)
   
   issue 1:
   
   ```
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_act.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_base.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_concat.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_convolution.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_copy.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_deconvolution.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_fully_connected.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_pooling.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_softmax.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(mkldnn_sum.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(nnpack_util.o) has no symbols
   /opt/local/bin/ranlib: file: lib/libmxnet.a(vtune.o) has no symbols
   ld: warning: directory not found for option '-L/usr/local/cuda/lib64'
   ld: warning: directory not found for option '-L/usr/local/cuda/lib64/stubs'
   ```
   
   issue 2:
   
   The `/usr/local/cuda/lib64` and `/usr/local/cuda/lib64/stubs` directories are applicable to macOS 10.13.3 but the may be for another OS like Linux (i.e. Ubuntu).  The directories which do exist on macOS 10.13.3 are `/usr/local/cuda/lib` and `/usr/local/cuda/lib/stubs`.  Finally, step 6 from the build from source says the following:
   
   6.  Once finished, you should have a file called libmxnet.so in lib/.
   
   However, it's not clear to me if one should add this directory to some global path (i.e. DYLD_LIBRARY_PATH) or copy these libraries (i.e. `libmxnet.a` and `libmxnet.so`) to `/usr/local/lib` for a much more general solution.
   
   ## Minimum reproducible example
   (If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.)
   
   ## Steps to reproduce
   (Paste the commands you ran that produced the error.)
   
   1.  git pull origin matser
   2. use the `config.mk` above
   3. make -j 8
   
   ## What have you tried to solve it?
   
   1.  I have setup the following environment variables within `.profile`:
   
   ```
   export MXNET_HOME=${HOME}/ai.dir/projects/mxnet
   export DYLD_LIBRARY_PATH=${MXNET_HOME}/lib:${DYLD_LIBRARY_PATH}
   ```
   Note: ${HOME}/ai.dir/projects/mxnet is the original build directory for MXNet source distribution.
   
   2. check DYLD_LIBRARY_PATH value
   
   ```
   $ echo $DYLD_LIBRARY_PATH
   /Users/conradwt/ai.dir/projects/mxnet/lib:/usr/local/cuda/lib:/Developer/NVIDIA/CUDA-9.1/lib
   ```
   
   3.  checked the version of MXNet within the Python shell
   
   ```
   $ python
   Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 12:04:33) 
   [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import mxnet as mx
   >>> mx.__version__
   '1.2.0'
   ```
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services