Compiler error on alpine linux with 3.0.0-beta and master branch. (Bug #4368)


Added by Bodo Kaiser almost 10 years ago. Updated over 9 years ago.


Status:New Start date:2015-05-29
Priority:Normal Due date:
Assignee:Bodo Kaiser % Done:

0%

Category:build/install
Target version:3.1
Affected version:branch 'master' (3.0-dev) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

Hello,

I tried to compile the latest version of opencv in an alpine linux docker container.

IMDInterpolator>::operator()(const cv::Range&) const [with T = short unsigned int; SIMDInterpolator = cv::SIMDBayerStubInterpolator_<short unsigned int>]':
/srv/opencv/modules/imgproc/src/demosaicing.cpp:673:18: internal compiler error: in vect_analyze_data_ref_accesses, at tree-vect-data-refs.c:2567
virtual void operator() (const Range& range) const
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Preprocessed source stored into /tmp/ccADdKPJ.out file, please attach this to your bugreport.
modules/imgproc/CMakeFiles/opencv_imgproc.dir/build.make:1038: recipe for target 'modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/demosaicing.cpp.o' failed
make2: * [modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/demosaicing.cpp.o] Error 1
CMakeFiles/Makefile2:1711: recipe for target 'modules/imgproc/CMakeFiles/opencv_imgproc.dir/all' failed
make1:
[modules/imgproc/CMakeFiles/opencv_imgproc.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
make: *
* [all] Error 2


opencv.out - output suggested in the compiler error (1.6 MB) Bodo Kaiser, 2015-05-29 10:31 am

cmake.out - output of cmake command (10.3 kB) Bodo Kaiser, 2015-05-29 10:31 am


History

Updated by Bodo Kaiser almost 10 years ago

I now replaced gcc with clang on the Dockerfile:

RUN apk add -U clang

ENV CC /usr/local/clang
ENV CXX /usr/local/clang++

and it now compiles without problems. So I expect that there is either a bug in GCC 4.9 or there are some features used in OpenCV which are not quite supported in that GCC version.

Updated by Deepak Kumar over 9 years ago

I faced the same issue. I added compiler clang as suggested by you.

However, now I am getting error related to PTHREADs. If I forcibly stop PTHREAD being built, I get errors related to <linux/auxvec.h> and then several others.

My current Docker file is:

FROM alpine:3.2

RUN apk add --update gcc g++ clang make cmake

RUN apk add wget tiff-dev libpng-dev jasper-dev libwebp-dev

ENV CC /usr/bin/clang
ENV CXX /usr/bin/clang++

COPY opencv-3.0.0.zip /tmp/

WORKDIR /tmp/

RUN unzip opencv-3.0.0.zip

RUN mkdir /tmp/build/

WORKDIR /tmp/build/


To build I am running the following:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_FFMPEG=NO \
-D WITH_IPP=NO -D WITH_OPENEXR=NO /tmp/opencv-3.0.0

make

  • Assignee changed from Roman Donchenko to Bodo Kaiser

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/5004

Also available in: Atom PDF