OpenCV の opencv/configure にバグがあるらしい

OpenCV にいつの間にか大変化が起きていた.opencv.tar.gz をダウンロードしてビルドしてみたいが,Visual Studio ではできない.cygwin でやってみる.

./configure できなかった.ログの終わり5行を示す.

(cached) (cached) checking how to hardcode library paths into programs... immediate
checking for gcc option to support OpenMP... unsupported
checking for x86 cpuid  output... unknown
checking for x86 cpuid 0x00000001 output... 6fb:40800:e3bd:bfebfbff
>>23&0x01")syntax error: invalid arithmetic operator (error token is "ff

opencv/configure を 23 で検索し,第21664行に関連するとおぼしき記述があった.

    if test "$((0x$edx>>23&0x01))" = 1; then

括弧にドルってどういう事なんだ.$(( という記述は4件あり,このすべてを (( に変更して ./configure した.

通った.

./configure の結果で ffmpegOpenMP の support が no になっているけど,これを yes にしてやりたい.事前にそれぞれ make install しておけばいいのだろうか.

make がこけた.ログの終わり10数行を示す.

mv -f .deps/lib_cxcore_la-cxdrawing.Tpo .deps/lib_cxcore_la-cxdrawing.Plo/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -I../3rdparty/include -DNDEBUG  -I../include/opencv  -O3 -g -march=pentium4 -ffast-math -fomit-frame-pointer   -MT lib_cxcore_la-cxdxt.lo -MD -MP -MF .deps/lib_cxcore_la-cxdxt.Tpo -c -o lib_cxcore_la-cxdxt.lo `test -f 'cxcore/cxdxt.cpp' || echo './'`cxcore/cxdxt.cpp
 g++ -DHAVE_CONFIG_H -I. -I.. -I../3rdparty/include -DNDEBUG -I../include/opencv -O3 -g -march=pentium4 -ffast-math -fomit-frame-pointer -MT lib_cxcore_la-cxdxt.lo -MD -MP -MF .deps/lib_cxcore_la-cxdxt.Tpo -c cxcore/cxdxt.cpp  -DDLL_EXPORT-DPIC -o .libs/lib_cxcore_la-cxdxt.o
cxcore/cxdxt.cpp:59: error: expected `)' before '/' token
cxcore/cxdxt.cpp:59: error: expected `,' or `;' before '/' token
cxcore/cxdxt.cpp: In function `void cv::DFTInit(int, int, int*, int*, int, void*, int)':
cxcore/cxdxt.cpp:233: error: no matching function for call to `log(int&)'
../include/opencv/cxcore.hpp:985: note: candidates are: void cv::log(const cv::Mat&, cv::Mat&)
../include/opencv/cxcore.hpp:1507: note:  void cv::log(const cv::MatND&, cv::MatND&)
cxcore/cxdxt.cpp: In function `void cv::DCTInit(int, int, void*, int)':
cxcore/cxdxt.cpp:2064: error: no matching function for call to `log(int&)'
../include/opencv/cxcore.hpp:985: note: candidates are: void cv::log(const cv::Mat&, cv::Mat&)
../include/opencv/cxcore.hpp:1507: note:  void cv::log(const cv::MatND&, cv::MatND&)
make[2]: *** [lib_cxcore_la-cxdxt.lo] Error 1
make[2]: Leaving directory `/cygdrive/c/software/develop/opencvlibrary/opencv/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/cygdrive/c/software/develop/opencvlibrary/opencv'
make: *** [all] Error 2