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

root@Octopussy:/tmp/perl/MIME-tools-5.411# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for MIME-tools root@Octopussy:/tmp/perl/MIME-tools-5.411# make test make: *** [pm_to_blib] Segmentation fault
I get this segmentation fault when I try to build this and some other modules. I am using Kernel 2.4.13, Slackware Linux 7.1 on i686.

Edit kudra, 2001-12-22 Added markup

Replies are listed 'Best First'.
Re: Segfault when trying to make a module
by tachyon (Chancellor) on Dec 22, 2001 at 22:40 UTC

    If this is your raw output then the problem is that you are trying to make test before you have run make You need to run make to generate the blib that the tests run by make test uses. The blib is the build library which is a temporary file system that is used to install your module for testing prior to installation. Anyway do this:

    $ perl Makefile.PL $ make $ make test $ make install

    I expect this should work fine. Please report back if not and I will then suggest shutting down other running processes before you do the install.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      I wouldn't think that failing to run 'make' prior to 'make test' would be the problem (make checks and builds target dependencies after all). Even the install docs for this module just say: 'perl Makefile.PL' then 'make test' then 'make install'. And, in the spirit of empiricism (and to attempt to reproduce the problem), I just grabbed a clean version of MIME-tools-5.411a.tar.gz, unpacked it, ran 'perl Makefile.PL' followed by 'make test' and everything worked just fine. (on slackware linux with perl 5.6.1).

      You say you hit this segfault with *some* other modules too. Can you detect any commonalities with the ones that segfault at this particular target versus ones that don't? Being unable to reproduce the problem I can only guess that: a) your perl installation/configuration is borked, b) you are hitting some kind of limit (memory, processes, or command line length (pm_to_blib can produce lengthy command lines, but that's not usually a problem on unix and I believe ExtUtils:: already works around that on Win32), c) your 'make' program is borked, d) something else entirely.

        Hmm I get the same results as you on Redhat 7.1 with Perl 5.6.1 so that's 4 chars and an enter I will not be bothering with in the future. Your other suggestions are all good. Moral - test first, speak later....

        cheers

        tachyon

        s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Re: Segfault when trying to make a module
by doc (Scribe) on Dec 22, 2001 at 22:55 UTC

    You have forgotten to run make before you try to run make test

    root@Octopussy# perl Makefile.PL root@Octopussy# make root@Octopussy# make test root@Octopussy# make install

    doc

      For most CPAN modules 'make' can be omited before 'make test' or 'make install'. Makefiles should handle correctly such dependencies.

      Anyway wrong order should not cause segfault. Build error maybe but not segfault.

      --
      Ilya Martynov (http://martynov.org/)