G
G
Gox2016-03-01 16:55:26
linux
Gox, 2016-03-01 16:55:26

Possible causes of errors when installing Opencv on Scientific Linux?

Hello,
I'm trying to install OpenCV opencv-2.4.9 on Scientific linux. But after executing the make command, an error occurs:

cc1plus: warning: invalid key "-Wno-narrowing"
[ 26%] Linking CXX shared library ../../lib/libopencv_video.so
[ 26%] Built target opencv_video
make: *** [all] Error 2

or
[ 12%] Generating src/moc_window_QT.cxx
moc: Cannot open options file specified with @
Usage: moc [options]
-o write output to file rather than stdout
-I add dir to the include path for header files
-E preprocess only; do not generate meta object code
-D[=] define macro, with optional definition
-U undefine macro
-i do not generate an #include statement
-p path prefix for included file
-f[] force #include, optional file name
-nw do not display warnings
@ read additional options from file
-v display version of moc
make[2]: *** [modules/highgui/src/moc_window_QT.cxx] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [ all] Error 2

When trying to install OpenCV versions higher than opencv-2.4.9, the error occurs at the Cmake stage (although the latest version downloaded from the repository is installed).
-- Configuring incomplete, errors occurred!
See also "/root/Downloads/opencv-3.1.0/build/CMakeFiles/CMakeOutput.log".
See also "/root/Downloads/opencv-3.1.0/build/CMakeFiles/CMakeError.log".

What could be the reason for these errors?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gox, 2016-03-02
@Gox

The solution for the first part of the question is found. The error is caused by a combination of Qt versions below 5 and the presence of non-Latin characters in the path to the directory from which cmake is executed. Accordingly, the problem was solved with the update of Qt.
Useful link:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question