Problems with compiled perl modules

From: David Foster (foster@dim.ucsd.edu)
Date: Thu Apr 17 2003 - 16:27:16 EDT


Perl: 5.8.0 (32-bit binary from www.sunfreeware.com)
Gcc: 3.2.1

When I try to use a compiled module:

        #!/usr/local/bin/perl
        use Date::Calc qw(Delta_Days);

I get a segmentation fault, truss gives:

open("/usr/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/Date/Calc/Calc.so",
O_RDON
LY) = 4
fstat(4, 0xFFBEDCEC) = 0
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0xFF360000
mmap(0x00000000, 155648, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0xFF110000
mmap(0xFF134000, 6488, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4,
81920)
 = 0xFF134000
munmap(0xFF126000, 57344) = 0
memcntl(0xFF110000, 13904, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(4) = 0
mprotect(0xFF110000, 85893, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0xFF110000, 85893, PROT_READ|PROT_EXEC) = 0
munmap(0xFF360000, 8192) = 0
    Incurred fault #6, FLTBOUNDS %pc = 0xFF120708
      siginfo: SIGSEGV SEGV_MAPERR addr=0xFF10FFFC
    Received signal #11, SIGSEGV [default]
      siginfo: SIGSEGV SEGV_MAPERR addr=0xFF10FFFC
        *** process killed ***

Module was compiled using "-mcpu=v7 -m32" gcc flags to compile 32-bit,
since my perl is 32-bit. (If I compile it 64-bit I get the ELFCLASS64
error.) I've also tried compiling 32-bit using gcc 2.95.3 as I'm
painfully aware how broken gcc 3.x+ is, same results. Is this just
a broken perl?

Sorry for posting a perl issue, didn't get much help from those lists
and I REALLY need to get this resolved soon.

Dave Foster

  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   David Foster National Center for Microscopy and Imaging Research
    Programmer/Analyst University of California, San Diego
    dfoster[at]ucsd[dot]edu Department of Neuroscience, Mail 0608
    (858) 534-7968 http://ncmir.ucsd.edu/
  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

   "The reasonable man adapts himself to the world; the unreasonable one
   persists in trying to adapt the world to himself. Therefore, all progress
   depends on the unreasonable." -- George Bernard Shaw
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:26:13 EDT