Unix Stuff

Perl 5.8 on HP-UX 64-bit

I wrote this a year ago for building perl-5.8.x on HP-UX. A very similar version is used to build perl 32-bit on RH 7.3, RHEL3, and RHEL4. This version includes updates by other members of the Priority Health Unix team, specifically places where updates were needed to build on Itanic.
I'll have to find it in my email, but I also have instructions for building 5.005_3 on HP-UX 11i, which turned out to be difficult. Again, bug me if you need this, as I may forget to post it here.


# This procedure goes from start to finish to build a completely stand-alone
# perl in /opt/perl-5.8.  It can be rsynced to all HP-UX 11.11 hosts even if
# /usr/local or other packages are out of sync.

## first, set up your shell environment thusly:
export CC=/opt/ansic/bin/cc
export CXX=/opt/aCC/bin/aCC
export CFLAGS="+DD64 +Z -I/opt/perl-5.8/local/include"
export CXXFLAGS=$CFLAGS
export LDFLAGS="-L/opt/perl-5.8/local/lib -L/usr/lib/hpux64"
export PATH=/opt/ansic/bin:/usr/ccs/bin:/opt/perl-5.8/local/bin:/opt/perl-5.8/bin:/usr/bin:/usr/local/bin:/bin:/sbin
export PERL=/opt/perl-5.8/bin/perl
export MAKE=/usr/local/bin/gmake
alias make=/usr/local/bin/gmake

./Configure -der \
            -A prepend:libswanted='cl pthread ' \
            -Dprefix=/opt/perl-5.8 \
            -Dinstallprefix=/opt/perl-5.8 \
            -Duselargefiles \
            -Dusethreads \
            -Duse64bitall \
            -Dyacc='/usr/local/bin/bison -y' \
            -Uusemallocwrap \
            -Dcf_by="Al Tobey" \
            -Dperladmin='tobert@gmail.com' \
            -Dcf_email='tobert@gmail.com'

make
make test
make install

# run h2ph
(cd /usr/include; /opt/perl-5.8/bin/h2ph -r -l .)

## Expat
./configure --prefix=/opt/perl-5.8/local

# After you do the make and make install ensure that expat.h and expat_external.h are located in /opt/perl-5.8/local/include

## Gettext
##
## Some wiggling may be required to get this built ... too bad
## it's such a pain, and good thing it shouldn't be required except
## once in a blue moon.   
## The build may fail at some point.   When it does, run a "gmake install"
## which should succeed. 

## Gettext 64 bit
./configure --prefix=/opt/perl-5.8/local \
            --with-libexpat-prefix=/opt/perl-5.8/local \
            --disable-nls \
            --with-included-gettext \

## Iconv
## the additional LDFLAGS is required or link will fail
LDFLAGS="+DD64" ./configure --prefix=/opt/perl-5.8/local --disable-nls

## OpenSSL -- double check to make sure dynamic libs get installed
# For PA-RISC run
./Configure --prefix=/opt/perl-5.8/local hpux64-parisc2-cc
# For Itanium run
./Configure --prefix=/opt/perl-5.8/local hpux64-ia64-cc
# then build Net_SSLeay with
perl Makefile.PL /opt/perl-5.8/local

## GDBM_File
# download and configure GDBM_File
./configure --prefix=/opt/perl-5.8/local

   # Install GDBM_File module by pulling it out of the Perl Source and compiling it manually
   perl Makefile.PL LIBS=-L/opt/perl-5.8/local/lib INC=-I/opt/perl-5.8/local/include

## Math::GMP
# download and configure gmp for 64 bits - Use sourcecode from HP-UX porting site.
# On IA64, you will need to modify config.h to make sure that it builds the modules in the mpn directory
./configure --prefix=/opt/perl-5.8/local

## XML::LibXML -- install libxml2
./configure --prefix=/opt/perl-5.8/local \
            --without-modules \
            --with-pic

