Discussion:
[perl #61242] [FTBFS] build fails with --optimize on 64bit linux
(too old to reply)
Moritz Lenz
2008-12-09 23:43:59 UTC
Permalink
# New Ticket Created by Moritz Lenz
# Please include the string: [perl #61242]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61242 >


After a 'make realclean' I ran 'perl Configure --optimize && make'. It
dies like this:

../../parrot -o PGE.pbc --output-pbc PGE.pir
../../parrot ../../runtime/parrot/library/PGE/Perl6Grammar.pir
--output=PGE/bui
ltins_gen.pir PGE/builtins.pg
FixedIntegerArray: Can't resize!
current instr.: 'parrot;P6metaclass;new_class' pc 95
(runtime/parrot/library/P6o
bject.pir:126)
make[1]: *** [PGE.pbc] Error 1
make[1]: Leaving directory `/home/moritz/src/parrot/compilers/pge'
make: *** [compilers.dummy] Error 2


This is the output from Configure.pl:
Parrot Version 0.8.1 Configure 2.0
Copyright (C) 2001-2008, The Perl Foundation.

Hello, I'm Configure. My job is to poke and prod your system to figure out
how to build Parrot. The process is completely automated, unless you
passed in
the `--ask' flag on the command line, in which case I'll prompt you for
a few
pieces of info.

Since you're running this program, you obviously have Perl 5--I'll be
pulling
some defaults from its configuration.

init::manifest - Check
MANIFEST.....................................done.
init::defaults - Set Configure's default
values.....................done.
init::install - Set up installation
paths..........................done.
init::hints - Load platform and local hints
files................done.
init::headers - Find header files distributed with
Parrot..........done.
inter::progs - Determine what C compiler and linker to
use........done.
inter::make - Is make
installed...................................yes.
inter::lex - Is lex
installed................................skipped.
inter::yacc - Is yacc
installed...............................skipped.
auto::gcc - Is your C compiler actually
gcc.....................yes.
auto::glibc - Is GNU libc
installed...............................yes.
auto::backtrace - Does libc have the backtrace*
functions.............yes.
auto::fink - Determine Fink location on
Darwin...............skipped.
auto::macports - Determine Macports location on
Darwin...........skipped.
auto::msvc - Is your C compiler actually Visual
C++...............no.
auto::attributes - Detect compiler
attributes.........................done.
auto::warnings - Detect supported compiler warnings..........set
for gcc.
init::optimize - Enable
optimization.................................yes.
inter::shlibs - Determine flags for building shared
libraries.....-fPIC.
inter::libparrot - Should parrot link against a shared
library.........yes.
inter::charset - Which charset files should be compiled
in..........done.
inter::encoding - Which encoding files should be compiled
in.........done.
inter::types - What types should Parrot
use.......................done.
auto::ops - Which opcode files should be compiled
in...........done.
auto::pmc - Which pmc files should be compiled
in..............done.
auto::alignptrs - Determine your minimum pointer alignment........ 1
byte.
auto::headers - Probe for C
headers................................done.
auto::sizes - Determine some
sizes...............................done.
auto::byteorder - Compute native byteorder for
wordsize.....little-endian.
auto::va_ptr - Test the type of
va_ptr........................register.
auto::format - What formats should be used for
sprintf............done.
auto::isreg - Does your C library have a working
S_ISREG..........yes.
auto::arch - Determine CPU architecture and
OS..................done.
auto::jit - Determine JIT
capability.............................no.
auto::cpu - Generate CPU specific
stuff........................done.
auto::funcptr - Does compiler support function pointer
casts.......done.
auto::cgoto - Does your compiler support computed
goto............yes.
auto::inline - Does your compiler support
inline...................yes.
auto::gc - Determine allocator to
use.........................done.
auto::memalign - Does your C library support
memalign................yes.
auto::signal - Determine some signal
stuff........................done.
auto::socklen_t - Determine whether there is
socklen_t................yes.
auto::env - Does your C library have setenv /
unsetenv.........both.
auto::aio - Does your platform support
AIO......................yes.
auto::gmp - Does your platform support
GMP.......................no.
auto::readline - Does your platform support
readline..................no.
auto::gdbm - Does your platform support
gdbm......................no.
auto::pcre - Does your platform support
pcre......................no.
auto::opengl - Does your platform support
OpenGL....................no.
auto::crypto - Does your platform support
crypto....................no.
auto::gettext - Does your configuration include
gettext.............yes.
auto::snprintf - Test
snprintf......................................done.
auto::perldoc - Is perldoc
installed.................................no.
auto::ctags - Is (exuberant) ctags
installed.......................no.
auto::revision - Determine Parrot's
revision......................r33733.
auto::icu - Is ICU installed..........................no
icu-config.
gen::config_h - Generate C
headers.................................done.
gen::core_pmcs - Generate core pmc
list.............................done.
gen::crypto - Generate Digest PMC
files.......................skipped.
gen::parrot_include - Generate
runtime/parrot/include....................done.
gen::opengl - Generating OpenGL
bindings......................skipped.
gen::call_list - Generate NCI signature
list........................done.
gen::languages - Configure
languages................................done.
gen::makefiles - Generate makefiles and other build files...
No Perldoc, not generating a docs makefile.
........done.
gen::platform - Move platform files into
place.....................done.
gen::config_pm - Record configuration data for later
retrieval......done.
Okay, we're done!

You can now use `make' to build your Parrot.
After that, you can use `make test' to run the test suite.

Happy Hacking,
The Parrot Team


This is a 64bit Debian Lenny install with gcc 4.3.2. Building without
--optimize is no problem.
Nicholas Clark
2008-12-11 16:14:00 UTC
Permalink
Post by Moritz Lenz
After a 'make realclean' I ran 'perl Configure --optimize && make'. It
../../parrot -o PGE.pbc --output-pbc PGE.pir
../../parrot ../../runtime/parrot/library/PGE/Perl6Grammar.pir
--output=PGE/bui
ltins_gen.pir PGE/builtins.pg
FixedIntegerArray: Can't resize!
current instr.: 'parrot;P6metaclass;new_class' pc 95
(runtime/parrot/library/P6o
bject.pir:126)
make[1]: *** [PGE.pbc] Error 1
make[1]: Leaving directory `/home/moritz/src/parrot/compilers/pge'
make: *** [compilers.dummy] Error 2
This is a 64bit Debian Lenny install with gcc 4.3.2. Building without
--optimize is no problem.
I believe that Parrot will continue to have obscure problems such as this,
much as Perl 5 used to do, until it implements the equivalent of

http://public.activestate.com/cgi-bin/perlbrowse/p/33291

and fixes the problems that it shows up.

(Yes, it's big. Search for the section starting
==== //depot/perl/embed.pl#366 (xtext) ====
for the Perl code that generates the assertion macros from embed.fnc. This
is the equivalent to Parrot's headerizer)


Summary - I infer that some "not null" annotations in Parrot are not correct.

Perl 5's experience was that these are like landmines, and lay dormant until
someone tries with a newer compiler, that happens to add a bit more
optimisation. Of course, this can happen months after you release code, code
that "works" and is thought to be stable. IIRC we had 3 separate end user bugs
found with this as the cause, before I realised that we were never going to
find them by hand, so made the above changes to make the compiler find them.

What you don't see in *that* change was the half dozen or so that it found
and I fixed, that I committed before I was able to add that. See here:
http://public.activestate.com/cgi-bin/perlbrowse?top=33291&show_recent=Show+Change+Log


Nicholas Clark

Loading...