build failure - conflicting cv::transform and std::transform (Bug #891)
Description
build of OpenCS on Solaris 11express with the Sun Studio 12u1 compiler fails with the below error.
the attached patch fixes it for me, I assume the intent was to call the std::transform function
...
cd /export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d && /opt/sunstudio12.1/bin/CC -Dopencv_features2d_EXPORTS -DHAVE_CONFIG_H -DCVAPI_EXPORTS -D_REENTRANT -DNDEBUG -D+EXTENSIONS+ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS -DSOLARIS10 -DNO_DEBUG -D_UNICODE -DUNICODE -D_RWSTD_REENTRANT -D_XOPEN_SOURCE=500 -D_XPG5 -I/usr/include/stdcxx4/ansi -I/usr/include/stdcxx4 -I/opt/kde4/include -I/usr/include/stdcxx4/ansi -I/usr/include/stdcxx4 -library=no%Cstd -library=Crun -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic -instances=global -template=geninlinefuncs -s -xdebugformat=dwarf -xlang=c99 -xalias_level=compatible -xustr=ascii_utf16_ushort -Qoption ccfe -features=gcc -Qoption ccfe -features=zla -Qoption ccfe ++boolflag:sunwcch=false -mt -xF=%none -xbuiltin=%all -xinline=%auto -xprefetch=auto -xprefetch_auto_type=indirect_array_access -xprefetch_level=3 -xalias_level=compatible -KPIC -DPIC -xipo=0 -xO3 -xregs=no%frameptr -xjobs=2 -xrestrict=%all -xthreadvar=%all -z combreloc -z redlocsym -z nodefaultlib -z ignore -z now -z rescan -z absexec -xldscope=symbolic -xlibmil -s -xtarget=pentium4 -m32 -xarch=sse2 -xchip=pentium4 -xcache=8/64/4:256/128/8 -lc -lm -ldl -lpthread -lposix4 -lrt -mt -Y P,/opt/kde4/lib -i -L/opt/kde4/lib -R/opt/kde4/lib -L/usr/lib -R/usr/lib -Bdynamic -lstdcxx4 -lCrun -lc -lm -m32 -s -Y P,/opt/kde4/lib -i -L/opt/kde4/lib -R/opt/kde4/lib -L/usr/lib -R/usr/lib -Bdynamic -lstdcxx4 -lCrun -lc -lm -xtarget=pentium4 -m32 -xarch=sse2 -xchip=pentium4 -xcache=8/64/4:256/128/8 -xipo=0 -xO3 -xO3 -DNDEBUG -KPIC -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/. -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0 -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/include -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/include/opencv -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/include -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/../core/include -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/../imgproc/include -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/../calib3d/include -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/../highgui/include -I/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/../flann/include -o CMakeFiles/opencv_features2d.dir/src/matchers.o -c /export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src/matchers.cpp
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/../flann/include/opencv2/flann/allocator.h", line 94: Warning: blocksize hides cvflann::PooledAllocator::blocksize.
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/../flann/include/opencv2/flann/allocator.h", line 124: Warning: blocksize hides cvflann::PooledAllocator::blocksize.
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src/matchers.cpp", line 569: Error: Formal argument src of type const cv::Mat& in call to cv::transform(const cv::Mat&, cv::Mat&, const cv::Mat&) is being passed const cv::Mat*.
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src/matchers.cpp", line 569: Error: Formal argument dst of type cv::Mat& in call to cv::transform(const cv::Mat&, cv::Mat&, const cv::Mat&) is being passed const cv::Mat*.
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src/matchers.cpp", line 570: Error: Formal argument m of type const cv::Mat& in call to cv::transform(const cv::Mat&, cv::Mat&, const cv::Mat&) is being passed cv::Mat*.
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src/matchers.cpp", line 570: Error: Too many arguments in call to "cv::transform(const cv::Mat&, cv::Mat&, const cv::Mat&)".
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src/matchers.cpp", line 634: Error: Formal argument src of type const cv::Mat& in call to cv::transform(const cv::Mat&, cv::Mat&, const cv::Mat&) is being passed const cv::Mat*.
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src/matchers.cpp", line 634: Error: Formal argument dst of type cv::Mat& in call to cv::transform(const cv::Mat&, cv::Mat&, const cv::Mat&) is being passed const cv::Mat*.
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src/matchers.cpp", line 634: Error: Formal argument m of type const cv::Mat& in call to cv::transform(const cv::Mat&, cv::Mat&, const cv::Mat&) is being passed cv::Mat*.
"/export/home/test/packages/BUILD/OpenCV-2.2.0/i386/OpenCV-2.2.0/modules/features2d/src/matchers.cpp", line 634: Error: Too many arguments in call to "cv::transform(const cv::Mat&, cv::Mat&, const cv::Mat&)".
8 Error(s) and 2 Warning(s) detected.
Associated revisions
Merge pull request #891 from NCBee:2.4
History
Updated by Vadim Pisarevsky about 14 years ago
looks like the problem has been fixed in r4470.
- Status changed from Open to Done
- (deleted custom field) set to fixed