Ask Your Question
0

Missing ts from Release build

asked 2017-03-16 07:30:20 -0600

adn gravatar image

updated 2017-03-16 13:15:08 -0600

I'm testing the unit test framework of OpenCV, as instructed in here: quentin.bonnard.eu/blog/2013/10/16/Using-OpenCV_s_test_framework_with_CMake/.

However, when I want to test the examples the ts module is not found in my installation:

CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find OpenCV (missing: ts) (found version "3.2.0")
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/OpenCV/OpenCVConfig.cmake:260 (find_package_handle_standard_args)
test/CMakeLists.txt:5 (find_package)

I compile OpenCV myself. I was wondering if there are any options I need to give to cmake to build or include ts module on the final libraries. Note that I'm building it with RELEASE option.

CMake Output

cmake \
  -D CMAKE_BUILD_TYPE=RELEASE \
  -D ENABLE_PRECOMPILED_HEADERS=OFF \
  -D CMAKE_INSTALL_PREFIX=/usr/local \
  -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
  -D BUILD_NEW_PYTHON_SUPPORT=ON \
  -D WITH_TBB=ON \
  -D WITH_QT=ON \
  -D WITH_OPENGL=ON \
  -D BUILD_TIFF=ON \
  -D BUILD_SHARED_LIBS=ON \
  -D BUILD_EXAMPLES=ON \
  -D BUILD_opencv_ts=ON \
  ..


-- Detected version of GNU GCC: 62 (602)
-- FP16: Feature disabled
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
-- Found OpenEXR: /usr/lib/x86_64-linux-gnu/libIlmImf.so
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for module 'libavresample'
--   No package 'libavresample' found
-- Checking for module 'libgphoto2'
--   No package 'libgphoto2' found
-- A library with BLAS API not found. Please specify library location.
-- LAPACK requires BLAS
-- A library with LAPACK API not found. Please specify library location.
-- Found TBB: /usr/lib/x86_64-linux-gnu/libtbb.so
-- found IPP (ICV version): 9.0.1 [9.0.1]
-- at: /home/user/bin/opencv/build/3rdparty/ippicv/ippicv_lnx
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Caffe:   NO
-- Protobuf:   YES
-- Glog:   NO
-- freetype2:   YES
-- harfbuzz:    YES
-- Could NOT find HDF5 (missing:  HDF5_LIBRARIES HDF5_INCLUDE_DIRS) 
-- Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
-- freetype2:   YES
-- harfbuzz:    YES
-- Checking for modules 'tesseract;lept'
--   No package 'tesseract' found
--   No package 'lept' found
-- Tesseract:   NO
-- Check contents of vgg_generated_48.i ...
-- Check contents of vgg_generated_64.i ...
-- Check contents of vgg_generated_80.i ...
-- Check contents of vgg_generated_120.i ...
-- Check contents of boostdesc_bgm.i ...
-- Check contents of boostdesc_bgm_bi.i ...
-- Check contents of boostdesc_bgm_hd.i ...
-- Check contents of boostdesc_binboost_064.i ...
-- Check contents of boostdesc_binboost_128.i ...
-- Check contents of boostdesc_binboost_256.i ...
-- Check contents of boostdesc_lbgm.i ...
-- 
-- General configuration for OpenCV 3.2.0-rc =====================================
--   Version control:               3.2.0-rc
-- 
--   Extra modules:
--     Location (extra):            /home/user/bin/opencv_contrib/modules
--     Version control (extra):     3.2.0-rc
-- 
--   Platform:
--     Timestamp:                   2017-03-16T16:40:39Z
--     Host:                        Linux 4.8.0-40-generic x86_64 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-03-16 07:48:20 -0600

LBerger gravatar image

updated 2017-03-16 10:33:25 -0600

when you build opencv cmakelists for ts module is :

if(NOT BUILD_opencv_ts AND NOT BUILD_TESTS AND NOT BUILD_PERF_TESTS)
  ocv_module_disable(ts)
endif()

you will need set BUILD_opencv_ts or BUILD_TESTS or BUILD_PERF_TESTS in cmake process

edit flag offensive delete link more

Comments

I actually tried with BUILD_TESTS=ON before, but still cmake didn't find it. I tried with BUILD_opencv_ts=ON now, and cmake says that there is not ts inside the library. I see that the cmake output says that ts will be built, but I don't see any related message in the building or linking logs related to ts (maybe it has a different name?). Also, I'm following the pattern in the previous link, find_package ( OpenCV REQUIRED ts ), could it be that the name of the module is different for some reason?

adn gravatar imageadn ( 2017-03-16 11:48:31 -0600 )edit

Have you clone Opencv ? Can you post cmake output?

LBerger gravatar imageLBerger ( 2017-03-16 11:59:09 -0600 )edit
1

I added it to the question, including the flags I used to build OpenCV

adn gravatar imageadn ( 2017-03-16 13:15:35 -0600 )edit

@adn, your cmake output says, that the opencv_ts module will be built (look at the "to be build" section)

try a full make install , and check again.

berak gravatar imageberak ( 2017-03-16 13:23:00 -0600 )edit

That is the strange part. I see the [ 23%] Built target opencv_ts message in the build log, but it is not in the install log. Also, tried by changing find_package ( OpenCV REQUIRED opencv_ts ), assuming that the name of the module may be different, but that didn't work either. Maybe I need an install flag on the cmake?

adn gravatar imageadn ( 2017-03-16 13:48:07 -0600 )edit

No, it wasn't installed. I copy it manually to the /usr/local/lib path and ran ldconfig again, but it didn't work. Maybe the library needs to now that it was installed through the cmake configuration?

adn gravatar imageadn ( 2017-03-16 14:08:05 -0600 )edit

Same issue here. opencv_ts was built but not installed.

grammaright gravatar imagegrammaright ( 2017-07-05 02:32:59 -0600 )edit

BUILD_TESTS is ON, BUILD_PERF_TESTS is ON, BUILD_opencv_ts is ON.

grammaright gravatar imagegrammaright ( 2017-07-05 02:37:49 -0600 )edit

@grammaright , opencv_ts is only needed (at build time of the libraries), if you want to build & run the opencv library unit tests.

neither the headers, nor the lib itself will be installed, that is on purpose, you're not supposed to use it "outside" the library currently (but this approach is going to change in the future)

berak gravatar imageberak ( 2017-07-05 02:56:19 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-03-16 07:30:20 -0600

Seen: 1,779 times

Last updated: Mar 16 '17