Building Perl with shared lib libperl

Matthew Seaman m.seaman at
Wed Jun 9 04:44:16 PDT 2004

On Tue, Jun 08, 2004 at 10:31:16PM -0400, Robert Fitzpatrick wrote:
> Trying to install a procedural language in PostgreSQL 7.4.2, pl/perl,
> but it complains that my 'libperl is not a shared library' and that I
> may need to rebuild my Perl. I am using Perl 5.6.1, is there a way to
> set this option when using the port /usr/ports/lang/perl5?

Not with the land/perl5 port.  However, a shared is built
by default for the lang/perl5.8 port -- recommend you update to that.

Since lang/perl5 is nolonger the default version to install in
FreeBSD-5.x I'm not entirely sure why the lang/perl5 port is still
stuck at perl-5.6.1.  That's a pretty ancient version now, and recommends 5.8.4 as the standard version everyone should run.

Note that if you upgrade from perl-5.6.1 to perl-5.8.4 you will need
to re-install any perl modules so that perl-5.8.4 can find them, and
you will need to re-install various automake ports that invoke
perl5.x.y specifically.  See /usr/ports/UPDATING for some brief
instructions, but the procedure is generally something like this:

    # find /usr/local/lib/perl5/{5.6.1,site_perl/5.6.1} -type -f -print0 | \
        xargs -0 -n 1 pkg_which | sort -u > /tmp/perl-modules
    # portupgrade -o lang/perl5.8 -f lang/perl5
    # use.perl port
    # vi /tmp/perl-modules 

(Edit the list of modules for sanity: take out the explicit references
to perl-5.6.1 and the '?', and various lines where 'pkg_which' thinks
the file belongs to more than one port.  You can (but this is not
mandatory) also remove ports which are supplied both as standalone and
that are bundled by default with perl but remember to pkg_delete
anything you aren't going to re-install)

    # xargs portupgrade -f < /tmp/perl-modules

which will churn away for quite some time.  Eventually you should end
up with /usr/local/lib/perl5/5.6.1 and
/usr/local/lib/perl5/site_perl/5.6.1 both being pretty much empty, and
with most of their contents transferred to the corresponding 5.8.4
directories.  If everything has gone according to plan, the 5.6.1
directories will be redundant and can be deleted.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list