ziyuang opened a new issue #14734: Segfault when installing python binding of 
MXNet after building
URL: https://github.com/apache/incubator-mxnet/issues/14734
 
 
   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 Info----------
   Version      : 3.6.8
   Compiler     : GCC 7.3.0
   Build        : ('default', 'Dec 30 2018 01:22:34')
   Arch         : ('64bit', '')
   ------------Pip Info-----------
   Version      : 19.0.3
   Directory    : ~/anaconda3/lib/python3.6/site-packages/pip
   ----------MXNet Info-----------
   An error occured trying to import mxnet.
   This is very likely due to missing missing or incompatible library files.
   Traceback (most recent call last):
     File "diagnose.py", line 104, in check_mxnet
       print('Version      :', mxnet.__version__)
   AttributeError: module 'mxnet' has no attribute '__version__'
   
   ----------System Info----------
   Platform     : Linux-4.15.0-46-generic-x86_64-with-debian-buster-sid
   system       : Linux
   node         : 
   release      : 4.15.0-46-generic
   version      : #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019
   ----------Hardware Info----------
   machine      : x86_64
   processor    : x86_64
   Architecture:        x86_64
   CPU op-mode(s):      32-bit, 64-bit
   Byte Order:          Little Endian
   CPU(s):              4
   On-line CPU(s) list: 0-3
   Thread(s) per core:  1
   Core(s) per socket:  4
   Socket(s):           1
   NUMA node(s):        1
   Vendor ID:           GenuineIntel
   CPU family:          6
   Model:               63
   Model name:          Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz
   Stepping:            2
   CPU MHz:             2618.050
   CPU max MHz:         3600,0000
   CPU min MHz:         1200,0000
   BogoMIPS:            6983.80
   Virtualization:      VT-x
   L1d cache:           32K
   L1i cache:           32K
   L2 cache:            256K
   L3 cache:            10240K
   NUMA node0 CPU(s):   0-3
   Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx 
pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology 
nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est 
tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt 
tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb 
invpcid_single pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority 
ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt 
cqm_llc cqm_occup_llc dtherm ida arat pln pts flush_l1d
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0064 
sec, LOAD: 1.0894 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.1091 sec, LOAD: 
0.3277 sec.
   Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0867 sec, LOAD: 
1.0511 sec.
   Timing for FashionMNIST: 
https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz,
 DNS: 0.4348 sec, LOAD: 1.3855 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0096 sec, LOAD: 
0.9672 sec.
   Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.1208 sec, 
LOAD: 0.5066 sec.
   
   ```
   
   Package used (Python/R/Scala/Julia):
   (I'm using Python)
   
   ## Build info (Required if built from source)
   
   Compiler (gcc/clang/mingw/visual studio): `gcc`
   
   MXNet commit hash:
   (Paste the output of `git rev-parse HEAD` here.)
   3e2f752d493b3819aa7ac60c58a7b6caa346e13a
   
   Build config:
   (Paste the content of config.mk, or the build command.)
   ```
   ifndef CC
   export CC = gcc
   endif
   ifndef CXX
   export CXX = g++
   endif
   ifndef NVCC
   export NVCC = nvcc
   endif
   
   DEV = 0
   DEBUG = 0
   USE_SIGNAL_HANDLER =
   
   # Build onnx beforehand: `cd 3rdparty/onnx-tensorrt/third_party/onnx && 
