SUMMARY: perl and solaris 2.3

From: John Hammersmith (
Date: Thu Sep 01 1994 - 13:43:33 CDT

Dear Sun Managers,

My original questions were:-
> I am trying to compile perl-4.036 on a sun sparc 10/40. It compiles OK
> but when I run the test procedures after it came back with:
> cd t && (rm -f perl; ln -s ../perl perl) && ./perl TEST </dev/tty
> ./perl: fatal: can't open file: errno=2
> Then I added to the LD_LIBRARY_PATH and it got a bit further
> before segmenting...
> Anyway it looks to me as though it is trying to compile perl with the old
> sun compatibility mode? I would have thought I could compile perl without
> that.
> My 2 questions are:-
> 1. Can anyone tell me what I need to do to compile perl under solaris 2.3?
> 2. Some general info on when the sun compiler will generate the old
> compatibilty mode code.

I got a large response from both those who wanted an answer and actual suggestions.
For those who have compiled perl before and other gnu stuff will know about the "Configure" script which makes an attempt to build a makefile suitable for the particulat machine.
In the case of perl it uses "hints" files to help this process along. I have made a new hints file for solaris 2.3 that works on my system. (As defined by "passes all the post compilation tests"). This will produce a version of perl that does not need the ucblib compatibilty.
PS. My system is a sun 10/40 with 64 MB ram, 160 MB swap and the unbundled sun C compiler as the first cc in the path.

1. get perl-4.036 and untar it
2. cut the following and save it as file called "" in the "hints" directory of the perl distribution.

cut here vvvvvv
cppflags=' -DCRIPPLED_CC'
libswanted='resolv socket nsl m c '
end of cut ^^^^^^

Some explanations of the above:
-DCRIPPLED was neccessary to get some files compiled on my system
(t)toke_cflags='optimize=""' turns off optimisation for compilation of these files which was neccessary on my system.
The last few lines are personal preference for the installation of files after compilation.

3. run Configure and select just solaris_2_3 when you get prompted for a hints file
4. follow the rest of the perl install instructions

Thanks to (Brett Lymn)
Pedro Roque Marques <>
Todd Kover <kovert@cs.UMD.EDU> (Sean Ward)
Nino Margetic <>
David Lee <>
Pete Hartman <> (Mike Freeman) (Gavin Maltby)
mealmei@kn.PacBell.COM (Mark E. Almeida)
Mark.McIntosh@sirius.UVic.CA (Scott Sherrill)

Finally, I was sent some "" files (the result of running Configure) but I won't include them here because would take a lot of space. If anyone wants them I can mail them though. Hopefully the hints file I made up from this info will do the trick.
However there was much other suggestions such as grab the binaries and reporting of another bug with signals that I will present.
Also, as was pointed out to me, comp.lang.perl is the approriate venue and has a lot of discussion on this topic.


----- Begin Included Message -----

>From Wed Aug 31 01:54 CST 1994
From: Nino Margetic <>
Date: Tue, 30 Aug 1994 17:23:27 +0100
To: John Hammersmith <>
Subject: Re: perl and solaris 2.3
Mime-Version: 1.0


The easiest is just to pick up the ready-made binary from:
/pub/GNU. You will also find some other usefull precompiled things there.
Hope this helps.



>From Wed Aug 31 02:51 CST 1994
To: John Hammersmith <>
Subject: Re: perl and solaris 2.3
Date: Tue, 30 Aug 94 18:20:09 +0100


In general these kind of things do happen when trying to use
the "Source Compatibility" libraries in /usr/ucbinclude. As
soon as I saw that the perl "port" to Solaris 2.1 was using
those, I gave up immediately.

I instead went for an alpha release version of Perl 5.0 which
used the SunPRO compiler directly and purported to have Solaris
2.3 configuration knowledge. So far we've not seen any problems
with it running our existing perl scripts.

Regards, Bevis.

>From Wed Aug 31 18:21 CST 1994
Date: Wed, 31 Aug 1994 09:46:31 +0000
From: (Mike Freeman)
Subject: Re: perl and solaris 2.3


Have you seen the following, from the perl faq? Hope it helps.


How do I get Perl to compile on Solaris?

    John Lees <> 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 <> 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 <> 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.

----- End Included Message -----

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:09 CDT