Hello, I'm having some problem with compiling OpenCV code on Solaris SPARC with GCC 4.4.3, I don't know whether it is an OpenCV bug (I have posted on their mailing list too) or a gcc bug. I was hoping someone may be able to shed some light on the error and provide some ideas on what I could look at to try and resolve it.
Basically I'm getting the following error: [ 54%] Building CXX object src/cxcore/CMakeFiles/cxcore.dir/cxmatmul.o /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:673: error: expected ',' or '...' before numeric constant /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp: In function 'void cv::gemm(const cv::Mat&, const cv::Mat&)': /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:682: error: conversion from 'int' to 'cv::Mat' is ambiguous /tmp/OpenCV-2.0.0/include/opencv/cxcore.hpp:732: note: candidates are: cv::Mat::Mat(const IplImage*, bool) <near match> /tmp/OpenCV-2.0.0/include/opencv/cxmat.hpp:194: note: cv::Mat::Mat(const CvMat*, bool) <near match> /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:683: error: request for member 'data' in '32', which is of non-class type 'int' /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:683: error: 'beta' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:683: error: lvalue required as unary '&' operand /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:689: error: 'flags' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:715: error: 'flags' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:718: error: 'flags' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:718: error: 'D' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:725: error: 'D' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:727: error: 'flags' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:752: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:769: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:784: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:804: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:821: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:845: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:879: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:896: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:911: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:931: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:948: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:972: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:1028: error: 'flags' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:1102: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:1102: error: 'flags' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:1106: error: 'flags' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:1233: error: 'alpha' was not declared in this scope /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:1240: error: 'alpha' was not declared in this scope make[2]: *** [src/cxcore/CMakeFiles/cxcore.dir/cxmatmul.o] Error 1 make[1]: *** [src/cxcore/CMakeFiles/cxcore.dir/all] Error 2 make: *** [all] Error 2 The first syntax error the compiler complains about I think is the main problem: /tmp/OpenCV-2.0.0/src/cxcore/cxmatmul.cpp:673: error: expected ',' or '...' before numeric constant However, when I look at the line of code it's complaining about I can see absolutely nothing wrong with it: ... 664 static void GEMMStore_64fc( const Complexd* c_data, size_t c_step, 665 const Complexd* d_buf, size_t d_buf_step, 666 Complexd* d_data, size_t d_step, Size d_size, 667 double alpha, double beta, int flags ) 668 { 669 GEMMStore(c_data, c_step, d_buf, d_buf_step, d_data, d_step, d_size, alpha, beta, flags); 670 } 671 672 673 void gemm( const Mat& _A, const Mat& _B double alpha, 674 const Mat& _C, double beta, Mat& D, int flags ) 675 { 676 const int block_lin_size = 128; 677 const int block_size = block_lin_size * block_lin_size; 678 679 static double zero[] = {0,0,0,0}; 680 static float zerof[] = {0,0,0,0}; ... What could possibly be causing this error?? Environment configuration ================= SunOS ignatius 5.10 Generic_142900-03 sun4u sparc SUNW,Sun-Fire-V440 GCC 4.4.3 GNU Make 3.80 LD_OPTIONS=-R/usr/local/lib/ -R/usr/local/lib LD_LIBRARY_PATH=/usr/local/lib:/usr/sfw/lib:/usr/ccs/lib PATH=/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/bin cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=OFF -D PYTHON_LIBRARY=/usr/local/lib /tmp/OpenCV-2.0.0 I'd really appreciate any help anyone can give, even if it's just to say it's not a gcc bug! Many Thanks, Nick This email was independently scanned for viruses by McAfee anti-virus software and none were found