Error during opencv 3.3.0 source compilation
Hi,
So I got the sources from : https://github.com/opencv/opencv/arch...
installed MinGW in c:\MinGW and rebooted (latest version)
I then installed Cmake from https://cmake.org/ (latest version)
I extracted the sources in c:\opencv_opencv3.3.0-sources
I runned cmakeGui
I gave it c:\opencv<_opencv3.3.0-sources as source dir and c:\opencv<_opencv3.3.0-build as build dir
I hitted 'configure', selected 'MinGW makefile' and let it run util it showed me checkboxes in red
I checked the C examples
I hitted 'configure' again and let it run, now all the line turned white
I hitted 'generate'
Then I went in c:\opencv_opencv3.3.0-build and opened a command line an typed : 'mingw32-make --debug'
and a 28% I get an error :
[ 28%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx2.cpp.obj
Successfully remade target file 'modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx2.cpp.obj'.
File 'modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.obj' does not exist.
Must remake target 'modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.obj'.
[ 28%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.obj
Successfully remade target file 'modules/core/CMakeFiles/opencv_core.dir/stat.avx2.cpp.obj'.
File 'modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj' does not exist.
Must remake target 'modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj'.
[ 28%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj
C:\MinGW\bin\windres.exe: invalid option -- W
Usage: C:\MinGW\bin\windres.exe [option(s)] [input-file] [output-file]
The options are:
-i --input=<file> Name input file
-o --output=<file> Name output file
-J --input-format=<format> Specify input format
-O --output-format=<format> Specify output format
-F --target=<target> Specify COFF target
--preprocessor=<program> Program to use to preprocess rc file
--preprocessor-arg=<arg> Additional preprocessor argument
-I --include-dir=<dir> Include directory when preprocessing rc file
-D --define <sym>[=<val>] Define SYM when preprocessing rc file
-U --undefine <sym> Undefine SYM when preprocessing rc file
-v --verbose Verbose - tells you what it's doing
-c --codepage=<codepage> Specify default codepage
-l --language=<val> Set language when reading rc file
--use-temp-file Use a temporary file instead of popen to read
the preprocessor output
--no-use-temp-file Use popen (default)
-r Ignored for compatibility with rc
@<file> Read options from <file>
-h --help Print this help message
-V --version Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified. A single file name is an input file.
No input-file is stdin, default rc. No output-file is stdout, default rc.
C:\MinGW\bin\windres.exe: supported targets: pe-i386 pei-i386 elf32-i386 elf32-iamcu elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
modules\core\CMakeFiles\opencv_core.dir\build.make:1641: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj' failed
mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
CMakeFiles\Makefile2:1550: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
mingw32-make[1]: *** [modules ...
https://gist.github.com/amroamroamro/...
it might already work, if you disable precompiled headers in cmake, try that first (and clean build folder) !
(but again, there will be more errors. opencv stopped supporting mingw a long time ago)
@berak@mshabunin "opencv stopped supporting mingw a long time ago" but i think it's a problem because it is a free compiler for windows (even if VS can be free download sometime ).
i never said, i liked that decision. (and i have to use mingw, too.)
last comments i've seen wrt. were like: oh, we're not going to do the work required, but if you do that, we'll happily accept patches/pr's . it's a matter of focus, i guess.
@berak I said it's only a problem (like you wrote you never said you liked it). Is it possible to solve this problem with the help opencv team ? example @mshabunin some peoples gives a full method to build a mingw64 release and opencv team make it available on github.
let's try to to write something up, maybe we can get it into the tutorials ?
@SpacePirate If you want to stick with
mingw32-make
, see:You should be able to build OpenCV 3.3 release without precompiled headers and by tweaking one file.