Thread: libperl.so

libperl.so

From
Ron Peterson
Date:
I can't compile the perl module because libperl is not a shared
library.  So what I'd like to do is simply download the 5.6 perl source,
compile, and go.

I'm using Red Had 6.1, which has the perl-5.00503-6 rpm installed.  Of
course there are a jillion other packages which depend on this one.

So my question is, what happens if I rpm -e perl, then make, make
install the latest 5.6 source?  Is my whole world going to fall apart?

I'm scared.

--

Ron Peterson
Systems Manager
Wallace Floyd Design Group
273 Summer Street
Boston, MA  02210
617.350.7400 tel
617.350.0051 fax
rpeterson@wallacefloyd.com

Re: libperl.so

From
Lamar Owen
Date:
Ron Peterson wrote:
> I'm using Red Had 6.1, which has the perl-5.00503-6 rpm installed.  Of
> course there are a jillion other packages which depend on this one.

> So my question is, what happens if I rpm -e perl, then make, make
> install the latest 5.6 source?  Is my whole world going to fall apart?

Yes.  You system will likely die a horrible screaming death.  Maybe I
exaggerate a little, but Perl 5.6 is one reason the next RedHat is 7.0
and not 6.3.  The rpm -e perl is going to die, unless you --force it.
Then you will have to reconfigure the new perl to be identical to the
old in setup -- and Perl 5.6 is not going to be identical in any case.

> I'm scared.

For good reason.  If you must have Perl 5.6, upgrade to RedHat 7.0 when
it's released.  If you must have pl/perl, (as the Pg module does _not_
require libperl.so), then see the instructions in the postgresql-7.0.2-2
rpm spec file, in the src.rpm.  Or ask Karl DeBisschop on the
pgsql-hackers list.

If you are running the RPM distribution, and you're talking about the Pg
client-side perl module, then install postgresql-perl-7.0.2-2.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: libperl.so

From
Date:
On Fri, 4 Aug 2000, Lamar Owen wrote:

> > So my question is, what happens if I rpm -e perl, then make, make
> > install the latest 5.6 source?  Is my whole world going to fall apart?
>
> Yes.  You system will likely die a horrible screaming death.  Maybe I
> exaggerate a little, but Perl 5.6 is one reason the next RedHat is 7.0
> and not 6.3.  The rpm -e perl is going to die, unless you --force it.
> Then you will have to reconfigure the new perl to be identical to the
> old in setup -- and Perl 5.6 is not going to be identical in any case.

You can still install 5.6 without deleting the old Perl -- just make sure
you answer yes when asked about compatibility with older Perl.  It'll
overwrite your binaries under /usr/bin, but maintain the older modules if
you have them installed (the 5.6 modules and the older 5.005 modules are
in separate directory trees under /usr/lib/perl5).  I've installed Perl
5.6 (via CPAN) successfully several times over Red Hat, Suse and Debian
without breaking my system.  If you want, after you get 5.6 successfully
installed, you can manually remove your older modules and reinstall them
from CPAN.  It'd be ridiculous to have to upgrade your operating system
installation just to get the newer version of Perl.

Brett W. McCoy
                                         http://www.chapelperilous.net/~bmccoy/
-------------------------------------------------------------------------------
The difference between America and England is that the English think 100
miles is a long distance and the Americans think 100 years is a long time.


Re: libperl.so

From
Lamar Owen
Date:
bmccoy@chapelperilous.net wrote:
> from CPAN.  It'd be ridiculous to have to upgrade your operating system
> installation just to get the newer version of Perl.

> Brett W. McCoy

Thanks for the correction/clarification.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: libperl.so

From
Alex Pilosov
Date:
On Fri, 4 Aug 2000, Ron Peterson wrote:

> I can't compile the perl module because libperl is not a shared
> library.  So what I'd like to do is simply download the 5.6 perl source,
> compile, and go.
>
> I'm using Red Had 6.1, which has the perl-5.00503-6 rpm installed.  Of
> course there are a jillion other packages which depend on this one.
>
> So my question is, what happens if I rpm -e perl, then make, make
> install the latest 5.6 source?  Is my whole world going to fall apart?
The best idea for you is to install SRPM for 5.005, and then change the
configuration to build libperl.so, and manually copy libperl.so to
/usr/lib.

-alex



Re: libperl.so

From
Charles Tassell
Date:
There is also a way to recompile a .a library into a shared
library.  Something like:

ar x library.a
ld -shared -o library.so *.o


It's documented somewhere, a web search on "convert shared library" will
probably turn up some detailed documentation.


At 11:52 PM 8/4/00, Alex Pilosov wrote:
>On Fri, 4 Aug 2000, Ron Peterson wrote:
>
> > I can't compile the perl module because libperl is not a shared
> > library.  So what I'd like to do is simply download the 5.6 perl source,
> > compile, and go.
> >
> > I'm using Red Had 6.1, which has the perl-5.00503-6 rpm installed.  Of
> > course there are a jillion other packages which depend on this one.
> >
> > So my question is, what happens if I rpm -e perl, then make, make
> > install the latest 5.6 source?  Is my whole world going to fall apart?
>The best idea for you is to install SRPM for 5.005, and then change the
>configuration to build libperl.so, and manually copy libperl.so to
>/usr/lib.
>
>-alex


