Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bleadperl v5.21.0-129-g8dab3ba breaks MLEHMANN/Guard-1.022.tar.gz #13903

Closed
p5pRT opened this issue Jun 4, 2014 · 14 comments
Closed

Bleadperl v5.21.0-129-g8dab3ba breaks MLEHMANN/Guard-1.022.tar.gz #13903

p5pRT opened this issue Jun 4, 2014 · 14 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 4, 2014

Migrated from rt.perl.org#122031 (status was 'resolved')

Searchable as RT122031$

@p5pRT
Copy link
Author

p5pRT commented Jun 4, 2014

From @andk

git bisect


commit 8dab3ba
Author​: Karl Williamson <public@​khwilliamson.com>
Date​: Tue Apr 8 18​:46​:25 2014 -0600

  Remove deprecated 'PL_sv_objcount'

diagnostics


cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.022\" -DXS_VERSION=\"1.022\" -fPIC "-I/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.0-129-g8dab3ba/9980/lib/5.21.1/x86_64-linux-thread-multi/CORE" Guard.c
Guard.xs​: In function ‘XS_Guard_guard’​:
Guard.xs​:113​:11​: error​: ‘PL_sv_objcount’ undeclared (first use in this function)
  ++PL_sv_objcount;
  ^
Guard.xs​:113​:11​: note​: each undeclared identifier is reported only once for each function it appears in

perl -V


Summary of my perl5 (revision 5 version 21 subversion 1) configuration​: Commit id​: 8dab3ba Platform​: osname=linux, osvers=3.13-1-amd64, archname=x86_64-linux-thread-multi uname='linux k83 3.13-1-amd64 #1 smp debian 3.13.7-1 (2014-03-25) x86_64 gnulinux ' config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.0-129-g8dab3ba/9980 -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Duseithreads -Uuselongdouble -DDEBUGGING=-g'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2 -g',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.8.2', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
  libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=libc-2.18.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.18'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
  PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
  PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
  PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
  USE_ITHREADS USE_LARGE_FILES USE_LOCALE
  USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  USE_REENTRANT_API
  Built under linux
  Compiled at Jun 4 2014 02​:53​:12
  @​INC​:
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.0-129-g8dab3ba/9980/lib/site_perl/5.21.1/x86_64-linux-thread-multi
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.0-129-g8dab3ba/9980/lib/site_perl/5.21.1
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.0-129-g8dab3ba/9980/lib/5.21.1/x86_64-linux-thread-multi
  /home/sand/src/perl/repoperls/installed-perls/perl/v5.21.0-129-g8dab3ba/9980/lib/5.21.1
  .

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Jun 4, 2014

From @tsee

On 06/04/2014 03​:05 AM, (Andreas J. Koenig) (via RT) wrote​:

# New Ticket Created by (Andreas J. Koenig)
# Please include the string​: [perl #122031]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122031 >

git bisect
----------
commit 8dab3ba
Author​: Karl Williamson <public@​khwilliamson.com>
Date​: Tue Apr 8 18​:46​:25 2014 -0600

 Remove deprecated 'PL\_sv\_objcount'

diagnostics
-----------
Guard.xs​: In function ‘XS_Guard_guard’​:
Guard.xs​:113​:11​: error​: ‘PL_sv_objcount’ undeclared (first use in this function)
++PL_sv_objcount;
^
Guard.xs​:113​:11​: note​: each undeclared identifier is reported only once for each function it appears in

The fix for this one is literally just to remove that line of code. IIRC
reason for deprecation is that PL_sv_objcount was not being used in core
at all and that it was being kept updated (somewhat) as useless busy work.

--Steffen

@p5pRT
Copy link
Author

p5pRT commented Jun 4, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 17, 2014

From @rjbs

I'm happy to pass along any tested patch downstream.

--
rjbs

@p5pRT
Copy link
Author

p5pRT commented Jun 27, 2014

From @andk

also affected​: CREAMYG/KinoSearch-0.315.tar.gz
--
andreas

@p5pRT
Copy link
Author

p5pRT commented Jun 27, 2014

From @rurban

On Wed Jun 04 00​:40​:25 2014, smueller@​cpan.org wrote​:

On 06/04/2014 03​:05 AM, (Andreas J. Koenig) (via RT) wrote​:

# New Ticket Created by (Andreas J. Koenig)
# Please include the string​: [perl #122031]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=122031 >

git bisect
----------
commit 8dab3ba
Author​: Karl Williamson <public@​khwilliamson.com>
Date​: Tue Apr 8 18​:46​:25 2014 -0600

Remove deprecated 'PL_sv_objcount'

diagnostics
-----------
Guard.xs​: In function ‘XS_Guard_guard’​:
Guard.xs​:113​:11​: error​: ‘PL_sv_objcount’ undeclared (first use in
this function)
++PL_sv_objcount;
^
Guard.xs​:113​:11​: note​: each undeclared identifier is reported only
once for each function it appears in

The fix for this one is literally just to remove that line of code.
IIRC
reason for deprecation is that PL_sv_objcount was not being used in
core
at all and that it was being kept updated (somewhat) as useless busy
work.

