Failed to compile 3.4.1 on red hat 6.9 [closed]
I tried to compile 3.4.1 on my machine with only 3 modules, core, imagecodecs, imageproc. I got a lot of compilation error (trace as following)
opencv-3.4.1/modules/imgproc/src/hal_replacement.hpp:52: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic' [-Wpragmas]
In file included from opencv-3.4.1/modules/imgproc/src/precomp.hpp:54,
from opencv-3.4.1/modules/imgproc/src/resize.cpp:50:
opencv-3.4.1/modules/imgproc/src/hal_replacement.hpp:778: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic' [-Wpragmas]
opencv-3.4.1/modules/imgproc/src/resize.cpp:67: error: reference to 'uint32_t' is ambiguous
/usr/include/stdint.h:52: error: candidates are: typedef unsigned int uint32_t
opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h:491: error: typedef uint32_t cv::uint32_t
opencv-3.4.1/modules/imgproc/src/resize.cpp:67: error: template argument 1 is invalid
opencv-3.4.1/modules/imgproc/src/resize.cpp:68: error: reference to 'int16_t' is ambiguous
/usr/include/stdint.h:38: error: candidates are: typedef short int int16_t
opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h:488: error: typedef int16_t cv::int16_t
opencv-3.4.1/modules/imgproc/src/resize.cpp:68: error: template argument 1 is invalid
opencv-3.4.1/modules/imgproc/src/resize.cpp:69: error: reference to 'uint16_t' is ambiguous
/usr/include/stdint.h:50: error: candidates are: typedef short unsigned int uint16_t
opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h:489: error: typedef uint16_t cv::uint16_t
opencv-3.4.1/modules/imgproc/src/resize.cpp:69: error: template argument 1 is invalid
opencv-3.4.1/modules/imgproc/src/resize.cpp:70: error: reference to 'int8_t' is ambiguous
/usr/include/stdint.h:37: error: candidates are: typedef signed char int8_t
opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h:486: error: typedef int8_t cv::int8_t
opencv-3.4.1/modules/imgproc/src/resize.cpp:70: error: template argument 1 is invalid
opencv-3.4.1/modules/imgproc/src/resize.cpp:71: error: reference to 'uint8_t' is ambiguous
/usr/include/stdint.h:49: error: candidates are: typedef unsigned char uint8_t
opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h:487: error: typedef uint8_t cv::uint8_t
opencv-3.4.1/modules/imgproc/src/resize.cpp:71: error: template argument 1 is invalid
opencv-3.4.1/modules/imgproc/src/resize.cpp:344: error: reference to 'uint8_t' is ambiguous
/usr/include/stdint.h:49: error: candidates are: typedef unsigned char uint8_t
opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h:487: error: typedef uint8_t cv::uint8_t
opencv-3.4.1/modules/imgproc/src/resize.cpp:344: error: parse error in template argument list
opencv-3.4.1/modules/imgproc/src/resize.cpp:344: error: reference to 'uint8_t' is ambiguous
/usr/include/stdint.h:49: error: candidates are: typedef unsigned char uint8_t
opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h:487: error: typedef uint8_t cv::uint8_t
opencv-3.4.1/modules/imgproc/src/resize.cpp:344: error: template-id 'hlineResizeCn<<expression error>, <unnamed>::ufixedpoint16, 2, true, 1>' used ...
It would be very nice if you could paste your entire log on somewhere more easy to read, such as https://pastebin.com/ or https://gist.github.com/ or somewhere similar.
BTW, where is you cmake output ?
I've put the cmake output here https://gist.github.com/jiangyurong60...
please use the
10101
button, to format it, not the"
one.this looks quite old. can you try to update it ?
sorry, it's our server machine, I can't update the version
seems to be a common problem with redhat. not much hope, then.
can you at least try too update opencv to latest master ? (lot's of changes since 3.4.1 release)