mkdir build && cd build && cmake .. && make`
   ADD_LDFLAGS = -L/usr/local/TensorRT/lib 
-L3rdparty/onnx-tensorrt/third_party/onnx/build
   ADD_CFLAGS = -I/usr/local/TensorRT/include 
-I3rdparty/onnx-tensorrt/third_party/onnx 
-I3rdparty/onnx-tensorrt/third_party/onnx/build
   
   USE_CUDA = 1
   USE_CUDA_PATH = /usr/local/cuda
   ENABLE_CUDA_RTC = 1
   USE_CUDNN = 1
   USE_NCCL = 1
   USE_NCCL_PATH = /usr/local/cuda
   
   USE_OPENCV = 1
   USE_OPENCV_INC_PATH = /usr/local/include/opencv4
   USE_OPENCV_LIB_PATH = /usr/local/lib
   
   USE_LIBJPEG_TURBO = 1
   USE_LIBJPEG_TURBO_PATH = /opt/libjpeg-turbo
   
   USE_OPENMP = 1
   USE_MKLDNN =
   USE_NNPACK = 0
   
   UNAME_S := $(shell uname -s)
   ifeq ($(UNAME_S), Darwin)
   USE_BLAS = apple
   else
   USE_BLAS = mkl
   endif
   
   USE_LAPACK = 1
   USE_LAPACK_PATH = /usr/lib/x86_64-linux-gnu/lapack
   USE_INTEL_PATH = /opt/intel
   
   ifeq ($(USE_BLAS), mkl)
   USE_STATIC_MKL = 1
   else
   USE_STATIC_MKL = NONE
   endif
   
   ARCH := $(shell uname -a)
   ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64))
       USE_SSE=0
       USE_F16C=0
   else
       USE_SSE=1
   endif
   
   USE_F16C = 
   
   USE_DIST_KVSTORE = 0
   USE_HDFS = 0
   LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server
   USE_S3 = 0
   USE_OPERATOR_TUNING = 1
   USE_GPERFTOOLS = 1
   USE_GPERFTOOLS_PATH =
   USE_GPERFTOOLS_STATIC =
   USE_JEMALLOC = 1
   USE_JEMALLOC_PATH =
   USE_JEMALLOC_STATIC =
   
   EXTRA_OPERATORS =
   
   USE_CPP_PACKAGE = 1
   USE_TENSORRT = 1
   ONNX_NAMESPACE = onnx
   CUDA_ARCH = -gencode arch=compute_52,code=sm_52
   ```
   
   ## Error Message:
   (Paste the complete error message, including stack trace.)
   ```
   (building has no error; libiomp5.so, libmkldnn.so.0, libmklml_intel.so, 
libmxnet.a, libmxnet.so, libsparse_matrix.so are safely under lib/)
   
   $ pip install -ve python
   Created temporary directory: /tmp/pip-ephem-wheel-cache-5cnkx40b
   Created temporary directory: /tmp/pip-req-tracker-472qek7b
   Created requirements tracker '/tmp/pip-req-tracker-472qek7b'
   Created temporary directory: /tmp/pip-install-wr6wcc6v
   Obtaining file://~/workspace/lib/mxnet/python
     Added file://~/workspace/lib/mxnet/python to build tracker 
'/tmp/pip-req-tracker-472qek7b'
       Running setup.py (path:~/workspace/lib/mxnet/python/setup.py) egg_info 
for package from file://~/workspace/lib/mxnet/python
       Running command python setup.py egg_info
   Cleaning up...
   Removed file://~/workspace/lib/mxnet/python from build tracker 
'/tmp/pip-req-tracker-472qek7b'
   Removed build tracker '/tmp/pip-req-tracker-472qek7b'
   Command "python setup.py egg_info" failed with error code -11 in 
~/workspace/lib/mxnet/python/
   Exception information:
   Traceback (most recent call last):
     File 
"~/anaconda3/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", 
line 179, in main
       status = self.run(options, args)
     File 
"~/anaconda3/lib/python3.6/site-packages/pip/_internal/commands/install.py", 
line 315, in run
       resolver.resolve(requirement_set)
     File "~/anaconda3/lib/python3.6/site-packages/pip/_internal/resolve.py", 
line 131, in resolve
       self._resolve_one(requirement_set, req)
     File "~/anaconda3/lib/python3.6/site-packages/pip/_internal/resolve.py", 
line 294, in _resolve_one
       abstract_dist = self._get_abstract_dist_for(req_to_install)
     File "~/anaconda3/lib/python3.6/site-packages/pip/_internal/resolve.py", 
line 226, in _get_abstract_dist_for
       req, self.require_hashes, self.use_user_site, self.finder,
     File 
"~/anaconda3/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", 
line 382, in prepare_editable_requirement
       abstract_dist.prep_for_dist(finder, self.build_isolation)
     File 
"~/anaconda3/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", 
line 158, in prep_for_dist
       self.req.prepare_metadata()
     File 
"~/anaconda3/lib/python3.6/site-packages/pip/_internal/req/req_install.py", 
line 530, in prepare_metadata
       self.run_egg_info()
     File 
"~/anaconda3/lib/python3.6/site-packages/pip/_internal/req/req_install.py", 
line 609, in run_egg_info
       command_desc='python setup.py egg_info')
     File 
"~/anaconda3/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 
761, in call_subprocess
       % (command_desc, proc.returncode, cwd))
   pip._internal.exceptions.InstallationError: Command "python setup.py 
egg_info" failed with error code -11 in ~/workspace/lib/mxnet/python/
   ```
   
   ## 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. edit `config.mk` as above
   2. `make` and wait
   3. `pip install -e python`
   
   ## What have you tried to solve it?
   
   1.
   2.
   

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


With regards,
Apache Git Services

Reply via email to