Let's explain it like this​:
The fix is to check the version.

Inline Patch
--- ./Guard.xs~	2009-07-18 23:58:41.000000000 -0500
+++ ./Guard.xs	2014-06-27 10:18:45.821008691 -0500
@@ -110,7 +110,9 @@
         sv_magicext (guard, cv, PERL_MAGIC_ext, &guard_vtbl, 0, 0);
         RETVAL = newRV_noinc (guard);
         SvOBJECT_on (guard);
+#if PERL_VERSION < 18
         ++PL_sv_objcount;
+#endif
         SvSTASH_set (guard, (HV*)SvREFCNT_inc ((SV *)guard_stash));
 }
 	OUTPUT:


bless does not inc PL_sv_objcount since 5.17.11 anymore and does global destruction without checking for PL_sv_objcount, which slows down global destruction in the case of small scripts without any blessed objects.

5.21 removed now the variable at all, so that's why you get this error only now.
But it was effectively unused since 5.18.

--
Reini Urban

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2014

From @andk

Also affected​:

IBB/Acme-Damn-0.05.tar.gz | https://rt.cpan.org/Ticket/Display.html?id=96872

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2014

From @jkeenan

On Tue Jul 01 17​:49​:10 2014, andreas.koenig.7os6VVqR@​franz.ak.mind.de wrote​:

Also affected​:

IBB/Acme-Damn-0.05.tar.gz | https://rt.cpan.org/Ticket/Display.html?id=96872

I have submitted a patch for Acme-Damn at https://rt.cpan.org/Ticket/Display.html?id=96872.

@p5pRT
Copy link
Author

p5pRT commented Jul 3, 2014

From @karenetheridge

On Fri, Jun 27, 2014 at 08​:25​:31AM -0700, Reini Urban via RT wrote​:

Let's explain it like this​:
The fix is to check the version.

Having encountered this problem while trying to install
Test​::DependentModules (which requires MetaCPAN​::Client, which requires
Search​::Elasticsearch, which requires Log​::Any​::Adapter, which requires
Guard), I filed https://rt.cpan.org/Ticket/Display.html?id=96919
with Reini's patch.

@p5pRT
Copy link
Author

p5pRT commented Aug 29, 2014

From @andk

Perlpolicy says this about backwards incompatibility​:

  Generally, backward incompatible changes will have deprecation
  warnings for two release cycles before being removed

It should be noted that the compilation of Guard.xs did not produce a
warning up to v5.21.0-128. Admitted, the citation aims at user-visible
changes, but I think that by analogy one could righteously expect that
compilation of XS modules also has a deprecation cycle. Especially when
there are no pressing needs.

Are there pressing needs or is it cheap? If the latter, please consider
rewriting in a backwards compatible way.

--
andreas

@p5pRT
Copy link
Author

p5pRT commented Oct 27, 2014

From @tonycoz

On Thu Aug 28 19​:54​:52 2014, andreas.koenig.7os6VVqR@​franz.ak.mind.de wrote​:

Perlpolicy says this about backwards incompatibility​:

Generally\, backward incompatible changes will have deprecation
warnings for two release cycles before being removed

It should be noted that the compilation of Guard.xs did not produce a
warning up to v5.21.0-128. Admitted, the citation aims at user-visible
changes, but I think that by analogy one could righteously expect that
compilation of XS modules also has a deprecation cycle. Especially when
there are no pressing needs.

Are there pressing needs or is it cheap? If the latter, please consider
rewriting in a backwards compatible way.

It was documented as deprecated in 5.18.0​:

=head2 PL_sv_objcount

This interpreter-global variable used to track the total number of
Perl objects in the interpreter. It is no longer maintained and will
be removed altogether in Perl v5.20.

So it did have a deprecation cycle.

We could look at adding a mechanism for deprecating interpreter and global variables, but I'm not sure it's worth it for something we've rarely* done.

Tony

*I think

@p5pRT
Copy link
Author

p5pRT commented Oct 30, 2014

From @jkeenan

On Tue Jul 01 19​:02​:19 2014, jkeenan wrote​:

On Tue Jul 01 17​:49​:10 2014, andreas.koenig.7os6VVqR@​franz.ak.mind.de
wrote​:

Also affected​:

IBB/Acme-Damn-0.05.tar.gz |
https://rt.cpan.org/Ticket/Display.html?id=96872

I have submitted a patch for Acme-Damn at
https://rt.cpan.org/Ticket/Display.html?id=96872.

The maintainer of Acme-Damn has corrected the problem. See​: https://rt.cpan.org/Ticket/Display.html?id=96872

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Apr 6, 2015

From @rjbs

This has been fixed downstream.

It would have been nice to have a warning about this during compilation, but as Tony C. said, the cost may have been prohibitive.

This is yet more evidence that what we need is a revamped set of compatibility guarantees for the XS layer, which is very much a free-for-all where everybody gets to feel badly about any changes made.

--
rjbs

@p5pRT p5pRT closed this as completed Apr 6, 2015
@p5pRT
Copy link
Author

p5pRT commented Apr 6, 2015

@rjbs - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant