How do I get Perl to compile on Solaris?


    John Lees <lees@pixel.cps.msu.edu> reports:

    I have built perl on Solaris 2.1, 2.2 beta, and 2.2 FCS. Take /usr/ucb
    out of your path and do not use any BSD/UCB libraries.  Only -lsocket,
    -lnsl, and -lm are needed. You can use the hint for Solaris 2.0, but
    the one for 2.1 is wrong. Do not use vfork. Do not use
    -I/usr/ucbinclude.  The result works fine for me, but of couse does
    not support a couple of BSDism's.

    Casper H.S. Dik <casper@fwi.uva.nl> reports

    You must remove all the references to /usr/ucblib AND
    /usr/ucbinclude.  And ignore the Solaris_2.1 hints. They are wrong.
    The undefining of vfork() probably ahs to do with the confusion it
    gives to the compilers.  If you use cc, you mustn't compile
    util.c/tutil.c  with -O.  I only used the following libs: -lsocket
    -lnsl -lm (there is a problem with -lmalloc)

    Michael D'Errico <mike@software.com> reports:

    If you are using Solaris 2.x, the signal handling is broken.  If you set
    up a signal handler such as 'ripper' it will be forgotten after the first
    time the signal is caught.  To fix this, you need to recompile Perl.  Just
    add '#define signal(x,y) sigset((x),(y))' after the '#include <signal.h>'
    directive in each file that it occurs, then make it again.