Bug 588154 - Building plt-scheme 4.2.5 from source results in "internal compiler error: in loc_cmp..."
Summary: Building plt-scheme 4.2.5 from source results in "internal compiler error: in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 13
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-02 21:35 UTC by Gene Snider
Modified: 2010-05-05 07:24 UTC (History)
2 users (show)

Fixed In Version: gcc-4.4.4-2.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-05 07:24:02 UTC
Type: ---


Attachments (Terms of Use)
preprocessed source (6.39 MB, application/octet-stream)
2010-05-02 21:35 UTC, Gene Snider
no flags Details


Links
System ID Priority Status Summary Last Updated
GNU Compiler Collection 43972 None None None Never

Description Gene Snider 2010-05-02 21:35:36 UTC
Created attachment 410861 [details]
preprocessed source

Description of problem:
Unable to build plt-scheme 4.2.5 from source.


Version-Release number of selected component (if applicable):
4.4.3-18.fc13.x86_64


How reproducible:
Easily.


Steps to Reproduce:
1. Download/unpack "Source for unix (X11)" from http://download.plt-scheme.org
2. Install BuildRequires: from Fedora rpm spec file.
3. Configure, then make per plt-scheme README file

  
Actual results:
gcc -I./.. -I../../../mzscheme/src/../include -g -O2 -Wall -pthread -DMZ_USES_SHARED_LIB -c ../../../mzscheme/src/jit.c  -fPIC -DPIC -o .libs/jit.o
../../../mzscheme/src/jit.c: In function 'generate':
../../../mzscheme/src/jit.c:10061: internal compiler error: in loc_cmp, at var-tracking.c:2665
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccQWrdGT.out file, please attach this to your bugreport.
make[6]: *** [jit.lo] Error 1


Expected results:
Successful make.


Additional info:
Preprocessed source is attached.

I'd update to gcc-4.4.4 and try again but the required libtool package didn't build successfully for f13.

Comment 1 Gene Snider 2010-05-02 22:10:42 UTC
I successfully built plt-scheme, this time without using --enable-shared.  The error occurred with:

../configure --enable-gl --enable-xrender --enable-xft --enable-shared

but didn't occur with:

../configure --enable-gl --enable-xrender --enable-xft

Gene

Comment 2 Jakub Jelinek 2010-05-03 16:20:01 UTC
Fixed upstream (GCC 4.6 and 4.5) and on redhat/gcc-4_4-branch too, so when gcc-4.4.4-2.fc13 will be built, this will be fixed there.

Comment 3 Fedora Update System 2010-05-04 09:30:32 UTC
gcc-4.4.4-2.fc13,libtool-2.2.6-20.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/gcc-4.4.4-2.fc13,libtool-2.2.6-20.fc13

Comment 4 Gene Snider 2010-05-04 18:43:09 UTC
I installed the new gcc and libtool:

[gene@Mobile-PC ~]$ yum list gcc libtool
Loaded plugins: fastestmirror, presto, refresh-packagekit, remove-with-leaves, show-leaves, verify
Installed Packages
gcc.x86_64             4.4.4-2.fc13           @/gcc-4.4.4-2.fc13.x86_64     
libtool.x86_64         2.2.6-20.fc13          @/libtool-2.2.6-20.fc13.x86_64

Then used:
"../configure --enable-gl --enable-xrender --enable-xft --enable-shared --prefix=/usr"
in the ~/packages/plt-scheme/plt-4.2.5/src/build directory.  Then I ran make in the same directory and got the following error:

