Closed raviv closed 6 years ago
Can you echo your path?
@pjh5 /home/raviv/bin:/home/raviv/.local/bin:/usr/local/cuda-8.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Also, I'm using OpenCV from python with no issues
What operating system are you using? Can you run find / -name libopencv* 2>/dev/null
and otool -L libcaffe2.dylib
if you are on a mac (with full path to libcaffe2.dylib) or ldd libcaffe2.a
or ldd libcaffe2.so
if you're on linux?
I'm trying to repro this
I'm using Linux Mint 18.3
/usr/local/lib $ ldd libcaffe2.so
linux-vdso.so.1 => (0x00007fff529f0000)
libprotobuf.so.9 => /usr/lib/x86_64-linux-gnu/libprotobuf.so.9 (0x00007f7e887a9000)
libgflags.so.2 => /usr/lib/x86_64-linux-gnu/libgflags.so.2 (0x00007f7e88588000)
libglog.so.0 => /usr/lib/x86_64-linux-gnu/libglog.so.0 (0x00007f7e88359000)
liblmdb.so.0 => /usr/lib/x86_64-linux-gnu/liblmdb.so.0 (0x00007f7e88144000)
libleveldb.so.1 => /usr/lib/x86_64-linux-gnu/libleveldb.so.1 (0x00007f7e87eea000)
libmpi_cxx.so.1 => /usr/lib/libmpi_cxx.so.1 (0x00007f7e87ccf000)
libmpi.so.12 => /usr/lib/libmpi.so.12 (0x00007f7e879f9000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7e877e3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7e875df000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7e873c2000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7e87040000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7e86d37000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f7e86b15000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7e8674b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7e897cb000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7e86531000)
libunwind.so.8 => /usr/lib/x86_64-linux-gnu/libunwind.so.8 (0x00007f7e86316000)
libsnappy.so.1 => /usr/lib/x86_64-linux-gnu/libsnappy.so.1 (0x00007f7e8610e000)
libibverbs.so.1 => /usr/lib/libibverbs.so.1 (0x00007f7e85eff000)
libopen-rte.so.12 => /usr/lib/libopen-rte.so.12 (0x00007f7e85c85000)
libopen-pal.so.13 => /usr/lib/libopen-pal.so.13 (0x00007f7e859e8000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f7e857c6000)
libhwloc.so.5 => /usr/lib/x86_64-linux-gnu/libhwloc.so.5 (0x00007f7e8558c000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7e85384000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f7e85181000)
libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f7e84f76000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f7e84d6c000)
I can see many libopencv*.so files in /usr/local/lib
alongside the various libCaffe2*.so files
What's the effect of OpenCV not being detected during build? I was able to build, run training and inference without OpenCV being detected.
Thanks!
OpenCV is an optional library that has optimized implementations of some common CV routines. Certain Caffe2 models might require functions that are provided by OpenCV, or they might use functions that could be made faster by OpenCV.
If you don't care about OpenCV then feel free to close this issue
@pjh5 I rather use OpenCV. I successfully compiled caffe2 with on a different machine which has OpenCV 3.3.0, so it must be something with how OpenCV was installed on the first machine. How can we investigate further? Thanks!
Run find / -name libopencv* 2>/dev/null
on both machines to see differences in where opencv is installed on each machine.
Thanks @pjh5, I had two source versions of OpenCV but only one was installed. Don't know how cmake is looking for OpenCV but I guess it confused it.
pkg-config opencv --libs
-I/usr/local/include/opencv -I/usr/local/include
pkg-config opencv --libs
-L/usr/local/lib -lopencv_cudabgsegm -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_dnn -lopencv_ml -lopencv_shape -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_photo -lopencv_imgcodecs -lopencv_cudawarping -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_video -lopencv_objdetect -lopencv_imgproc -lopencv_flann -lopencv_cudaarithm -lopencv_core -lopencv_cudev
make