baku has asked for the wisdom of the Perl Monks concerning the following question:

I'm pulling out hair, here...

Configure runs cleanly; specified the install directory, otherwise left most everything at defaults for HPUX 11, but (after initial problems) made sure that shared libraries, libperl, multithread, and multiplicity are all "off."

I'm stuck using the HPUX cc, ar, ln, et al. but they seem to work for most things.

The make process runs "just fine" (at least, no visible errors) through miniperl, which I can get to run some simple Perl programs, so it must be linked OK. (Simple, like print "Hello, world\n";.) The next stage causes a segfault in make. Every time. (No backtrace, because HPUX make has no symbols.)

The end of the make reads:

... rm -f opmini.c cc -Wl,+vnocompatwarnings -L/usr/local/lib -o miniperl \ miniperlmain.o opmini.o libperl.a -lnsl -lnm -lndbm -ldld -lm -lc +-lndir -lc rypt -lsec ./miniperl -w -Ilib -MExporter -e '<?>' || make minitest Segmentation fault (core dumped)

Again, that's make dumping core.

ğmake minitest You may see some irrelevant test failures if you have been unable to build lib/Config.pm. cd t && (rm -f perl; /home/bpocock/opt/bin/ln -s ../miniperl perl) \ && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma +/*.t </dev /tty base/cond............ok base/if..............ok base/lex.............ok base/pat.............ok base/rs..............ok base/term............Can't locate Config.pm in @INC (@INC contains: .. +/lib /usr/ local/apps/perltest/install/lib/5.6.0/PA-RISC2.0-multi-64all /usr/loca +l/apps/per ltest/install/lib/5.6.0 /usr/local/apps/perltest/install/lib/site_perl +/5.6.0/PA- RISC2.0-multi-64all /usr/local/apps/perltest/install/lib/site_perl/5.6 +.0 /usr/lo cal/apps/perltest/install/lib/site_perl .) at base/term.t line 10. BEGIN failed--compilation aborted at base/term.t line 10. FAILED at test 0 Failed a basic test--cannot continue. make: [minitest] Error 2 (ignored)

Seeing that, I also tried:

ğmake lib/Config.pm make: *** [lib/Config.pm] Segmentation fault (core dumped)

I peeked in, and found that ./configpm is used to make lib/Config.pm, and one of the first things it does is write some static text out to the newly-created file... which, of course, is 0 bytes, so something must be killing it really early on.

Worst is, they've already installed Perl-5.6.0 on the "twin" HPUX box here and it went in "just fine" (as far as anyone can remember, at least.

Suggestions other than castrating the HPUX sales team are sorely needed! In the mean time, I'll keep thwocking this with a hot fork and try some more voodoo...

Replies are listed 'Best First'.
Re: Perl 5.6.0 on HPUX/11 won't compile
by kschwab (Vicar) on Feb 08, 2001 at 23:55 UTC
    Since make is coredumping, the quick & dirty suggestion is to try Gnu Make.

    If that's not an option, I'd compare patch levels between the make that works and the one that doesn't. ( try "what /usr/bin/make" on the two machines).

      :-/ I actually tried to use gcc, gnu make, et al., but I get the following insanity:

      I've tried to compile and run the following simple program: #include <stdio.h> int main() { printf("Ok\n"); exit(0); } I used the command: gcc -O -D_HPUX_SOURCE -Aa -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fn +o-strict-a liasing -I/usr/local/include -o try -L/usr/local/lib try.c -lnsl -lnm +-lndbm -lm alloc -ldld -lm -lc -lndir -lcrypt -lsec ./try and I got the following output: *Initialization*:1: missing token-sequence in `#assert' I can't compile the test program. (The supplied flags or libraries might be incorrect.) You have a BIG problem. Shall I abort Configure [y] Ok. Stopping Configure.

      The make versions on the two machines appear identical, same for cc et al.; possible that more serious magic was required to compile on the other box, but no one seems to be able to find who did that build.

      Addition:

      GNU gdb does give a backtrace where the default debugger would not. tye was right (in CB): it's miniperl dying:

      (gdb) bt #0 0x2af1c in Perl_malloc () from /usr/perltest/build/perl-5.6.0/./mi +niperl #1 0x9848c in Perl_pregcomp () from /usr/perltest/build/perl-5.6.0/./ +miniperl #2 0x1aa38 in Perl_pmruntime () from /usr/perltest/build/perl-5.6.0/. +/miniperl #3 0x93c24 in ?? () from /usr/perltest/build/perl-5.6.0/./miniperl #4 0x2618c in ?? () from /usr/perltest/build/perl-5.6.0/./miniperl #5 0x255bc in perl_parse () from /usr/perltest/build/perl-5.6.0/./min +iperl #6 0x1492c in main () from /usr/perltest/build/perl-5.6.0/./miniperl

      So, I'll try building without perl's malloc and see if that helps.


      More amends...

      (gdb) bt #0 0xc0180598 in _sigfillset () from /usr/lib/libc.2 #1 0xc017e048 in _memset () from /usr/lib/libc.2 #2 0xc0183750 in malloc () from /usr/lib/libc.2 #3 0x46f80 in Perl_safesysmalloc () from /usr/perltest/build/perl-5.6.0/./miniperl #4 0x1ab74 in Perl_newSVOP () from /usr/perltest/build/perl-5.6.0/./m +iniperl #5 0x31814 in ?? () from /usr/perltest/build/perl-5.6.0/./miniperl #6 0x33000 in Perl_yylex () from /usr/perltest/build/perl-5.6.0/./min +iperl #7 0x908d4 in Perl_yyparse () from /usr/perltest/build/perl-5.6.0/./m +iniperl #8 0x260dc in ?? () from /usr/perltest/build/perl-5.6.0/./miniperl #9 0x25544 in perl_parse () from /usr/perltest/build/perl-5.6.0/./min +iperl #10 0x1490c in main () from /usr/perltest/build/perl-5.6.0/./miniperl

      Perl_malloc doesn't seem to be the problem, then.

        baku writes:
        gcc -O -D_HPUX_SOURCE -Aa
        ... the -Aa option, which the HP-UX cc switches on to turn on ANSI C, doesn't mean the same thing to gcc. From a glance of the man page for gcc, -A is a switch dealing with assertions. You may want to see if you can get rid of "-Aa" and retry compiling.

        --
        Me spell chucker work grate. Need grandma chicken.

Re: Perl 5.6.0 on HPUX/11 won't compile
by baku (Scribe) on Feb 08, 2001 at 23:32 UTC

    Corrections/amendments:

    • The output file for make lib/Config.pm is ./configpm.tmp; that's the 0-byte file. There is no lib/Config.pm as yet.
    • A subsequent make jumps right to configpm, so perhaps the prior error (after miniperl) is unrelated/ignorable... but I'm assuming not and poking into it.