develooper Front page | perl.perl5.porters | Postings from June 2019

Re: Perl 5.26.2 Config option needs a tweak?

Thread Previous
From:
Andy Dougherty
Date:
June 26, 2019 00:26
Subject:
Re: Perl 5.26.2 Config option needs a tweak?
Message ID:
20190626002553.ad326mmsqtm4bzwt@dendrite.phys.lafayette.edu
On Tue, Jun 25, 2019 at 12:55:05PM -0600, Karl Williamson wrote:
> On 6/25/19 12:13 PM, Karl Williamson wrote:
> > On 6/25/19 11:00 AM, Steve Hay wrote:
> > > On Tue, 25 Jun 2019 at 16:21, Karl Williamson
> > > <public@khwilliamson.com> wrote:
> > > > 
> > > > On 6/24/19 2:57 PM, Steve Hay wrote:
> > > > > On Wed, 19 Jun 2019 at 13:57, Steve Hay
> > > > > <steve.m.hay@googlemail.com> wrote:
> > > > > > 
> > > > > > On Sat, 14 Apr 2018 at 17:34, Karl Williamson
> > > > > > <public@khwilliamson.com> wrote:
> > > > > > > 
> > > > > > > On 04/14/2018 06:30 AM, NormW wrote:
> > > > > > > > GE
> > > > > > > > Working with perl 5.26.2:
> > > > > > > > Files -
> > > > > > > >      uconfig.h
> > > > > > > >      config_h.SH
> > > > > > > >     .\win32\config_h.gc
> > > > > > > >     .\win32\config_h.vc
> > > > > > > > know about USE_CBACKTRACE,
> > > > > > > > 
> > > > > > > > Files -
> > > > > > > >      embed.h
> > > > > > > >      proto.h
> > > > > > > >      util.c
> > > > > > > >      util.h
> > > > > > > > know about USE_C_BACKTRACE.
> > > > > > > > Norm
> > > > > > > > 
> > > > > > > 
> > > > > > > thanks for finding this.  I'll look into it.
> > > > > > 
> > > > > > I've just unearthed this thread from the bowels of my Inbox. I believe
> > > > > > the attached patch is correct, but I'm not sure whether committing it
> > > > > > directly is correct? -- Does it need some metaconfig changes upstream
> > > > > > (before or after updating blead?)?
> > > > > 
> > > > > Now in blead as commit 812e2121cb84e726a5a5b5a3a64c6f949426e02f.
> > > > > (Thanks to H.Merijn Brand for confirming pushing to blead first is ok.)
> > > > > 
> > > > 
> > > > I'm embarrassed that I didn't follow up on that email.  I now use
> > > > bookmarks to make sure that RT tickets don't get lost in my inbox
> > > > 
> > > > There are now a lot of warnings on Linux builds:
> > > > 
> > > > config.h:4203:0: warning: "USE_C_BACKTRACE" redefined
> > > 
> > > Sorry about that. I don't see that on Windows. Are you able to fix it,
> > > or shall I revert this commit for now until the matter can be
> > > resolved?
> > > 
> > 
> > I'll look at it
> > 
> 
> I'm not sure how to fix it.  I believe it only happens if the Configure
> option -Dusecbacktrace is specified.

The problem is Configure both sets USE_C_BACKTRACE in config.h *and* adds
-DUSE_C_BACKTRACE to the ccflags command line.  I don't know why; normally
either is sufficient, and adding it to config.h should suffice.  Unless there's
a target audience that's not going to be using perl's config.h, I think the
definition in config.h ought to suffice.  The following untested patch ought to
clear up the warning.  There might be additional tidying up to be done, but this
is a good first guess.


diff --git a/Configure b/Configure
index 0edf5166428..229fe3df08d 100755
--- a/Configure
+++ b/Configure
@@ -9607,16 +9607,12 @@ prefixvar=sitescript
 set backtrace d_backtrace
 eval $inlibc
 
-: add flags if using c backtrace
+: Check if C backtrace is actually supported.
 case "$usecbacktrace" in
   "") usecbacktrace=$undef ;;
   [yY]*|true|$define)
     case "$d_backtrace" in
       [yY]*|true|$define)
-        case " $ccflags " in
-	  *" -DUSE_C_BACKTRACE "*) ;; # Already there.
-	  *) ccflags="$ccflags -DUSE_C_BACKTRACE -g" ;;
-	  esac
         ;;
       *)
         echo "This system does not support backtrace" >&4


-- 
    Andy Dougherty		doughera@lafayette.edu

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About