Subject: Re: lang/perl58 build fails in AIX 5.3, ideas on how to fix.
To: None <tech-pkg@netbsd.org>
From: Peter Schmiedeskamp <pschmied@yahoo.com>
List: tech-pkg
Date: 02/18/2005 12:26:50
Success!

O.K.  I think I found the problem.  I believe the
problem is with the work/perl-5.8.6/Makefile.SH

I've got a patch that seems to fix the problem.  I
hope that I generated this patch correctly.  I did a
"bmake extract; bmake patch" to get a starting point
to work on this file.  Does this sound right?

Basically what I did was to add "-Wl," in front of
everything that looks like a linker flag.  The only
potential pitfall of this that I can see is for AIX
users attempting to use the XLC compiler.  But, given
that I've had very little success with XLC, it may be
best to have perl working _some_ way.  I'm not sure
that this would even break XLC.  Does anybody know if
XLC cares if linker flags are prepended with "-Wl,"?

I submitted the patch and it is being tracked in the
NetBSD bugtracker as 'pkg/29440'.  Let me know if this
is the appropriate way to fix this or if anybody has
problems with it.  Barring any problems with the
methodology, would some kind pkgsrc steward consider
committing this patch?

-Peter Schmiedeskamp

--- Peter Schmiedeskamp <pschmied@yahoo.com> wrote:

> And after all that, I forget to include the actual
> build error.  Here it is:
> 
> gcc -o libperl.a -H512 -T512 -bhalt:4 -bM:SRE
> -bE:perl.exp -b noentry  -L /usr/pkg/lib   -Wl,-brtl
> -Wl,-bdynamic -Wl,-bmaxdata:0x80000000
> -L/usr/pkg/lib
> -Wl,-b32 -lbind -lnsl -ldl -lld -lm -lcrypt
> -lpthreads
> -lc -lbsd perl.o  gv.o toke.o perly.o op.o pad.o
> regcomp.o dump.o util.o mg.o reentr.o hv.o av.o
> run.o
> pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o
> doio.o regexec.o utf8.o taint.o deb.o universal.o
> xsutils.o globals.o perlio.o perlapi.o numeric.o
> locale.o pp_pack.o pp_sort.o  -lbind -lnsl -ldl -lld
> -lm -lcrypt -lpthreads -lc -lbsdgcc:
> `-b' must come at the start of the command line
> *** Error code 1
> 1 error
> bmake: stopped in
> /usr/pkgsrc/lang/perl58/work/perl-5.8.6
> 
> 
> --- Peter Schmiedeskamp <pschmied@yahoo.com> wrote:
> 
> > Hello, I'm attempting to build lang/perl58 on AIX
> > 5.3
> > with gcc 3.4.3.  The build fails with the
> following:
> > 
> > 
> > 
> > 
> > 
> > The problem appears to be that some linker flags
> are
> > getting passed to gcc without a preceeding "-Wl,".
> 
> > For example, instead of "-bnoentry", I believe
> this
> > should be passed to gcc as "-Wl,-bnoentry" as to
> not
> > confuse AIX's linker.
> > 
> > Actually, I believe this to be correct in all
> cases
> > where we pass linker flags to gcc on AIX.
> > 
> > So, is there a way to make sure that all linker
> > flags
> > get passed with a preceeding "-Wl,"?
> > 
> > Again, I'm very new to all this, so if I'm missing
> > something critical, please let me know.
> > 
> > -Peter Schmiedeskamp
> > 
> > 
> > 		
> > __________________________________ 
> > Do you Yahoo!? 
> > Take Yahoo! Mail with you! Get it on your mobile
> > phone. 
> > http://mobile.yahoo.com/maildemo 
> > 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Helps protect you from nasty viruses. 
> http://promotions.yahoo.com/new_mail
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250