Operating System - HP-UX
1834753 Members
3038 Online
110070 Solutions
New Discussion

Re: perl installing in /usr/local

 
SOLVED
Go to solution
José Enrique González
Frequent Advisor

perl installing in /usr/local

Hi:

I have tried to find a Perl BINARY distribution for HP-UX 11.11, installing in /USR/LOCAL, which is also ready for DBI, DBD, with no success. Even the one provided by Merijn, which is recommended as a very good one, is intended to install in /opt.

HP-UX 11.11, in fact, includes a Perl port, but of course it is installed to /opt. My dileme is that any additional module you want to download and install later (from CPAN, for example) installs on /usr/local.

HP-UX Porting and Archive Centre has a /usr/local-installing Perl port for HP-UX 11.11, but I don´t know if it is good to build DBD-Oracle on it.

I don´t know if there is any way to left my Perl where it is (in /opt) and get additional modules in /usr/local still working.

Thanks a lot plus one in advance for all your comments.

José Enrique
4 REPLIES 4
Bejoy C Alias
Respected Contributor

Re: perl installing in /usr/local

What about installing perl from its source code ?
Be Always Joy ......
Ralph Grothe
Honored Contributor

Re: perl installing in /usr/local

Unfortunately, most prebuilt depots or packages aren't relocatable.
But why not setting your own symlinks to /usr/local/ ?
If you want greater flexibility just grab the Perl source tarball and configure your own PREFIX to point to /usr/local.
You can use Merijn's prebuilt GCC package (+ binutils) for building (though it requires quite some free disk space).
Madness, thy name is system administration
H.Merijn Brand (procura
Honored Contributor
Solution

Re: perl installing in /usr/local

Simple workaround

1. Install in /opt
2. move the complete tree to /usr/local
3. Make a symbolic link from /opt/perl to /usr/local/perl
4. Continue as planned

This way, new modules will find perl where they expect it: in /usr/local, and perl itself will find whatever it needs through the symlink.

My recent ports are software depots, and thus won't install on /usr/local, but the above described move should not be a problem. In fact, my gcc/binutils are installed on /usr/local, but they reside on /wrk on my own machines, where I reversed the above described procedure.

CPAN modules that you install yourself do not depend on /usr/local. Period. Only if you fetch yourself prebuilt binary modules, which is highly unlikely. CPAN modules come as source code, and they just pick up the configuration (and installation folders) from the perl version it is used to build it with. So if you are building DBD-Oracle with a perl installed in /opt, DBD-Oracle will install in /opt too. (Not that this is always a wise choice, but that is a completely different matter).

HP's Porting Center's builds have greatly improved over time, and are probably not worse than mine. If they install in /usr/local, that - and the choice of included prebuilt modules - is the main difference. I have helped out the Porting Center folk in the past in creating the most versatile build.

All my 5.8.x builds include defined-or. HP's builds do not. I have included Tk and DBI, and build probably with a more recent gcc than HP does.

Be sure to build DBD-Oracle with the same compiler as perl was built with, whatever distribution you choose.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
José Enrique González
Frequent Advisor

Re: perl installing in /usr/local

Thank you, Merijn. I have also found that PREFIX option can be used when processing Makefile.PL.

Perl version included in the OS media i used (HP-UX 11.11, Decemeber 2004) has a very new Perl port including DBI and Tk, and this distribution includes all you need to go further with DBD. With your workaround and PREFIX option I have several ways to keep my Perl environment unique and consistent. Thanks again.