Perl 5.10 on Solaris 10

As I discussed in a prior post, Solaris 10 ships with its own build of perl 5.8.4 that probably meets the requirements of most. In my world, however, significant improvements in areas like internationalization make perl 5.10.0 much more attractive. The process of building perl 5.10.0 on Solaris 10 is nearly identical to doing it on Solaris 8. Some pointers below.

First, be sure to read the instructions. Because it always helps to understand what you’re doing, also read the perlsolaris documentation. You will thank yourself later.

My build environment for this used gcc from sunfreeware, not Sun. The following environment variables were set:


The defaults are pretty much acceptable. Because I’m a cautious fellow I always invoke ./Configure without any arguments and suffer through the endless questions that follow. Some things to look out for:

1. Solaris 10 should be configured for LANG=en_US.UTF-8, before you begin make sure this had been done. ISO-8859-1 is so 70’s, and if you do anything that requires internationalization you’ll just be backing yourself into a ditch by taking delivery of anything less.

2. To Configure, Solaris 10 is version 2.10 (not 5.10), as guessed.

3. Say no to threading. Even on Linux threading can result in heartburn. The very fact that we have a term like “thread safe” should be a warning that there are troubled waters ahead.

4. Let it build as 32-bit. I know this is painful to admit, but the consensus is that 32-bit perl doesn’t offer better performance than 64-bit, just like Configure says (do a “file” against the shipping perl binary on Solaris 10 and you’ll find that it is also in fact 32-bit).

5. Yes, you want to use /usr/ccs/bin/nm and /lib/ (for real).

Because you’re installing 32-bit modules will sometimes need 32-bit versions of various libraries to build. For example, use the 32-bit version of Oracle’s instantclient when making DBD::Oracle.

When compiling modules later you’re going to run into situations where even specifying your LIBS and INC on the command line doesn’t work. If that happens, as it did for me when making BerkeleyDB, edit to add what you need (for BerkeleyDB this required the path /usr/local/BerkeleyDB/lib (and /include) get replaced with the actual /usr/local/BerkeleyDB.4.7/lib (and /include).