General Perl Linking Question
am 12.12.2007 21:07:43 von Curtis Leach
I'm using Perl v5.8.8 on AIX, and I have a question about how Perl
locates libraries (*.a & *.so files) used by it's modules.
I know Perl looks in the following directories for these libraries on my
machine.
> perl -V:libpth
libpth='/lib /usr/lib /usr/ccs/lib /usr/local/lib';
But one of the libraries I need to link to for a module isn't located in
one of these 4 locations & since I don't own the machine, the Unix admin
doesn't want to reinstall the library in one of these locations.
Is there any environment variable that can be set to add that additional
directory? Or am I screwed until I can build a new Perl release that
includes that directory? (Luckily I do own the Perl Install)
Or is there some option I can add to "perl Makefile.PL" that would help
during the build/test/install?
Curtis
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: General Perl Linking Question
am 12.12.2007 21:27:25 von Jan Dubois
On Wed, 12 Dec 2007, Curtis Leach wrote:
> I'm using Perl v5.8.8 on AIX, and I have a question about how Perl
> locates libraries (*.a & *.so files) used by it's modules.
>
> I know Perl looks in the following directories for these libraries on
> my machine.
>
> > perl -V:libpth
> libpth='/lib /usr/lib /usr/ccs/lib /usr/local/lib';
>
> But one of the libraries I need to link to for a module isn't located
> in one of these 4 locations & since I don't own the machine, the Unix
> admin doesn't want to reinstall the library in one of these locations.
>
> Is there any environment variable that can be set to add that
> additional directory? Or am I screwed until I can build a new Perl
> release that includes that directory? (Luckily I do own the Perl
> Install)
>
> Or is there some option I can add to "perl Makefile.PL" that would
> help during the build/test/install?
You can add alternate paths with -L/path.
Look at `perldoc ExtUtils::MakeMaker`:
LIBS
An anonymous array of alternative library specifications to be
searched for (in order) until at least one library is found. E.g.
'LIBS' => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"]
Mind, that any element of the array contains a complete set of
arguments for the ld command. So do not specify
'LIBS' => ["-ltcl", "-ltk", "-lX11"]
See ODBM_File/Makefile.PL for an example, where an array is needed. If
you specify a scalar as in
'LIBS' => "-ltcl -ltk -lX11"
MakeMaker will turn it into an array with one element.
Cheers,
-Jan
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: General Perl Linking Question
am 12.12.2007 22:05:11 von fzarabozo
This is a multi-part message in MIME format.
--===============1424148294==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_042B_01C83CD0.64712560"
This is a multi-part message in MIME format.
------=_NextPart_000_042B_01C83CD0.64712560
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
You can use "lib" to extend where Perl looks for libraries:
use lib "/path/to/your/lib";
HTH
Paco Zarabozo
----- Original Message -----=20
From: Curtis Leach=20
To: activeperl@activestate.com=20
Sent: Wednesday, December 12, 2007 2:07 PM
Subject: General Perl Linking Question
I'm using Perl v5.8.8 on AIX, and I have a question about how Perl
locates libraries (*.a & *.so files) used by it's modules.
I know Perl looks in the following directories for these libraries on =
my
machine.
> perl -V:libpth
libpth=3D'/lib /usr/lib /usr/ccs/lib /usr/local/lib';
But one of the libraries I need to link to for a module isn't located =
in
one of these 4 locations & since I don't own the machine, the Unix =
admin
doesn't want to reinstall the library in one of these locations.
Is there any environment variable that can be set to add that =
additional
directory? Or am I screwed until I can build a new Perl release that
includes that directory? (Luckily I do own the Perl Install)
Or is there some option I can add to "perl Makefile.PL" that would =
help
during the build/test/install?
Curtis
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
------=_NextPart_000_042B_01C83CD0.64712560
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
charset=3Diso-8859-1">
You can use "lib" to extend where Perl =
looks for=20
libraries:
use lib =
"/path/to/your/lib";
HTH
Paco Zarabozo
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
----- Original Message -----
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black">From:=20
href=3D"mailto:cleach@harrahs.com">Curtis Leach=20
To:
title=3Dactiveperl@activestate.com=20
=
href=3D"mailto:activeperl@activestate.com">activeperl@active state.com=
Sent: Wednesday, December 12, =
2007 2:07=20
PM
Subject: General Perl Linking=20
Question
I'm using Perl v5.8.8 on AIX, and I have a question =
about how=20
Perl
locates libraries (*.a & *.so files) used by it's=20
modules.
I know Perl looks in the following directories for =
these=20
libraries on my
machine.
> perl =
-V:libpth
libpth=3D'/lib=20
/usr/lib /usr/ccs/lib /usr/local/lib';
But one of the libraries =
I need=20
to link to for a module isn't located in
one of these 4 locations =
&=20
since I don't own the machine, the Unix admin
doesn't want to =
reinstall the=20
library in one of these locations.
Is there any environment =
variable=20
that can be set to add that additional
directory? Or am I =
screwed=20
until I can build a new Perl release that
includes that =
directory? =20
(Luckily I do own the Perl Install)
Or is there some option I =
can add=20
to "perl Makefile.PL" that would help
during the=20
=
build/test/install?
Curtis
________________________________=
_______________
ActivePerl=20
mailing list
=
href=3D"mailto:ActivePerl@listserv.ActiveState.com">ActivePe rl@listserv.A=
ctiveState.com
To=20
unsubscribe:
=
href=3D"http://listserv.ActiveState.com/mailman/mysubs">http ://listserv.A=
ctiveState.com/mailman/mysubs
------=_NextPart_000_042B_01C83CD0.64712560--
--===============1424148294==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1424148294==--