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 2019/02/28 07:38:58 UTC

[GitHub] xcwanAndy opened a new issue #14280: Compiling from source code error

xcwanAndy opened a new issue #14280: Compiling from source code error
URL: https://github.com/apache/incubator-mxnet/issues/14280
 
 
   ## Description
   Compiling from source code occurred ***link libzmq*** error.
   ## Environment info (Required)
   ```
   ----------Python Info----------
   ('Version      :', '2.7.12')
   ('Compiler     :', 'GCC 5.4.0 20160609')
   ('Build        :', ('default', 'Nov 12 2018 14:36:49'))
   ('Arch         :', ('64bit', 'ELF'))
   ------------Pip Info-----------
   ('Version      :', '8.1.1')
   ('Directory    :', '/usr/lib/python2.7/dist-packages/pip')
   ----------MXNet Info-----------
   ('Version      :', '1.3.1')
   ('Directory    :', '/home/ubuntu/.local/lib/python2.7/site-packages/mxnet')
   ('Commit Hash   :', '19c501680183237d52a862e6ae1dc4ddc296305b')
   ----------System Info----------
   ('Platform     :', 'Linux-4.4.0-142-generic-x86_64-with-Ubuntu-16.04-xenial')
   ('system       :', 'Linux')
   ('node         :', 'cpu15')
   ('release      :', '4.4.0-142-generic')
   ('version      :', '#168-Ubuntu SMP Wed Jan 16 21:00:45 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):                24
   On-line CPU(s) list:   0-23
   Thread(s) per core:    2
   Core(s) per socket:    6
   Socket(s):             2
   NUMA node(s):          2
   Vendor ID:             GenuineIntel
   CPU family:            6
   Model:                 62
   Model name:            Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz
   Stepping:              4
   CPU MHz:               2600.000
   CPU max MHz:           3100.0000
   CPU min MHz:           1200.0000
   BogoMIPS:              5201.74
   Virtualization:        VT-x
   L1d cache:             32K
   L1i cache:             32K
   L2 cache:              256K
   L3 cache:              15360K
   NUMA node0 CPU(s):     0-5,12-17
   NUMA node1 CPU(s):     6-11,18-23
   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 aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm epb ssbd ibrs ibpb stibp kaiser tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm arat pln pts flush_l1d
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0010 sec, LOAD: 1.4220 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.3412 sec, LOAD: 1.2661 sec.
   Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.1701 sec, LOAD: 10.9662 sec.
   Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0634 sec, LOAD: 0.2553 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.2422 sec, LOAD: 1.0355 sec.
   Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.6101 sec, LOAD: 1.2469 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:
   7c617ccc7a8655f3b93acdfac8aeee20eee2a778
   
   Build config:
   In CMakeLists.txt, I set:
   ```
   mxnet_option(USE_CUDA             "Build with CUDA support"   OFF)
   mxnet_option(USE_OLDCMAKECUDA     "Build with old cmake cuda" OFF)
   mxnet_option(USE_NCCL             "Use NVidia NCCL with CUDA" OFF)
   mxnet_option(USE_OPENCV           "Build with OpenCV support" ON)
   mxnet_option(USE_OPENMP           "Build with Openmp support" OFF)
   mxnet_option(USE_CUDNN            "Build with cudnn support"  OFF) # one could set CUDNN_ROOT for search path
   mxnet_option(USE_SSE              "Build with x86 SSE instruction support" ON IF NOT ARM)
   mxnet_option(USE_F16C             "Build with x86 F16C instruction support" ON) # autodetects support if ON
   mxnet_option(USE_LAPACK           "Build with lapack support" ON)
   mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON)
   mxnet_option(USE_MKLML_MKL        "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE))
   mxnet_option(USE_MKLDNN           "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) AND (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") AND (NOT CMAKE_CROSSCOMPILING))
   mxnet_option(USE_OPERATOR_TUNING  "Enable auto-tuning of operators" ON IF NOT MSVC)
   mxnet_option(USE_GPERFTOOLS       "Build with GPerfTools support (if found)" ON)
   mxnet_option(USE_JEMALLOC         "Build with Jemalloc support"   ON)
   mxnet_option(USE_PROFILER         "Build with Profiler support"   ON)
   mxnet_option(USE_DIST_KVSTORE     "Build with DIST_KVSTORE support" ON)
   mxnet_option(USE_PLUGINS_WARPCTC  "Use WARPCTC Plugins" OFF)
   mxnet_option(USE_PLUGIN_CAFFE     "Use Caffe Plugin" OFF)
   mxnet_option(USE_CPP_PACKAGE      "Build C++ Package" ON)
   mxnet_option(USE_MXNET_LIB_NAMING "Use MXNet library naming conventions." ON)
   mxnet_option(USE_GPROF            "Compile with gprof (profiling) flag" OFF)
   mxnet_option(USE_CXX14_IF_AVAILABLE "Build with C++14 if the compiler supports it" ON)
   mxnet_option(USE_VTUNE            "Enable use of Intel Amplifier XE (VTune)" OFF) # one could set VTUNE_ROOT for search path
   mxnet_option(ENABLE_CUDA_RTC      "Build with CUDA runtime compilation support" OFF)
   mxnet_option(BUILD_CPP_EXAMPLES   "Build cpp examples" ON)
   mxnet_option(INSTALL_EXAMPLES     "Install the example source files." OFF)
   mxnet_option(USE_SIGNAL_HANDLER   "Print stack traces on segfaults." OFF)
   mxnet_option(USE_TENSORRT         "Enable infeference optimization with TensorRT." OFF)
   mxnet_option(USE_ASAN             "Enable Clang/GCC ASAN sanitizers." OFF)
   mxnet_option(ENABLE_TESTCOVERAGE  "Enable compilation with test coverage metric output" OFF)
   ```
   and build files with ```ninja -v ```
   
   ## Error Message:
   ```
   FAILED: : && /usr/bin/c++   -Wall -Wno-unknown-pragmas -Wno-sign-compare -O3 -msse2 -std=c++14 -mf16c -std=c++1y   example/image-classification/predict-cpp/CMakeFiles/image-classification-predict.dir/image-classification-predict.cc.o  -o example/image-classification/predict-cpp/image-classification-predict -L/home/ubuntu/incubator-mxnet/cmake_build/mklml/mklml_lnx_2019.0.1.20180928/lib -rdynamic -Wl,--whole-archive libmxnet.a -Wl,--no-whole-archive 3rdparty/dmlc-core/libdmlc.a 3rdparty/mkldnn/src/libmkldnn.so.0.17.4.0 -lopenblas -lrt /usr/local/lib/libopencv_highgui.so.4.0.1 -lpthread -llapack -lprotobuf -lzmq 3rdparty/ps-lite/libpslite.a -lprotobuf -lmklml_intel mklml/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so /usr/local/lib/libopencv_videoio.so.4.0.1 /usr/local/lib/libopencv_imgcodecs.so.4.0.1 /usr/local/lib/libopencv_imgproc.so.4.0.1 /usr/local/lib/libopencv_core.so.4.0.1 -Wl,-rpath,/home/ubuntu/incubator-mxnet/cmake_build/3rdparty/mkldnn/src:/usr/local/lib:/home/ubuntu/incubator-mxnet/cmake_build/mklml/mklml_lnx_2019.0.1.20180928/lib && :
   3rdparty/ps-lite/libpslite.a(van.cc.o): In function `std::_Sp_counted_deleter<char*, ps::ZMQVan::RecvMsg(ps::Message*)::{lambda(char*)#1}, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose()':
   van.cc:(.text._ZNSt19_Sp_counted_deleterIPcZN2ps6ZMQVan7RecvMsgEPNS1_7MessageEEUlS0_E_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv[_ZNSt19_Sp_counted_deleterIPcZN2ps6ZMQVan7RecvMsgEPNS1_7MessageEEUlS0_E_SaIvELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv]+0x9): undefined reference to `zmq_msg_close'
   3rdparty/ps-lite/libpslite.a(van.cc.o): In function `ps::ZMQVan::Stop()':
   van.cc:(.text._ZN2ps6ZMQVan4StopEv[_ZN2ps6ZMQVan4StopEv]+0xe5): undefined reference to `zmq_setsockopt'
   van.cc:(.text._ZN2ps6ZMQVan4StopEv[_ZN2ps6ZMQVan4StopEv]+0x14c): undefined reference to `zmq_close'
   van.cc:(.text._ZN2ps6ZMQVan4StopEv[_ZN2ps6ZMQVan4StopEv]+0x2c2): undefined reference to `zmq_setsockopt'
   van.cc:(.text._ZN2ps6ZMQVan4StopEv[_ZN2ps6ZMQVan4StopEv]+0x31c): undefined reference to `zmq_close'
   van.cc:(.text._ZN2ps6ZMQVan4StopEv[_ZN2ps6ZMQVan4StopEv]+0x55d): undefined reference to `zmq_ctx_destroy'
   3rdparty/ps-lite/libpslite.a(van.cc.o): In function `ps::ZMQVan::Bind(ps::Node const&, int)':
   van.cc:(.text._ZN2ps6ZMQVan4BindERKNS_4NodeEi[_ZN2ps6ZMQVan4BindERKNS_4NodeEi]+0x3a): undefined reference to `zmq_socket'
   van.cc:(.text._ZN2ps6ZMQVan4BindERKNS_4NodeEi[_ZN2ps6ZMQVan4BindERKNS_4NodeEi]+0x1a3): undefined reference to `zmq_bind'
   van.cc:(.text._ZN2ps6ZMQVan4BindERKNS_4NodeEi[_ZN2ps6ZMQVan4BindERKNS_4NodeEi]+0x3e7): undefined reference to `zmq_strerror'
   3rdparty/ps-lite/libpslite.a(van.cc.o): In function `ps::ZMQVan::Connect(ps::Node const&)':
   van.cc:(.text._ZN2ps6ZMQVan7ConnectERKNS_4NodeE[_ZN2ps6ZMQVan7ConnectERKNS_4NodeE]+0x20d): undefined reference to `zmq_socket'
   van.cc:(.text._ZN2ps6ZMQVan7ConnectERKNS_4NodeE[_ZN2ps6ZMQVan7ConnectERKNS_4NodeE]+0x29a): undefined reference to `zmq_setsockopt'
   van.cc:(.text._ZN2ps6ZMQVan7ConnectERKNS_4NodeE[_ZN2ps6ZMQVan7ConnectERKNS_4NodeE]+0x423): undefined reference to `zmq_connect'
   van.cc:(.text._ZN2ps6ZMQVan7ConnectERKNS_4NodeE[_ZN2ps6ZMQVan7ConnectERKNS_4NodeE]+0x437): undefined reference to `zmq_strerror'
   van.cc:(.text._ZN2ps6ZMQVan7ConnectERKNS_4NodeE[_ZN2ps6ZMQVan7ConnectERKNS_4NodeE]+0x5c5): undefined reference to `zmq_close'
   van.cc:(.text._ZN2ps6ZMQVan7ConnectERKNS_4NodeE[_ZN2ps6ZMQVan7ConnectERKNS_4NodeE]+0x619): undefined reference to `zmq_strerror'
   3rdparty/ps-lite/libpslite.a(van.cc.o): In function `ps::ZMQVan::Start(int)':
   van.cc:(.text._ZN2ps6ZMQVan5StartEi[_ZN2ps6ZMQVan5StartEi]+0xa3): undefined reference to `zmq_ctx_new'
   van.cc:(.text._ZN2ps6ZMQVan5StartEi[_ZN2ps6ZMQVan5StartEi]+0x11d): undefined reference to `zmq_ctx_set'
   van.cc:(.text._ZN2ps6ZMQVan5StartEi[_ZN2ps6ZMQVan5StartEi]+0x13c): undefined reference to `zmq_ctx_new'
   van.cc:(.text._ZN2ps6ZMQVan5StartEi[_ZN2ps6ZMQVan5StartEi]+0x15e): undefined reference to `zmq_ctx_set'
   van.cc:(.text._ZN2ps6ZMQVan5StartEi[_ZN2ps6ZMQVan5StartEi]+0x17a): undefined reference to `zmq_ctx_set'
   3rdparty/ps-lite/libpslite.a(van.cc.o): In function `ps::ZMQVan::SendMsg(ps::Message const&)':
   van.cc:(.text._ZN2ps6ZMQVan7SendMsgERKNS_7MessageE[_ZN2ps6ZMQVan7SendMsgERKNS_7MessageE]+0x241): undefined reference to `zmq_msg_init_data'
   van.cc:(.text._ZN2ps6ZMQVan7SendMsgERKNS_7MessageE[_ZN2ps6ZMQVan7SendMsgERKNS_7MessageE]+0x267): undefined reference to `zmq_msg_send'
   van.cc:(.text._ZN2ps6ZMQVan7SendMsgERKNS_7MessageE[_ZN2ps6ZMQVan7SendMsgERKNS_7MessageE]+0x310): undefined reference to `zmq_msg_init_data'
   van.cc:(.text._ZN2ps6ZMQVan7SendMsgERKNS_7MessageE[_ZN2ps6ZMQVan7SendMsgERKNS_7MessageE]+0x348): undefined reference to `zmq_msg_send'
   van.cc:(.text._ZN2ps6ZMQVan7SendMsgERKNS_7MessageE[_ZN2ps6ZMQVan7SendMsgERKNS_7MessageE]+0x379): undefined reference to `zmq_strerror'
   3rdparty/ps-lite/libpslite.a(van.cc.o): In function `ps::ZMQVan::RecvMsg(ps::Message*)':
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0xad): undefined reference to `zmq_msg_init'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0xf6): undefined reference to `zmq_msg_recv'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x105): undefined reference to `zmq_msg_data'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x116): undefined reference to `zmq_msg_data'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x123): undefined reference to `zmq_msg_size'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x217): undefined reference to `zmq_msg_more'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x245): undefined reference to `zmq_strerror'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x300): undefined reference to `zmq_strerror'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x384): undefined reference to `zmq_msg_more'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x3d0): undefined reference to `zmq_msg_close'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x3f7): undefined reference to `zmq_msg_close'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x3ff): undefined reference to `zmq_msg_more'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x4bc): undefined reference to `zmq_msg_data'
   van.cc:(.text._ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE[_ZN2ps6ZMQVan7RecvMsgEPNS_7MessageE]+0x56a): undefined reference to `zmq_msg_close'
   collect2: error: ld returned 1 exit status
   In file included from ../tests/cpp/operator/dropout_perf.cc:30:0:
   ../3rdparty/mshadow/../../src/operator/nn/dropout-inl.h:492:19: warning: ‘mxnet::OpStatePtr mxnet::op::CreateDropoutState(const nnvm::NodeAttrs&, mxnet::Context, const std::vector<nnvm::TShape, std::allocator<nnvm::TShape> >&, const std::vector<int>&)’ defined but not used [-Wunused-function]
    static OpStatePtr CreateDropoutState(const nnvm::NodeAttrs &attrs,
                      ^
   ninja: build stopped: subcommand failed.
   ```
   
   ## Steps to reproduce
   
   1. mkdir cmake_build && cd cmake_build
   2. cmake -DBLAS=open -DUSE_OPENCV=1 -GNinja ..
   3. ninja -v
   
   ## What have you tried to solve it?
   
   1. Use Makefile to install mxnet, but failed with the above error, either.
   
   ## Alternative information
   1. opencv version: 4.0.1
   

----------------------------------------------------------------
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