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

Build failed on 1.4.1-rc0 with no openCV #14937

Closed
mjwall opened this issue May 12, 2019 · 7 comments
Closed

Build failed on 1.4.1-rc0 with no openCV #14937

mjwall opened this issue May 12, 2019 · 7 comments

Comments

@mjwall
Copy link
Member

mjwall commented May 12, 2019

Description

Got a failure running make from the extracted 1.4.1-rc0 src artifact. I have never built this before, so it is possible it is something specific to my environment but I wanted to capture a ticket just in case.

Environment info (Required)

----------Python Info----------
Version      : 3.7.1
Compiler     : GCC 7.3.0
Build        : ('default', 'Dec 14 2018 19:28:38')
Arch         : ('64bit', '')
------------Pip Info-----------
Version      : 18.1
Directory    : /home/mikewall/anaconda3/lib/python3.7/site-packages/pip
----------MXNet Info-----------
No MXNet installed.
----------System Info----------
Platform     : Linux-4.18.0-18-generic-x86_64-with-debian-buster-sid
system       : Linux
node         : batman3
release      : 4.18.0-18-generic
version      : #19-Ubuntu SMP Tue Apr 2 18:13:16 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):              12
On-line CPU(s) list: 0-11
Thread(s) per core:  2
Core(s) per socket:  6
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               158
Model name:          Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Stepping:            10
CPU MHz:             2834.267
CPU max MHz:         4100.0000
CPU min MHz:         800.0000
BogoMIPS:            4416.00
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            9216K
NUMA node0 CPU(s):   0-11
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 art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp flush_l1d
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0313 sec, LOAD: 0.6029 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0382 sec, LOAD: 0.5735 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0597 sec, LOAD: 0.7586 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0526 sec, LOAD: 0.7645 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0194 sec, LOAD: 0.4700 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0332 sec, LOAD: 0.1826 sec.

Package used (Python/R/Scala/Julia):
Non

Build info (Required if built from source)

See diagnostics above

MXNet commit hash:
https://github.com/apache/incubator-mxnet/tree/1a7199691f5cbc6012bb53eecbf884bed5ae6590/

Build config:
make

Error Message:

Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -DNDEBUG=1 -I/home/user/Desktop/mxnet-1.4.1/apache-mxnet-src-1.4.1.rc0-incubating/3rdparty/mshadow/ -I/home/user/Desktop/mxnet-1.4.1/apache-mxnet-src-1.4.1.rc0-incubating/3rdparty/dmlc-core/include -fPIC -I/home/user/Desktop/mxnet-1.4.1/apache-mxnet-src-1.4.1.rc0-incubating/3rdparty/tvm/nnvm/include -I/home/user/Desktop/mxnet-1.4.1/apache-mxnet-src-1.4.1.rc0-incubating/3rdparty/dlpack/include -I/home/user/Desktop/mxnet-1.4.1/apache-mxnet-src-1.4.1.rc0-incubating/3rdparty/tvm/include -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -mf16c -DMSHADOW_USE_CUDA=0 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_OPENCV=1  -fopenmp -DMXNET_USE_OPERATOR_TUNING=1  -DMXNET_USE_NCCL=0 -DMXNET_USE_LIBJPEG_TURBO=0 -MMD -c src/io/image_aug_default.cc -o build/src/io/image_aug_default.o
In file included from src/io/image_aug_default.cc:31:
src/io/./image_augmenter.h:31:10: fatal error: opencv2/opencv.hpp: No such file or directory
 #include <opencv2/opencv.hpp>
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:462: build/src/io/image_aug_default.o] Error 1

Minimum reproducible example

Steps to reproduce

tar xzf apache-mxnet-src-1.4.1.rc0-incubating.tar.gz
cd apache-mxnet-src-1.4.1.rc0-incubating
make

What have you tried to solve it?

Nothing

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Build

@szha
Copy link
Member

szha commented May 13, 2019

Hi. You can use make USE_OPENCV=0 to disable opencv related features when you don’t have opencv in your system.

@szha
Copy link
Member

szha commented May 13, 2019

@szha szha closed this as completed May 13, 2019
@szha szha added the Question label May 13, 2019
@mjwall
Copy link
Member Author

mjwall commented May 13, 2019

https://mxnet.apache.org/versions/master/install/build_from_source.html#build-configurations

Thanks @szha, since OpenCV is optional, I assumed the USE_OPENCV=0 was default. I figured it was something with my environment though since others are able to build. I realize too most people will have OpenCV installed.

Does it suprise you that the build ran for 15 min before throwing that error? I guess I was expecting the build script to fail fast if it was misconfigured.

@szha
Copy link
Member

szha commented May 13, 2019

@mjwall agreed that it shouldn't be like that. In general we are moving towards cmake which should be able to fail fast in this case, and we will likely unify the solution and deprecate makefile at some point.

@mjwall
Copy link
Member Author

mjwall commented May 15, 2019

awesome, thanks @szha. Is there a ticket for the cmake stuff I can follow?

@szha
Copy link
Member

szha commented May 18, 2019

#8702

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

No branches or pull requests

3 participants