make[4]: Entering directory `/home/gene/packages/plt-scheme/plt-4.2.5/src/build/mzscheme/gc2'
env XFORM_PRECOMP=yes ../mzschemecgc -cqu ../../../mzscheme/gc2/xform.ss --setup . --cpp "gcc -E -I./.. -I../../../mzscheme/gc2/../include -pthread   -DNEWGC_BTC_ACCOUNT  -DMZ_USES_SHARED_LIB "  --keep-lines -o xsrc/precomp.h ../../../mzscheme/gc2/precomp.c
make[4]: *** [xsrc/precomp.h] Segmentation fault (core dumped)

This happened later in the make I think, so one problem seems to have been fixed, but a new one popped up.  Let me know if I can provide more information.

Gene

Comment 5 Gene Snider 2010-05-04 18:52:05 UTC
Oh, I downloaded all the koji gcc and libtool rpms into a directory, then ran "yum --nogpgcheck localupdate *" in that directory.  That updated all my installed gcc packages and libtool with no dependency problems.

Gene

Comment 6 Jakub Jelinek 2010-05-04 18:55:32 UTC
The fix in question was only a debug info generation fix, couldn't affect code generation.  So, if the program segfaults, you need to debug and analyse it.

If you suspect a gcc bug, you could compile with -O0 and see whether you can still reproduce, if not, do a binary search etc.  But it is far more probable it is just a bug in the code you are compiling.

Comment 7 Gene Snider 2010-05-04 19:11:41 UTC
Plt-scheme 4.1.2 has been built in koji, but from the spec file I'd say it was build without shared libs.  I built plt-scheme 4.2.1 successfully not long ago with shared libs, but an older gcc.  I'm running plt-scheme 4.2.5 built without shared libs with no problems, currently.  That segfault is from gcc, not plt-scheme.  I'm unable to build plt-scheme with with the current gcc compiler.

To clarify, gcc is segfaulting, not plt-scheme.

Gene

Comment 8 Jakub Jelinek 2010-05-04 19:18:09 UTC
From the above snippet it isn't obvious what exactly is segfaulting, it is unclear what  mzschemecgc is and what it does.  If it is gcc that is segfaulting, I'll need as usual preprocessed source and command line options that reproduce it.

Comment 9 Gene Snider 2010-05-04 19:43:41 UTC
Actually, it looks like make is segfaulting, but only when plt-scheme is configured to use shared libs.  I successfully built plt-scheme 4.2.5 without shared libs with gcc 4.4.3 and just now with 4.4.4-2.  Here's a longer snippet:

gcc -o .libs/mzschemecgc .libs/main.o -pthread -rdynamic  ./.libs/libmzscheme.so ./.libs/libmzgc.so -ldl -lm  -Wl,--rpath -Wl,/usr/lib
creating mzschemecgc
make[4]: Leaving directory `/home/gene/packages/plt-scheme/plt-4.2.5/src/build/mzscheme'
make[3]: Leaving directory `/home/gene/packages/plt-scheme/plt-4.2.5/src/build/mzscheme'
cd gc2; make all
make[3]: Entering directory `/home/gene/packages/plt-scheme/plt-4.2.5/src/build/mzscheme/gc2'
mkdir xsrc
make xsrc/precomp.h
make[4]: Entering directory `/home/gene/packages/plt-scheme/plt-4.2.5/src/build/mzscheme/gc2'
env XFORM_PRECOMP=yes ../mzschemecgc -cqu ../../../mzscheme/gc2/xform.ss --setup . --cpp "gcc -E -I./.. -I../../../mzscheme/gc2/../include -pthread   -DNEWGC_BTC_ACCOUNT  -DMZ_USES_SHARED_LIB "  --keep-lines -o xsrc/precomp.h ../../../mzscheme/gc2/precomp.c
make[4]: *** [xsrc/precomp.h] Segmentation fault (core dumped)
make[4]: Leaving directory `/home/gene/packages/plt-scheme/plt-4.2.5/src/build/mzscheme/gc2'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/gene/packages/plt-scheme/plt-4.2.5/src/build/mzscheme/gc2'
make[2]: *** [3m] Error 2
make[2]: Leaving directory `/home/gene/packages/plt-scheme/plt-4.2.5/src/build/mzscheme'
make[1]: *** [3m] Error 2
make[1]: Leaving directory `/home/gene/packages/plt-scheme/plt-4.2.5/src/build'
make: *** [all] Error 2

It looks like the last call to gcc was successful, but make itself segfaulted.  If that looks right to you, maybe I should file a bug against make?

Thanks,
Gene

Comment 10 Jakub Jelinek 2010-05-04 19:54:59 UTC
Why do you think it is make that segfaults here?
You can ulimit -c unlimited and see using gdb which program generated the core file, or you could run the whole make under strace -f -o /tmp/log.strace
and see what segfaulted.

Comment 11 Gene Snider 2010-05-04 20:35:11 UTC
You're right, the segfault is in mzschemecgc when shared libs are enabled.  That's a problem for the PLT Scheme community.

Gene

Comment 12 Fedora Update System 2010-05-04 23:52:25 UTC
gcc-4.4.4-2.fc13, libtool-2.2.6-20.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gcc libtool'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/gcc-4.4.4-2.fc13,libtool-2.2.6-20.fc13

Comment 13 Fedora Update System 2010-05-05 07:23:54 UTC
gcc-4.4.4-2.fc13, libtool-2.2.6-20.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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