Re: libperl.so

From
tc lewis
Date:
i removed the perl rpm and installed perl 5.6.0 from source on a redhat
6.2 machine without problems.

i went through a lot of extra steps to ensure cleanliness, however, which
you may or may not be able to do.  here's basically what i did:

rpm -e mod_perl
rpm -qa | grep piranha | xargs rpm -e
rpm -qa | grep php | xargs rpm -e
rpm -qa | grep apache | xargs rpm -e
rpm -qa | grep postgresql | xargs rpm -e
rpm -qa | grep ImageMagick | xargs rpm -e
rpm -e perl --nodeps
rm -rf /usr/lib/perl5/5*
rm -rf /usr/lib/perl5/man
rm -rf /usr/lib/perl5/site*
rm -rf ~/.cpan
cd /usr/local/src
mkdir -p packages
cd packages
wget -c ftp://ftp.perl.org/pub/CPAN/src/perl-5.6.0.tar.gz
wget -c ftp://ftp.perl.org/pub/CPAN/src/perl-5.6.0.tar.gz
cd ..
rm -rf perl-5.6.0
tar zxvf packages/perl-5.6.0.tar.gz
chown -R root.root perl-5.6.0
cd perl-5.6.0
rm -f config.sh Policy.sh
sh Configure -Dcc=gcc -Dprefix=/usr -Dman3dir=/usr/lib/perl5/man/man3 -de
make
make test
make install-strip
cd ..
sync

the rpm spec does a lot of extra stuff when building perl.  most of it is
to work around perl's installation scheme in order to allow for buildroot
and relocatable mechanisms in the rpm.  i decided not to deal with that
anymore.

the method above won't build a perl shared library for you, only a static
one.  remove the "-de" from that configure line and it will prompt you on
all of its questions, one of which is to build a shared library.  i'm sure
there's a -D flag you can pass it for that too, but i don't know what it
is offhand.  consult the perl install docs.

all the rpm -e commands at the top are because those packages either have
things in a "5.005" directory in /usr/lib/perl5, or are packages that
depend on a package with files in such a directory.  that's not going to
fly from a base perl 5.6.0 installation, since it will now use a "5.6.0"
directory.  i don't understand why perl does that, but that's beside the
point.  you can probably get away with just removing the "postgresql-perl"
package instead of the whole postgresql distribution, but yeah, uh
whatever.  you'll figure it out.

after installing perl i imagine you could rpm --rebuild those packages
from their .src.rpm files and then install them and they would use the
correct perl paths, or if not i'm sure a couple well-placed symbolic links
would help you.  i don't really use any of those packages so it doesn't
matter to me.  stuff like apache i typically prefer to install from source
over using an rpm anyway.

anyway, to each his own, i just wanted to chime in and say it's doable.

good luck.

-tcl.



On Sat, 5 Aug 2000, Charles Tassell wrote:

> There is also a way to recompile a .a library into a shared
> library.  Something like:
>
> ar x library.a
> ld -shared -o library.so *.o
>
>
> It's documented somewhere, a web search on "convert shared library" will
> probably turn up some detailed documentation.
>
>
> At 11:52 PM 8/4/00, Alex Pilosov wrote:
> >On Fri, 4 Aug 2000, Ron Peterson wrote:
> >
> > > I can't compile the perl module because libperl is not a shared
> > > library.  So what I'd like to do is simply download the 5.6 perl source,
> > > compile, and go.
> > >
> > > I'm using Red Had 6.1, which has the perl-5.00503-6 rpm installed.  Of
> > > course there are a jillion other packages which depend on this one.
> > >
> > > So my question is, what happens if I rpm -e perl, then make, make
> > > install the latest 5.6 source?  Is my whole world going to fall apart?
> >The best idea for you is to install SRPM for 5.005, and then change the
> >configuration to build libperl.so, and manually copy libperl.so to
> >/usr/lib.
> >
> >-alex
>
>


Re: libperl.so

From
Lamar Owen
Date:
Charles Tassell wrote:
> There is also a way to recompile a .a library into a shared
> library.  Something like:

> ar x library.a
> ld -shared -o library.so *.o

But a shared lib is _supposed_ to be compiled with position-independent
code with -fPIC -- otherwise you are just asking for trouble to simply
relink in this way.  It may work for you (as it does for me with
pl/perl, and for Karl DeBisschop), but it is highly unlikely it will
work for everyone, and it is likely to cause performance issues even if
it does work.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Re: libperl.so

From
Alex Pilosov
Date:
Yeah, openbsd ld/ld.so for example will bitch and moan when its asked to
do this. (nonPIC code loaded as so). So this is to be used as last resort.


On Sat, 5 Aug 2000, Lamar Owen wrote:

> Charles Tassell wrote:
> > There is also a way to recompile a .a library into a shared
> > library.  Something like:
>
> > ar x library.a
> > ld -shared -o library.so *.o
>
> But a shared lib is _supposed_ to be compiled with position-independent
> code with -fPIC -- otherwise you are just asking for trouble to simply
> relink in this way.  It may work for you (as it does for me with
> pl/perl, and for Karl DeBisschop), but it is highly unlikely it will
> work for everyone, and it is likely to cause performance issues even if
> it does work.
>
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11
>
>