This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Compiler error when trying to compile ceval.c on OpenSUSE 11.3
Type: Stage: resolved
Components: Build, Interpreter Core Versions: Python 3.4
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: jcea, lemburg, vstinner
Priority: normal Keywords:

Created on 2012-11-22 08:49 by lemburg, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg176101 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2012-11-22 08:49
When trying to compile the hg checkout (2012-11-22), I'm getting a compiler error from GCC when trying to compile ceval.c on OpenSUSE 11.3 x64:

gcc -pthread -c -Wno-unused-result -DNDEBUG -g -O3 -Wall -Wstrict-prototypes     -I. -IInclude -I./Include    -DPy_BUILD_CORE -o Python/ceval.o Python/ceval.c
Python/ceval.c: In function PyEval_EvalFrameEx:
Python/ceval.c:3168:1: internal compiler error: in save_call_clobbered_regs, at caller-save.c:911
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.
make: *** [Python/ceval.o] Error 1

Here's the gcc version info:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.5/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.5 --enable-linux-futex --without-system-libunwind --enable-gold --with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux)

Interestingly, this error does not happen when compiling the 3.3.0 release version.

It looks similar to these two bugs that are related to some optimization bug in GCC:

 * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45259 (I can't reproduce this one)
 * https://bugzilla.redhat.com/show_bug.cgi?id=622060 (This was detected in Fedora for Python 3.1.2)

I guess you could say that the compiler is broken, but I still think that Python's configure script should detect this and then disable --with-computed-gotos.
msg176180 - (view) Author: Jesús Cea Avión (jcea) * (Python committer) Date: 2012-11-23 16:02
Could you possibly locate the problematic changeset? Could be doable by bisection.
msg176181 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2012-11-23 16:24
On 23.11.2012 17:02, Jesús Cea Avión wrote:
> 
> Could you possibly locate the problematic changeset? Could be doable by bisection.

I'll try to find the changeset. There were only 4 checkins
related to ceval.c since the 3.3.0 release, so one of those
will have to have triggered the problem.
msg176182 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2012-11-23 16:48
On 23.11.2012 17:24, M.-A. Lemburg wrote:
> On 23.11.2012 17:02, Jesús Cea Avión wrote:
>>
>> Could you possibly locate the problematic changeset? Could be doable by bisection.
> 
> I'll try to find the changeset. There were only 4 checkins
> related to ceval.c since the 3.3.0 release, so one of those
> will have to have triggered the problem.

This changeset triggered the problem:

changeset:   79693:ac30a1b1cf17
user:        Benjamin Peterson <benjamin@python.org>
date:        Fri Oct 12 11:34:51 2012 -0400
summary:     ceval cleanup

It's fairly large (http://hg.python.org/cpython/rev/ac30a1b1cf17),
so I can't easily tell which part might be worth looking at more
closely.

I do notice that the logic for error handling was changed from
doing a "break" to doing a "goto error".
msg220509 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2014-06-13 22:57
FWIW: This still happens with the Python 3.4.1 release version.

Here's a similar error report for Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=622060

They patched the compiler, so I guess I'll have to find a more recent gcc for the build box.
msg361852 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-02-12 01:20
That's a GCC bug which has likely been fixed since 2014.
History
Date User Action Args
2022-04-11 14:57:38adminsetgithub: 60733
2020-02-12 01:20:43vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg361852

resolution: third party
stage: resolved
2014-06-13 22:57:19lemburgsetmessages: + msg220509
2012-11-23 16:48:23lemburgsetmessages: + msg176182
2012-11-23 16:24:33lemburgsetmessages: + msg176181
2012-11-23 16:02:38jceasetnosy: + jcea
messages: + msg176180
2012-11-22 08:49:44lemburgcreate