[Python-Dev] py2.4 and gcc4
Hye-Shik Chang
hyeshik at gmail.com
Tue Nov 23 18:26:12 CET 2004
On Wed, 24 Nov 2004 00:19:53 +1100, Anthony Baxter
<anthony at interlink.com.au> wrote:
> Fedora rawhide now ships with a gcc4 preview package - I thought I'd build
> current-cvs with it.
>
> Readline fails to build with
> gcc4 -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC
> -fno-strict-aliasing -I. -I/home/anthony/src/py/pyhead/dist/src/./Include
> -I/usr/local/include -I/home/anthony/src/py/pyhead/dist/src/Include
> -I/home/anthony/src/py/pyhead/dist/src
> -c /home/anthony/src/py/pyhead/dist/src/Modules/readline.c -o
> build/temp.linux-i686-2.4/readline.o
> /home/anthony/src/py/pyhead/dist/src/Modules/readline.c:97: error: static
> declaration of 'history_length' follows non-static declaration
> /usr/include/readline/history.h:224: error: previous declaration of
> 'history_length' was here
history_length is exported by readline and our readline module has
another history_length for its interal static variable. I could
build readline module by renaming the variable.
> test_cfgparser causes a segfault, unfortunately. Since this doesn't
> occur with any other compilers that I know of (*) I'm inclined to
> blame gcc4, and not bother too much with it further. I'm pretty
> short of time, but if someone wants to spend time figuring out
> why, let me know and I'll dump a SF bugreport with the stack
> trace &c...
Seemingly, wrong optimization of gcc4. I was struck by another
segfaults from Objects/stringobject.c:1028 and etc. But I could
avoid segfaults by disturbing optimizations with some debug outputs.
And even full regression test is passed when I built it with -O0.
No worry. :)
Hye-Shik
More information about the Python-Dev
mailing list