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

BBC: Blead Breaks Syntax::Keyword::Try #18233

Closed
cjg-cguevara opened this issue Oct 11, 2020 · 7 comments
Closed

BBC: Blead Breaks Syntax::Keyword::Try #18233

cjg-cguevara opened this issue Oct 11, 2020 · 7 comments
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)

Comments

@cjg-cguevara
Copy link

This is a bug report for perl from "Carlos Guevara" carlos@carlosguevara.com,
generated with the help of perlbug 1.42 running under perl 5.33.3.


[Please describe your issue here]

BBC: Blead Breaks Syntax::Keyword::Try

Please see http://fast-matrix.cpantesters.org/?dist=Syntax-Keyword-Try

[Please do not change anything below this line]


Flags:
category=core
severity=low

Site configuration information for perl 5.33.3:

Configured by cpan at Sat Oct 10 22:40:01 EDT 2020.

Summary of my perl5 (revision 5 version 33 subversion 3) configuration:
Commit id: 6fcc978
Platform:
osname=linux
osvers=5.4.43-1-lts
archname=x86_64-linux
uname='linux cjg-alpine3 5.4.43-1-lts #2-alpine smp thu, 28 may 2020 20:13:48 utc x86_64 linux '
config_args='-des -Dprefix=/bin/perl-blead -Dscriptdir=/bin/perl-blead/bin -Dusedevel -Duse64bitall'
hint=recommended
useposix=true
d_sigaction=define
useithreads=undef
usemultiplicity=undef
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='cc'
ccflags ='-D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
optimize='-O2'
cppflags='-D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong'
ccversion=''
gccversion='9.3.0'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
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-strong -L/usr/local/lib'
libpth=/usr/include/fortify /usr/lib /usr/local/lib /lib/../lib /usr/lib/../lib /lib
libs=-lpthread -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
libc=/usr/lib/libc.a
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'


@inc for perl 5.33.3:
/home/cpan/bin/perl-blead/lib/site_perl/5.33.3/x86_64-linux
/home/cpan/bin/perl-blead/lib/site_perl/5.33.3
/home/cpan/bin/perl-blead/lib/5.33.3/x86_64-linux
/home/cpan/bin/perl-blead/lib/5.33.3


Environment for perl 5.33.3:
HOME=/home/cpan
LANG=C.UTF-8
LANGUAGE (unset)
LC_ALL=C
LC_COLLATE=C
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/cpan/bin/perl-blead/bin:/home/cpan/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PERL_BADLANG (unset)
SHELL=/bin/bash

@hvds
Copy link
Contributor

hvds commented Oct 12, 2020

This is because of the renaming of macro Off to Perl_Warn_Off_ in 6f17df9. @khwilliamson are you quite sure this is an internal macro? @leonerd is it trivial to update this?

Error:  Can't load '.../Syntax-Keyword-Try-0.18-0/blib/arch/auto/Syntax/Keyword/Try/Try.so'
for module Syntax::Keyword::Try: Error relocating
.../Syntax-Keyword-Try-0.18-0/blib/arch/auto/Syntax/Keyword/Try/Try.so:
Off: symbol not found at .../perl-blead/lib/5.33.3/x86_64-linux/DynaLoader.pm line 193.

@jkeenan
Copy link
Contributor

jkeenan commented Oct 12, 2020

This is a bug report for perl from "Carlos Guevara" carlos@carlosguevara.com,
generated with the help of perlbug 1.42 running under perl 5.33.3.

[Please describe your issue here]

BBC: Blead Breaks Syntax::Keyword::Try

Please see http://fast-matrix.cpantesters.org/?dist=Syntax-Keyword-Try

Bisection points to this commit:

6f17df98e8527068a9b9b55caf1492a90a9ac340 is the first bad commit
commit 6f17df98e8527068a9b9b55caf1492a90a9ac340
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Oct 7 18:27:05 2020 -0600

    Rename internal macros in warnings.h
    
    This header defines 3 macros that are visible to XS code, but not for
    direct use of that code (they are not API).  At least two of them are
    so short and generic that they could quite possibly conflict with
    symbols in that code 'Bit' and 'Off'.  The third is somewhat less
    likely, 'IsSet', but not great.
    
    Rename them so that they contain 'Perl', so don't pollute the XS
    namespace.

@khwilliamson, can you take a look?

Thank you very much.
Jim Keenan

@karenetheridge karenetheridge added the BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) label Nov 21, 2020
@khwilliamson
Copy link
Contributor

Even if it were something that should be publicly accessible, the name is too short and generic, so needs to change to avoid polluting XS namespace

@leonerd
Copy link
Contributor

leonerd commented Nov 23, 2020

I'll fix that in S-K-T.

@leonerd
Copy link
Contributor

leonerd commented Nov 23, 2020

Trivial just to inline them and avoid the macros:

--- old/lib/Syntax/Keyword/Try.xs       2020-11-23 12:54:21 +0000
+++ new/lib/Syntax/Keyword/Try.xs       2020-11-23 16:20:54 +0000
@@ -212,7 +212,7 @@
   ((COP *)op)->cop_warnings = warnings;
 
   warning_bits = (char *)(warnings + 1);
-  warning_bits[Off(2*WARN_EXITING)] &= ~Bit(2*WARN_EXITING);
+  warning_bits[(2*WARN_EXITING) / 8] &= ~(1 << (2*WARN_EXITING % 8));
 
   return op;
 }

@leonerd
Copy link
Contributor

leonerd commented Nov 24, 2020

Upstream fixed in

CPAN Upload: Syntax-Keyword-Try-0.19 by PEVANS https://metacpan.org/release/PEVANS/Syntax-Keyword-Try-0.19

@jkeenan
Copy link
Contributor

jkeenan commented Dec 24, 2020

Upstream fixed in

CPAN Upload: Syntax-Keyword-Try-0.19 by PEVANS https://metacpan.org/release/PEVANS/Syntax-Keyword-Try-0.19

And it builds successfully against perl-5.33.5.

$ cd v5.33.5
$ ./bin/cpanm Syntax::Keyword::Try
--> Working on Syntax::Keyword::Try
Fetching http://www.cpan.org/authors/id/P/PE/PEVANS/Syntax-Keyword-Try-0.20.tar.gz ... OK
==> Found dependencies: Module::Build
--> Working on Module::Build
Fetching http://www.cpan.org/authors/id/L/LE/LEONT/Module-Build-0.4231.tar.gz ... OK
Configuring Module-Build-0.4231 ... OK
Building and testing Module-Build-0.4231 ... OK
Successfully installed Module-Build-0.4231
Configuring Syntax-Keyword-Try-0.20 ... OK
Building and testing Syntax-Keyword-Try-0.20 ... OK
Successfully installed Syntax-Keyword-Try-0.20
2 distributions installed

Closing ticket.

Thank you very much.
Jim Keenan

@jkeenan jkeenan closed this as completed Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)
Projects
None yet
Development

No branches or pull requests

6 participants