Re: [GENERAL] libperl.so

2000-08-06 Thread Alex Pilosov

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
> 
> 




Re: [GENERAL] libperl.so

2000-08-05 Thread Lamar Owen

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: [GENERAL] libperl.so

2000-08-05 Thread tc lewis


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: [GENERAL] libperl.so

2000-08-05 Thread Charles Tassell

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