Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Build MXNet with opencv error on MacOS #11048

Closed
xinyu-intel opened this issue May 24, 2018 · 2 comments
Closed

Build MXNet with opencv error on MacOS #11048

xinyu-intel opened this issue May 24, 2018 · 2 comments

Comments

@xinyu-intel
Copy link
Contributor

Description

Build MXNet error on MacOS, related to opencv.

Environment info (Required)

----------Python Info----------
('Version      :', '2.7.15')
('Compiler     :', 'GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)')
('Build        :', ('default', 'May  1 2018 16:44:08'))
('Arch         :', ('64bit', ''))
------------Pip Info-----------
('Version      :', '10.0.1')
('Directory    :', '/usr/local/lib/python2.7/site-packages/pip')
----------MXNet Info-----------
No MXNet installed.
----------System Info----------
('Platform     :', 'Darwin-17.5.0-x86_64-i386-64bit')
('system       :', 'Darwin')
('node         :', '*')
('release      :', '17.5.0')
('version      :', 'Darwin Kernel Version 17.5.0: Mon Mar  5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64')
----------Hardware Info----------
('machine      :', 'x86_64')
('processor    :', 'i386')
machdep.cpu.brand_string: Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz
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
machdep.cpu.leaf7_features: SMEP ERMS RDWRFSGS TSC_THREAD_OFFSET BMI1 HLE AVX2 BMI2 INVPCID RTM SMAP RDSEED ADX IPT AVX512F AVX512CD AVX512DQ AVX512BW AVX512VL PQM FPU_CSDS MPX PQE CLFSOPT
machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP TSCI
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0036 sec, LOAD: 1.2555 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0030 sec, LOAD: 2.1727 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0058 sec, LOAD: 1.1019 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0201 sec, LOAD: 0.6545 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0065 sec, LOAD: 2.0119 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0069 sec, LOAD: 2.0946 sec.

Build info (Required if built from source)

Compiler: gcc version 5.5.0 (Homebrew GCC 5.5.0_2)

MXNet commit hash:
704d218

Build config:
make -j8 CC=gcc-5 CXX=g++-5 USE_OPENCV=1 USE_BLAS=apple

Error Message:

Undefined symbols for architecture x86_64:
  "cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)", referenced from:
      _main in ccPqdgNh.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [bin/im2rec] Error 1

Note that clang works but I have to use gcc to enable openmp.

@pengzhao-intel @zheng-da

@lanking520
Copy link
Member

Hi @xinyu-intel , could you provide your openCV version on your computer?

@xinyu-intel
Copy link
Contributor Author

@lanking520 Hi, here is the build log: g++-5 -std=c++11 -DMXNET_USE_OPENCV=1 -I/usr/local/Cellar/opencv/3.4.1_5/include/opencv -I/usr/local/Cellar/opencv/3.4.1_5/include, seems opencv 3.4 comes from homebrew.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants