Ask Your Question
0

'cv::Exception' ... install libgtk2.0-dev runtime error

asked 2019-06-28 18:14:52 -0600

RossK gravatar image

I am trying to install OpenCV 4.1 on Fedora 29 with CUDA and Caffe support. Everything compiles fine, but when I go to run the simplest program to display an image I get:

terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(4.1.0-dev) /home/ross/OpenCV/opencv/modules/highgui/src/window.cpp:610: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvNamedWindow'

Aborted (core dumped)

I have seen this error on several posts, but haven't found a solution that works.

I have 2 general questions:

1.) Is OpenCV 4 known to work on Fedora 29/30? and

2.) Is it the case that OpenCV no longer uses pkg-config?

Help greatly appreciated.

Below are my Cmake listing and a list of the gtk packages I have installed. Note Cmake thinks I have GTK+

Here is my Cmake listing:

libjpeg-turbo: VERSION = 2.0.2, BUILD = opencv-4.1.0-dev-libjpeg-turbo found Intel IPP (ICV version): 2019.0.0 [2019.0.0 Gold] at: /home/ross/OpenCV/opencv/build/3rdparty/ippicv/ippicv_lnx/icv found Intel IPP Integration Wrappers sources: 2019.0.0 at: /home/ross/OpenCV/opencv/build/3rdparty/ippicv/ippicv_lnx/iw CUDA detected: 10.1 CUDA NVCC target flags: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-D_FORCE_INLINES LAPACK(OpenBLAS): LAPACK_LIBRARIES: /lib64/libopenblas.so LAPACK(OpenBLAS): Support is enabled. Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) Found VTK 7.1.1 (/usr/lib64/cmake/vtk/UseVTK.cmake) OpenCV Python: during development append to PYTHONPATH: /home/ross/OpenCV/opencv/build/python_loader Checking for module 'libdc1394-2' Package 'libdc1394-2', required by 'virtual:world', not found Caffe: YES Protobuf: NO Glog: YES freetype2: YES (ver 22.1.16) harfbuzz: YES (ver 1.8.7) HDF5: Using hdf5 compiler wrapper to determine C configuration Module opencv_ovis disabled because OGRE3D was not found No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available. Found installed version of gflags: /usr/lib64/cmake/gflags Detected broken gflags install in: /usr/lib64/cmake/gflags, version: 2.1.2 <= 2.1.2 which defines gflags_LIBRARIES = gflags which is not an imported CMake target, see: https://github.com/gflags/gflags/issu.... Attempting to fix by detecting correct gflags target. Found valid gflags target: gflags-shared, updating gflags_LIBRARIES. Detected gflags version: 2.1.2 Checking SFM deps... TRUE CERES support is disabled. Ceres Solver for reconstruction API is required. HDF5: Using hdf5 compiler wrapper to determine C configuration Caffe: YES Protobuf: NO Glog: YES Checking for module 'tesseract' Package 'tesseract', required ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-07-02 16:16:01 -0600

RossK gravatar image

I fixed this problem by unchecking gstreamer in the Cmake file and recompiling. I am not at all sure why this works, but ffmpeg may collide with gstreamer.

So OpenCV 4.1 with CUDA and Caffe runs on Fedora 29.

pkg-config is no longer used by OpenCV.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-06-28 18:14:52 -0600

Seen: 1,529 times

Last updated: Jul 02 '19