## GNU readline
# for PARISC:
./configure --prefix=/opt/perl-5.8/local 
# for Itanic:
./configure --prefix=/opt/perl-5.8/local --disable-multibyte

## Zlib
./configure --prefix=/opt/perl-5.8/local

## MySQL Client
LDFLAGS="+DD64 -L/opt/perl-5.8/local/lib" \
./configure --prefix=/opt/perl-5.8/mysql \
            --without-docs \
            --without-man \
            --with-openssl=/opt/perl-5.8/local \
            --with-zlib-dir=/opt/perl-5.8/local \
            --without-server

## Spread
./configure --prefix=/opt/perl-5.8/local
make SHLD='/opt/ansic/bin/cc -b' 

## DBD::Sybase
# turn chained mode OFF as we have some apps that don't like it
export SYBASE=/syb/sybase00/OCS-12_5
# vi CONFIG
# set BUILD_TYPE to 64

# after install, run find /opt/perl-5.8 -name Sybase.pm -exec vi {} \; and add
# the following two lines after "package DBD::Sybase;"
#    local $ENV{SYBASE};
#    $ENV{SYBASE} = "/syb/sybase00/rel12.5";
# This will make sure that DBA's who like to set $SYBASE to weird values
# don't make it blow up.  You just can't move the Sybase libraries without
# making the above change again.

## BerkeleyDB 4.3
mkdir build
cd build
../dist/configure --prefix=/opt/perl-5.8/local \
                  --with-pic \
                  --disable-tcl \
                  --disable-java \
                  --enable-shared=no

## base CPAN module list
## Make sure to set up the environment the same as when building perl (above) when
## building CPAN modules.   Just cut & paste the environment above into your terminal
## or stick it in a profile.

Archive::Tar
Archive::Zip

Authen::SASL

Bit::Vector

Cache::Cache

Carp::Clan

Class::Loader
Class::MethodMaker

Compress::Zlib

AppConfig
Config::ApacheFormat
Config::Simple

Convert::ASCII::Armour
Convert::ASN1
Convert::PEM

Crypt::Blowfish
Crypt::CAST5_PP
Crypt::CBC
Crypt::DES
Crypt::DES_EDE3
Crypt::DH
Crypt::DSA
Crypt::OpenPGP
Crypt::Primes
Crypt::RIPEMD160
Crypt::RSA
Crypt::Random
Crypt::Rijndael
Crypt::SSLeay
Crypt::Twofish

DBI
DBD::Sybase
DBD::mysql
DBD::Oracle
DDL::Oracle

Data::Buffer

Date::Calc
Date::Manip
Date::Parse
TimeDate
Time::Piece

Digest::BubbleBabble
Digest::HMAC
Digest::MD2
Digest::SHA1

Email::Valid

Error

POE
Event
Time::HiRes

Expect

Graph
Heap
Graphviz

HTML::Parser
HTML::Tagset
Template

IO::Socket::SSL
IO::String
IO::Stringy
IO::Tty
IO::Zlib

IPC::Run

libwww-perl / LWP
WWW::Mechanize

MailTools
Math::GMP
Math::Pari
Net::LDAP
Net::SNPP
Net::SSH:Perl
Net::SSLeay
Net::Telnet

OLE::Storage_Lite
Parse::RecDescent
SOAP::Lite
Sort::Versions
Log::Log4perl
Spread

Spreadsheet::ParseExcel
Spreadsheet::ParseExcel::Simple
Spreadsheet::WriteExcel

String::CRC32
Term::ReadKey
Term::ReadLine::Gnu

Module::Signature
Test::Builder::Tester
Test::Harness
Test::Pod
Test::Simple
Test::Taint
Test::Exception
Pod::Escapes
Pod::Simple
Pod::Usage

Text::CSV
Text::CSV_XS
Text::Iconv

Tie::EncryptedHash
Tie::IxHash

URI

XML::LibXML
XML::LibXML::Common
XML::NamespaceSupport
XML::Parser
XML::SAX
XML::SAX::Base
XML::Twig
XML::XPath

YAML
YAML::Syck