Failed to compile 3.4.1 on red hat 6.9 [closed]

asked 2018-05-22 02:30:42 -0600

updated 2018-05-22 03:07:51 -0600

berak gravatar image

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 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-18 04:47:32.767906

Comments

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 ?

tomoaki0705 gravatar imagetomoaki0705 ( 2018-05-22 02:41:36 -0600 )edit
1

I've put the cmake output here https://gist.github.com/jiangyurong60...

jiangyurong609 gravatar imagejiangyurong609 ( 2018-05-22 03:02:06 -0600 )edit

please use the 10101 button, to format it, not the " one.

/usr/bin/c++ (ver 4.4.7)

this looks quite old. can you try to update it ?

berak gravatar imageberak ( 2018-05-22 03:07:03 -0600 )edit

sorry, it's our server machine, I can't update the version

jiangyurong609 gravatar imagejiangyurong609 ( 2018-05-22 03:10:16 -0600 )edit

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)

berak gravatar imageberak ( 2018-05-22 03:13:55 -0600 )edit