Subject: Re: ld confusion
To: netbsd-help <netbsd-help@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 05/28/2002 01:26:03
On Fri, 24 May 2002 12:28:22 -0700 "Johnny C. Lam" <jlam@netbsd.org>
wrote:
> On Thu, May 23, 2002 at 09:34:58PM -0400, James K. Lowden wrote:
> > patch/patch-aa looks like this:
> > 
> > +    } elsif ($Config::Config{'osname'} eq 'netbsd') {
> > +       # We need to link with -Wl,-R if we're on NetBSD
> > +       $linkwith = "-Wl,-R$libdir";
> 
> What version of perl do you have installed on your system?  You may want
> to make sure that you have perl>=5.6.1nb5, and I recommend using
> perl-5.6.1nb7 (the most recent version in pkgsrc).  The change that you
> cite above looks very old (I actually can't seem to find it in the CVS
> history, though it looks familiar), and it's since been improved.  The
> latest perl package (5.6.1nb7) should work without problems on either
> ELF or a.out platforms, so it _should_ work on your NetBSD-1.4.2/i386
> system.

Many thanks for your help.  I have perl-5.6.1nb7; I did a sup pretty
recently (I don't know how to check when).  The patch is dated April 14 on
my system.  I pretty much rely on sup to do the right thing.  I'll have a
look at CVS and let you know if I find anything.  

$ pkg_info |grep perl
perl-5.6.1nb7       Practical Extraction and Report Language
libperl-5.6.1       Perl DynaLoader as a shared object
ap-perl-1.25nb1     Module that embeds a Perl interpreter into Apache

For the sake of those who find this in archives, the problem was resolved
by changing 

+       $linkwith = "-Wl,-R$libdir";

to

+       $linkwith = "-R$libdir";

because a 1.4.2 system invokes ld, whereas a 1.5x system uses the gnu
linker via gcc.  
Regards, 
--jkl