Bug 747717 - internal compiler error : Segmentation fault when compiling OpenCV 2.1
Summary: internal compiler error : Segmentation fault when compiling OpenCV 2.1
Keywords:
Status: CLOSED DUPLICATE of bug 735304
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc
Version: 5.7
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-20 20:27 UTC by Milton Lie
Modified: 2011-10-21 13:18 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-21 07:23:00 UTC
Target Upstream Version:


Attachments (Terms of Use)
pre-processed file (198.01 KB, application/x-gzip)
2011-10-20 21:32 UTC, Milton Lie
no flags Details
OpenCV-2.1.0 code (44 bytes, text/plain)
2011-10-20 21:40 UTC, Milton Lie
no flags Details

Description Milton Lie 2011-10-20 20:27:51 UTC
Description of problem: When trying to compile OpenCV 2.1, I get an Internal Compiler Error : Segmentation Fault.


Version-Release number of selected component (if applicable):


How reproducible: Consistent


Steps to Reproduce:
1. Fresh install of CentOS 5.7 x86_64 with developer tools
2. sudo yum install cmake
3. enable [dag] repo (baseurl=http://apt.sw.be/redhat/el#releasever/en/$basearch/dag)
4. enable rpmforge repo
5. sudo yum install ffmpeg ffmpeg-devel
6. untar attached file
7. cd OpenCV-2.1.0/build
8. ./cmake_native.sh
9. make
  
Actual results:  Fails with internal compiler error


Expected results: Should compile cleanly


Additional info: This happened with some recent updates.  Had both CentOS 5.5 and 5.6 installations that used to compile successfully, but with a recent "yum update" it no longer compiles.

Comment 1 Petr Machata 2011-10-20 21:05:30 UTC
Please try again and follow the instructions that gcc gives you for reporting the bug.  In particular, attach the pre-processed source (gcc will tell you where it is when it crashes).

Comment 2 Milton Lie 2011-10-20 21:14:02 UTC
When you untar the attached file, at the top level you will notice a file named cc7oHTXQ.out, which is the pre-processed source.  I wanted to make sure you had the OpenCV 2.1 code as well, so I packaged all in one tar file.  Did not know if I could attach multiple files.

Comment 3 Milton Lie 2011-10-20 21:15:37 UTC
Did the attachment go through?  I saw it getting uploaded.  Let me know.

Comment 4 Milton Lie 2011-10-20 21:22:31 UTC
BTW, this compiles successfully with a fresh CentOS 5.6 installation.
But after "yum update" it no longer compiles.

Comment 5 Jakub Jelinek 2011-10-20 21:28:18 UTC
There are no attachments.  Please attach just the *.out file, perhaps gzipped or bzip2ed if it is big enough.

Comment 6 Milton Lie 2011-10-20 21:32:23 UTC
Created attachment 529390 [details]
pre-processed file

As requested.  The original attachment might have been too big.

Comment 7 Milton Lie 2011-10-20 21:40:02 UTC
Created attachment 529391 [details]
OpenCV-2.1.0 code

Just in case the code is required.

Comment 8 Jakub Jelinek 2011-10-21 01:05:50 UTC
I can't reproduce it with the #c6 testcase,
/usr/libexec/gcc/x86_64-redhat-linux/4.1.2/cc1plus -g -O0 -Wall -Wno-long-long \
-Winvalid-pch -ffunction-sections -fPIC cc7oHTXQ.out
succeeds.
So, can you reproduce the segfault with the above command?
If so, can you install gcc-debuginfo, run
gdb --args /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/cc1plus -g -O0 \
-Wall -Wno-long-long -Winvalid-pch -ffunction-sections -fPIC cc7oHTXQ.out
and post here backtrace?

Comment 9 Milton Lie 2011-10-21 04:35:55 UTC
The above command runs fine for me as well (NO segfault).

Comment 10 Jakub Jelinek 2011-10-21 06:20:00 UTC
Can you reproduce it when you rerun the original command line on the
/home/ivl/svn/3rdparty/OpenCV-2.1.0/src/cxcore/cxlapack.cpp
source?  Given the -Winvalid-pch command line option, are you using PCH?

Comment 11 Jakub Jelinek 2011-10-21 07:20:47 UTC
Actually, it is very much PCH related:
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg00190.html
fixed by:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160185
I'll backport that.

Comment 12 Jakub Jelinek 2011-10-21 07:23:00 UTC

*** This bug has been marked as a duplicate of bug 735304 ***

Comment 13 Milton Lie 2011-10-21 13:18:34 UTC
I have a problem of having this bug marked as a duplicate of bug 735304, which refers to a patch that was released 16+ months ago.

The tools in a baseline CentOS 5.6 install work OK.  When I "yum update" to the latest patches, I can no longer compile the same piece of code.  It might have been shown up before, but that is of no help for me because it got re-introduced some how.

A baseline CentOS 5.7 install (no "yum update") also shows the same error.


Note You need to log in before you can comment on or make changes to this bug.