1834967 Members
1776 Online
110072 Solutions
New Discussion

Perl/DBD/DBI on 11i

 
Michael Simone
Frequent Advisor

Perl/DBD/DBI on 11i

I have a new rp7400 (N4000) which came installed with HP-UX 11i (B.11.11.0112). I'm trying to get a working Perl/DBI/DBD combination so I can access my DB using Perl. But I keep running into compilation errors and arguments about the version of Perl pre-installed with HPUX11i.

Can anyone recommend a set of files to install on here? Should I remove the default Perl package and go with a different one? And do I need to install gcc (which version?) or can you compile Perl with the HP ANSI C compiler?

Any help here would be appreciated. The simpler, the better.

Thanks,
Mike Simone
1 REPLY 1
H.Merijn Brand (procura
Honored Contributor

Re: Perl/DBD/DBI on 11i

Much depends on what you *have* and what you *want*.

All precompiled perl binaries I know of (including the full version with packages on the HP Applications CD from Sep 2001) are build with some version of gcc. This enables users to add their own XS based modules like DBI and DBD-*** (you didn't mention which DBD you want to use).

If you *do* have HP C-ANSI-C, I would advice to build your own perl using HPc. There are some advantages in that approach: first of all, you get a perl that is build optimized on your architecture (hppa-2.0) and fits better to your shared libraries, and second - probably more important - you can build your extension modules using HPc, which you are probably familiar with, and do not have to install a gcc version.

Using HPc also gives you the oportunity to *choose* if you need/want to use 64bit environment. The current development release (perl-5.7.3) builds 64bit clean out of the box on HP-UX 11.00. You *do* have to care about this since some databases (IIRC Ingres) only supports 64bit environment in their new shipped libraries, and if you build a 32bit perl, you cannot add a 64bit DBD-Ingres. Problems are sure to be hit if you want to connect a 32bit only database driver (DBD-Unify) to a 64bit only driver. This will not be possible. (Use '-Duse64bitall' in the Configure line if you want to build a 64bit perl)

Both versions described below support threads, but the 5.73 (5.8.0 tobe) is richer in thread features and more thread safe and stable. (Use '-Dusethreads -Duseithreads' in the Configure line to enable threads. Prebuild binary from HP's application CD is a threaded perl build)

So to make a long story short:


# cd /work
# wget ftp://download.xs4all.nl/pub/mirror/CPAN/src/5.0/perl-5.6.1.tar.gz
# gzip -d < perl-5.6.1.tar.gz | tar xf -
# cd perl-5.6.1
# Configure -Dusedevel -Duseperlio -des
# make
# make test
# make install

Or for the latest development release (still marked unstable, but in fact it is pretty stable). If you do need to support Unicode from/to your database, go for this one, or wait one more month for 5.8.0

# cd /work
# wget ftp://download.xs4all.nl/pub/mirror/CPAN/src/5.0/perl-5.7.3.tar.gz
# gzip -d < perl-5.7.3.tar.gz | tar xf -
# cd perl-5.7.3
# Configure -Dusedevel -Duseperlio -des
# make
# make test
# make install
Enjoy, Have FUN! H.Merijn