develooper Front page | perl.perl5.porters | Postings from May 2007

RE: [perl #41587] [PATCH] 5.8.8 make sure we get the proper ldflags on

Thread Previous | Thread Next
Jan Dubois
May 28, 2007 15:39
RE: [perl #41587] [PATCH] 5.8.8 make sure we get the proper ldflags on
Message ID:
On Fri, 09 Mar 2007, H.Merijn Brand wrote:
> On Thu, 22 Feb 2007 14:39:02 -0800, Tom Callaway (via RT)
> <> wrote:
> > As part of the review process for Perl, I'm opening bugs for the
> > long list of patches to perl that Fedora has been carrying around
> > (in some cases, for years), in the hopes that these fixes can be
> > applied upstream. Unfortunately, I am not the original author of
> > these patches, so please be patient with me as I attempt to describe
> > why Fedora uses them.
> Thanks, applied in change #30530 I hope there is someone out there in
> the wild that uses this in smokes as I don't think the smokes pick up
> share libperl's

This patch breaks building for both maint and blead on at least
Redhat 7 and 9 (it builds fine on non-legacy distros):

`uname -a` for both machines:
  Linux redhat-70-i386 2.2.24-7.0.3 #1 Fri Mar 14 08:28:25 EST 2003 i686 unknown
  Linux redhat-9-i386 2.4.20-46.9.legacy #1 Thu Mar 2 16:11:28 EST 2006 i686 i686 i386 GNU/Linux

Both machines have all available patches applied to them.

The failure is identical on both and looks like this:

gcc -o -shared -O2  -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc   gv.o toke.o perly.o op.o pad.o regcomp.o dump.o util.o
mg.o reentr.o hv.o av.o perl.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 activeperl.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o  DynaLoader.o -lnsl
-ldl -lm -lcrypt -lutil -lpthread -lc 
/usr/bin/ld: undefined versioned symbol name _LIB_VERSION@@GLIBC_2.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status

It is some kind of weird interaction with this change:

Change 24371 could be made more specific to apply only on BSD and Cygwin, but
I think the patch in this bug report (30530) is actually not needed at all.

> > This patch is described as "make sure we get the proper ldflags on
> >". Presumably, without it, the shared object does not get
> > the proper ldflags.

This patch doesn't add anything to the gcc commandline to build
that isn't already there (see above).  Therefore I think the presumption is
wrong and the patch should be reverted.

Note that this will still only be treating the symptoms.  Gozer came up with
the following simple test program that fails to link on Redhat 7 and 9, even
without the duplicate -lm option:

  /* cc -o -shared -lm foo.c */
  #include <math.h>

This is just for reference, in case the problem with LIB_VERSION shows
up again; seems to build fine again for now...


> > --- perl-5.8.0/Makefile.SH.sharedlinker Tue Jun 18 12:36:27 2002
> > +++ perl-5.8.0/Makefile.SH      Tue Jun 18 12:37:31 2002
> > @@ -61,6 +61,9 @@
> >         netbsd*|freebsd[234]*|openbsd*)
> >                 linklibperl="-L. -lperl"
> >                 ;;
> > +       linux*)
> > +               shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
> > +               ;;
> >         aix*)
> >                 shrpldflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:perl.exp"
> >                 case "$osvers" in
> >

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About