develooper Front page | perl.perl5.porters | Postings from December 2004

Problems building perl on FreeBSD/amd64 5.2.1, 5.3-STABLE, and 6-CURRENT

Thread Next
From:
Mike Hunter
Date:
December 10, 2004 15:22
Subject:
Problems building perl on FreeBSD/amd64 5.2.1, 5.3-STABLE, and 6-CURRENT
Message ID:
20041210175318.GA11260@ack.Berkeley.EDU
Hi everybody,

I recently made a post to comp.lang.perl.misc regarding some perl build
problems I'm having, and it was suggested I post to this list.  I'm not a
member of the list, so please CC me on replies.

I cannot compile a working perl binary for freebsd 5.2.1, 5.3, or 6.0 on
amd64.  During the `make test` phase it gets into some kind of memory loop
with Config.t:  It sits on this test with 99% cpu and ever-increasing memory
until finally runnnig the machine out of ram.

I notice at the end of the make command that I get the following unmappy news:

Writing Makefile for Errno
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command.  <==
false
*** Error code 1

Stop in /usr/tmp/perl-5.8.6/ext/Errno.
make config failed, continuing anyway...
../../miniperl "-I../../lib" "-I../../lib" "-I../../lib" "-I../../lib" Errno_pm.PL Errno.pm
Skip ../../lib/Errno.pm (unchanged)
*** Error code 1 (ignored)
 
It then beckons me to run make test.  Could that be the problem?  Make test
fails as described above.

I have the incomplete build sitting in /tmp, and I can envoke lib/Config.t
and get it to do it straight away.  kdump (strace on linux) shows it doing
break after break:

 23961 perl     CALL  break(0x1f86000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x2254000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x1f88000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x2258000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x1f8a000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x225c000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x1f8c000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x2260000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x1f8e000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x2264000)
 23961 perl     RET   break 0
 23961 perl     CALL  break(0x1f90000)

I can get a perl -v from the temporary perl but not a perl -V

bash-2.05b# /usr/tmp/perl-5.8.6/perl -v

This is perl, v5.8.6 built for amd64-freebsd

...

bash-2.05b# /usr/tmp/perl-5.8.6/perl -V
Can't locate Config.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.6/amd64-freebsd /usr/local/lib/perl5/5.8.6 /usr/local/lib/perl5/site_perl/5.8.6/amd64-freebsd /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl .).
BEGIN failed--compilation aborted.

Here's some results from hitting the temporary perl with gdb.  Please feel free
to chime in with advice on how to get more out of gdb :)

I'm doing a "set args lib/Config.t" and letting it spin for a while, then
doing ^C.  The first time I did it I got this:

Program received signal SIGINT, Interrupt.
0x0000000800b18655 in memset () from /lib/libc.so.6
(gdb) bt
#0  0x0000000800b18655 in memset () from /lib/libc.so.6
#1  0x0000000800abc47b in _UTF8_wcsnrtombs () from /lib/libc.so.6
#2  0x0000000800abd313 in _UTF8_wcsnrtombs () from /lib/libc.so.6
#3  0x000000000045adf5 in Perl_safesysrealloc ()
#4  0x000000000049019c in Perl_tmps_grow ()
#5  0x000000000047c4a7 in Perl_sv_mortalcopy ()
#6  0x0000000000470a56 in Perl_pp_leavesub ()
#7  0x000000000046a46e in Perl_runops_standard ()
#8  0x000000000041e050 in S_call_body ()
#9  0x000000000041db6f in Perl_call_sv ()
#10 0x000000000041d942 in Perl_call_method ()
#11 0x0000000000462417 in Perl_magic_nextpack ()
#12 0x0000000000467051 in Perl_hv_iternext_flags ()
#13 0x0000000000466f0e in Perl_hv_iternext ()
#14 0x00000000004ad871 in Perl_do_kv ()
#15 0x000000000048cd89 in Perl_pp_keys ()
#16 0x000000000046a46e in Perl_runops_standard ()
#17 0x000000000041d673 in S_run_body ()
#18 0x000000000041d32c in perl_run ()
#19 0x000000000041a45c in main ()
(gdb) quit
The program is running.  Exit anyway? (y or n) y
bash-2.05b# gdb ./perl
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.

The second time I got this:

Program received signal SIGINT, Interrupt.
0x000000000047a2d3 in Perl_sv_free ()
(gdb) bt
#0  0x000000000047a2d3 in Perl_sv_free ()
#1  0x000000000049224e in Perl_leave_scope ()
#2  0x000000000048ffeb in Perl_pop_scope ()
#3  0x0000000000470afc in Perl_pp_leavesub ()
#4  0x000000000046a46e in Perl_runops_standard ()
#5  0x000000000041e050 in S_call_body ()
#6  0x000000000041db6f in Perl_call_sv ()
#7  0x000000000041d942 in Perl_call_method ()
#8  0x0000000000462417 in Perl_magic_nextpack ()
#9  0x0000000000467051 in Perl_hv_iternext_flags ()
#10 0x0000000000466f0e in Perl_hv_iternext ()
#11 0x00000000004ad871 in Perl_do_kv ()
#12 0x000000000048cd89 in Perl_pp_keys ()
#13 0x000000000046a46e in Perl_runops_standard ()
#14 0x000000000041d673 in S_run_body ()
#15 0x000000000041d32c in perl_run ()
#16 0x000000000041a45c in main ()

The third time matches the first time.

I tried perl 5.8.5 from /usr/ports first, but that had the same problem.

Last but not least, I tried -Uusemymalloc but that didn't work either.

It's possible that this has something to do with the machine having 8 gigs
of ram.  There were FBSD problems with this on amd64, but they were supposedly
fixed recently.  Any help would be greatly appreciated.

Sorry, by the English,

Mike

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About