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: v5.41.6 breaks SADEGH/Crypt-Lucifer-0.1.tar.gz #22820

Open
andk opened this issue Dec 4, 2024 · 4 comments
Open

BBC: v5.41.6 breaks SADEGH/Crypt-Lucifer-0.1.tar.gz #22820

andk opened this issue Dec 4, 2024 · 4 comments
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)

Comments

@andk
Copy link
Contributor

andk commented Dec 4, 2024

Description

with v5.41.5-93-g2d859587cf tests started to fail for SADEGH/Crypt-Lucifer-0.1.tar.gz

Fail report: http://www.cpantesters.org/cpan/report/e7b0a6d0-b148-11ef-8988-c76d3be0bcf3

Bisect says:

2d859587cf4c953f5b56b278f68c0458c31f193b is the first bad commit
commit 2d859587cf4c953f5b56b278f68c0458c31f193b
Author: Karl Williamson <[email protected]>
Date:   Wed Oct 30 13:19:53 2024 -0600

    Move many SV mathoms functions to macros in sv.h
 
 embed.fnc |  63 +++++------
 embed.h   |  32 ++++++
 mathoms.c | 362 --------------------------------------------------------------
 proto.h   | 260 ++++++++++++++++++--------------------------
 sv.h      | 143 +++++++++++++++++++------
 5 files changed, 276 insertions(+), 584 deletions(-)
bisect found first bad commit

Steps to Reproduce

cpan -i SADEGH/Crypt-Lucifer-0.1.tar.gz

Expected behavior

Should compile and test OK

Perl configuration

Summary of my perl5 (revision 5 version 41 subversion 6) configuration:
  Commit id: 5ae25c7756bbd08831a5a3900da1d60b7ba2c19a
  Platform:
    osname=linux
    osvers=6.8.0-48-generic
    archname=x86_64-linux-thread-multi-ld
    uname='linux k93jammy 6.8.0-48-generic #48~22.04.1-ubuntu smp preempt_dynamic mon oct 7 11:24:13 utc 2 x86_64 x86_64 x86_64 gnulinux '
    config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.41.6/322f -Dmyhostname=k93jammy -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Dlibswanted=cl pthread socket inet nsl gdbm dbm malloc dl ld sun m crypt sec util c cposix posix ucb BSD gdbm_compat -Duseithreads -Duselongdouble -DEBUGGING=-g'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=define
    usemymalloc=n
    default_inc_excludes_dot=define
  Compiler:
    cc='cc'
    ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -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-strong -I/usr/local/include'
    ccversion=''
    gccversion='11.4.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='long double'
    nvsize=16
    Off_t='off_t'
    lseeksize=8
    alignbytes=16
    prototype=define
  Linker and Libraries:
    ld='cc'
    ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib /usr/lib64
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/x86_64-linux-gnu/libc.so.6
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.35'
  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-strong'


Characteristics of this binary (from libperl): 
  Compile-time options:
    HAS_LONG_DOUBLE
    HAS_STRTOLD
    HAS_TIMES
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_SIPHASH13
    PERL_HASH_USE_SBOX32
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_DEVEL
    PERL_USE_SAFE_PUTENV
    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_LOCALE_TIME
    USE_LONG_DOUBLE
    USE_PERLIO
    USE_PERL_ATOF
    USE_REENTRANT_API
    USE_THREAD_SAFE_LOCALE
  Built under linux
  Compiled at Nov 21 2024 13:43:49
  %ENV:
    PERL="/tmp/basesmoker-reloperl-sVcQ/bin/perl"
    PERL5LIB="/tmp/loop_over_bdir-1907146-WC_Qpf/Lingua-YaTeA-0.626-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/Lingua-YaTeA-0.626-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/HTML-Menu-TreeView-1.22-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/HTML-Menu-TreeView-1.22-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/LiquidWeb-Storm-CLI-1.03-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/LiquidWeb-Storm-CLI-1.03-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/shishi-0.0.1-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/shishi-0.0.1-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/Net-OpenVPN-DDNS-0.1-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/Net-OpenVPN-DDNS-0.1-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/AllKnowingDNS-1.7-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/AllKnowingDNS-1.7-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/Sysync-0.38-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/Sysync-0.38-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/Captive-Portal-4.10-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/Captive-Portal-4.10-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/Module-ScanDeps-Static-1.006-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/Module-ScanDeps-Static-1.006-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/Devel-Required-0.16-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/Devel-Required-0.16-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/dta-tokwrap-0.98-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/dta-tokwrap-0.98-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/CGI-Application-NetNewsIface-0.0204-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/CGI-Application-NetNewsIface-0.0204-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/App-rmcd-0.280-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/App-rmcd-0.280-0/blib/lib:/tmp/loop_over_bdir-1907146-WC_Qpf/Alien-SNMP-MIBDEV-2.020000-0/blib/arch:/tmp/loop_over_bdir-1907146-WC_Qpf/Alien-SNMP-MIBDEV-2.020000-0/blib/lib"
    PERL5OPT=""
    PERL5_CPANPLUS_IS_RUNNING="1907154"
    PERL5_CPAN_IS_RUNNING="1907154"
    PERL_CANARY_STABILITY_NOPROMPT="1"
    PERL_MM_USE_DEFAULT="1"
    PERL_USE_UNSAFE_INC="1"
  @INC:
    /tmp/loop_over_bdir-1907146-WC_Qpf/Lingua-YaTeA-0.626-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/Lingua-YaTeA-0.626-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/HTML-Menu-TreeView-1.22-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/HTML-Menu-TreeView-1.22-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/LiquidWeb-Storm-CLI-1.03-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/LiquidWeb-Storm-CLI-1.03-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/shishi-0.0.1-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/shishi-0.0.1-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/Net-OpenVPN-DDNS-0.1-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/Net-OpenVPN-DDNS-0.1-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/AllKnowingDNS-1.7-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/AllKnowingDNS-1.7-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/Sysync-0.38-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/Sysync-0.38-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/Captive-Portal-4.10-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/Captive-Portal-4.10-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/Module-ScanDeps-Static-1.006-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/Module-ScanDeps-Static-1.006-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/Devel-Required-0.16-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/Devel-Required-0.16-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/dta-tokwrap-0.98-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/dta-tokwrap-0.98-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/CGI-Application-NetNewsIface-0.0204-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/CGI-Application-NetNewsIface-0.0204-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/App-rmcd-0.280-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/App-rmcd-0.280-0/blib/lib
    /tmp/loop_over_bdir-1907146-WC_Qpf/Alien-SNMP-MIBDEV-2.020000-0/blib/arch
    /tmp/loop_over_bdir-1907146-WC_Qpf/Alien-SNMP-MIBDEV-2.020000-0/blib/lib
    /home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.41.6/322f/lib/site_perl/5.41.6/x86_64-linux-thread-multi-ld
    /home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.41.6/322f/lib/site_perl/5.41.6
    /home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.41.6/322f/lib/5.41.6/x86_64-linux-thread-multi-ld
    /home/sand/src/perl/repoperls/installed-perls/host/k93jammy/v5.41.6/322f/lib/5.41.6
    .
@andk andk added BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) Needs Triage labels Dec 4, 2024
@jkeenan
Copy link
Contributor

jkeenan commented Dec 4, 2024

Here's an excerpt of what I got trying to install Crypt-Lucifer-0.1 (released 10 years ago) on Ubuntu Linux 24.04 using gcc-13 as the compiler:

Running make for S/SA/SADEGH/Crypt-Lucifer-0.1.tar.gz
cp lib/Crypt/Lucifer.pm blib/lib/Crypt/Lucifer.pm
AutoSplitting blib/lib/Crypt/Lucifer.pm (blib/lib/auto/Crypt/Lucifer)
Running Mkbootstrap for Lucifer ()
chmod 644 "Lucifer.bs"
"/home/jkeenan/testing/blead/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Lucifer.bs blib/arch/auto/Crypt/Lucifer/Lucifer.bs 644
"/home/jkeenan/testing/blead/bin/perl" "/home/jkeenan/testing/blead/lib/perl5/5.41.7/ExtUtils/xsubpp"  -typemap '/home/jkeenan/testing/blead/lib/perl5/5.41.7/ExtUtils/typemap'  Lucifer.xs > Lucifer.xsc
Please specify prototyping behavior for Lucifer.xs (see perlxs manual)
mv Lucifer.xsc Lucifer.c
cc -c  -I. -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"0.1\" -DXS_VERSION=\"0.1\" -fPIC "-I/home/jkeenan/testing/blead/lib/perl5/5.41.7/x86_64-linux/CORE"   Lucifer.c
Lucifer.xs:22:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
   22 | _lucifer(int direction){
      | ^~~~~~~~
Lucifer.xs: In function ‘_lucifer’:
Lucifer.xs:84:9: warning: ‘return’ with no value, in function returning non-void
   84 |         return;
      |         ^~~~~~
Lucifer.xs:22:1: note: declared here
   22 | _lucifer(int direction){
      | ^~~~~~~~
Lucifer.xs: At top level:
Lucifer.xs:86:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
   86 | _setkey(char *key){
      | ^~~~~~~
Lucifer.xs:102:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  102 | _preluc(const char* input,SV* buff,int direction){
      | ^~~~~~~
In file included from /home/jkeenan/testing/blead/lib/perl5/5.41.7/x86_64-linux/CORE/perl.h:4521,
                 from Lucifer.xs:2:
Lucifer.xs: In function ‘XS_Crypt__Lucifer_luc_encrypt’:
/home/jkeenan/testing/blead/lib/perl5/5.41.7/x86_64-linux/CORE/sv.h:2235:30: warning: implicit declaration of function ‘Perl_SvPV_nolen’; did you mean ‘Perl_sv_2pv_nolen’? [-Wimplicit-function-declaration]
 2235 | #define Perl_sv_pv(mTHX, sv) Perl_SvPV_nolen(aTHX_ sv)
      |                              ^~~~~~~~~~~~~~~
/home/jkeenan/testing/blead/lib/perl5/5.41.7/x86_64-linux/CORE/embed.h:767:49: note: in expansion of macro ‘Perl_sv_pv’
  767 | # define sv_pv(a)                               Perl_sv_pv(aTHX,a)
      |                                                 ^~~~~~~~~~
Lucifer.xs:162:17: note: in expansion of macro ‘sv_pv’
  162 |         _preluc(sv_pv(input),RETVAL,ENCIPHER);
      |                 ^~~~~
/home/jkeenan/testing/blead/lib/perl5/5.41.7/x86_64-linux/CORE/sv.h:2235:30: warning: passing argument 1 of ‘_preluc’ makes pointer from integer without a cast [-Wint-conversion]
 2235 | #define Perl_sv_pv(mTHX, sv) Perl_SvPV_nolen(aTHX_ sv)
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              int
/home/jkeenan/testing/blead/lib/perl5/5.41.7/x86_64-linux/CORE/embed.h:767:49: note: in expansion of macro ‘Perl_sv_pv’
  767 | # define sv_pv(a)                               Perl_sv_pv(aTHX,a)
      |                                                 ^~~~~~~~~~
Lucifer.xs:162:17: note: in expansion of macro ‘sv_pv’
  162 |         _preluc(sv_pv(input),RETVAL,ENCIPHER);
      |                 ^~~~~
Lucifer.xs:102:21: note: expected ‘const char *’ but argument is of type ‘int’
  102 | _preluc(const char* input,SV* buff,int direction){
      |         ~~~~~~~~~~~~^~~~~
Lucifer.xs: In function ‘XS_Crypt__Lucifer_luc_decrypt’:
/home/jkeenan/testing/blead/lib/perl5/5.41.7/x86_64-linux/CORE/sv.h:2235:30: warning: passing argument 1 of ‘_preluc’ makes pointer from integer without a cast [-Wint-conversion]
 2235 | #define Perl_sv_pv(mTHX, sv) Perl_SvPV_nolen(aTHX_ sv)
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              int
/home/jkeenan/testing/blead/lib/perl5/5.41.7/x86_64-linux/CORE/embed.h:767:49: note: in expansion of macro ‘Perl_sv_pv’
  767 | # define sv_pv(a)                               Perl_sv_pv(aTHX,a)
      |                                                 ^~~~~~~~~~
Lucifer.xs:171:17: note: in expansion of macro ‘sv_pv’
  171 |         _preluc(sv_pv(input),RETVAL,DECIPHER);
      |                 ^~~~~
Lucifer.xs:102:21: note: expected ‘const char *’ but argument is of type ‘int’
  102 | _preluc(const char* input,SV* buff,int direction){
      |         ~~~~~~~~~~~~^~~~~
rm -f blib/arch/auto/Crypt/Lucifer/Lucifer.so
cc  -shared -O2 -L/usr/local/lib -fstack-protector-strong  Lucifer.o  -o blib/arch/auto/Crypt/Lucifer/Lucifer.so  \
      \
  
chmod 755 blib/arch/auto/Crypt/Lucifer/Lucifer.so
  SADEGH/Crypt-Lucifer-0.1.tar.gz
  /usr/bin/make -- OK
The current configuration of allow_installing_outdated_dists is 'ask/no', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effect
Running make test for SADEGH/Crypt-Lucifer-0.1.tar.gz
"/home/jkeenan/testing/blead/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Lucifer.bs blib/arch/auto/Crypt/Lucifer/Lucifer.bs 644
PERL_DL_NONLAZY=1 "/home/jkeenan/testing/blead/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Crypt-Lucifer.t .. 1/1 
#   Failed test 'use Crypt::Lucifer;'
#   at t/Crypt-Lucifer.t line 4.
#     Tried to use 'Crypt::Lucifer'.
#     Error:  Can't load '/home/jkeenan/.cpan/build/Crypt-Lucifer-0.1-0/blib/arch/auto/Crypt/Lucifer/Lucifer.so' for module Crypt::Lucifer: /home/jkeenan/.cpan/build/Crypt-Lucifer-0.1-0/blib/arch/auto/Crypt/Lucifer/Lucifer.so: undefined symbol: Perl_SvPV_nolen at /home/jkeenan/testing/blead/lib/perl5/5.41.7/x86_64-linux/DynaLoader.pm line 206.
#  at t/Crypt-Lucifer.t line 4.
# Compilation failed in require at t/Crypt-Lucifer.t line 4.
# BEGIN failed--compilation aborted at t/Crypt-Lucifer.t line 4.
# Looks like you failed 1 test of 1.
t/Crypt-Lucifer.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests 

Test Summary Report
-------------------
t/Crypt-Lucifer.t (Wstat: 256 (exited 1) Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=1, Tests=1,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.02 cusr  0.00 csys =  0.03 CPU)
Result: FAIL
Failed 1/1 test programs. 1/1 subtests failed.
make: *** [Makefile:1026: test_dynamic] Error 1
  SADEGH/Crypt-Lucifer-0.1.tar.gz

So we stagger through the compilation with a lot of warnings but do manage to complete make. The object, however, is defective. @khwilliamson, can you take a look?

@jkeenan
Copy link
Contributor

jkeenan commented Dec 4, 2024

On the same machine as above, I tried to install Crypt::Lucifer against perl-5.40.0. There, make ran with fewer build-time warnings (and the test suite PASSed).

Please specify prototyping behavior for Lucifer.xs (see perlxs manual)
mv Lucifer.xsc Lucifer.c
cc -c  -I. -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"0.1\" -DXS_VERSION=\"0.1\" -fPIC "-I/home/jkeenan/perl5/perlbrew/perls/perl-5.40.0/lib/5.40.0/x86_64-linux/CORE"   Lucifer.c
Lucifer.xs:22:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
   22 | _lucifer(int direction){
      | ^~~~~~~~
Lucifer.xs: In function ‘_lucifer’:
Lucifer.xs:84:9: warning: ‘return’ with no value, in function returning non-void
   84 |         return;
      |         ^~~~~~
Lucifer.xs:22:1: note: declared here
   22 | _lucifer(int direction){
      | ^~~~~~~~
Lucifer.xs: At top level:
Lucifer.xs:86:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
   86 | _setkey(char *key){
      | ^~~~~~~
Lucifer.xs:102:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  102 | _preluc(const char* input,SV* buff,int direction){
      | ^~~~~~~
rm -f blib/arch/auto/Crypt/Lucifer/Lucifer.so
cc  -shared -O2 -L/usr/local/lib -fstack-protector-strong  Lucifer.o  -o blib/arch/auto/Crypt/Lucifer/Lucifer.so  \
      \
  
chmod 755 blib/arch/auto/Crypt/Lucifer/Lucifer.so

@sisyphus
Copy link
Contributor

sisyphus commented Dec 5, 2024

A simple Inline::C demo of the issue:

use strict;
use warnings;

use Inline C => Config =>
  BUILD_NOISY => 1,
;

use Inline C =><<'EOC';

void foo(SV * in) {
   sv_pv(in);
}

EOC

foo('hello');
print "All Done\n";

On perl-5.41.5, this script builds cleanly and then outputs "All Done".
On perl-5.41.6, it fails to build, and produces the following compilation error:

In file included from D:\perl-5.41.6-1420-ucrt-mcf\lib\MSWin32-x64-multi-thread\CORE/perl.h:4521,
                 from sv_pv_pl_c997df.xs:2:
sv_pv_pl_c997df.xs: In function 'foo':
D:\perl-5.41.6-1420-ucrt-mcf\lib\MSWin32-x64-multi-thread\CORE/sv.h:2235:30: error: implicit declaration of function 'Perl_SvPV_nolen'; did you mean 'Perl_sv_2pv_nolen'? [-Wimplicit-function-declaration]
 2235 | #define Perl_sv_pv(mTHX, sv) Perl_SvPV_nolen(aTHX_ sv)
      |                              ^~~~~~~~~~~~~~~
D:\perl-5.41.6-1420-ucrt-mcf\lib\MSWin32-x64-multi-thread\CORE/embed.h:765:49: note: in expansion of macro 'Perl_sv_pv'
  765 | # define sv_pv(a)                               Perl_sv_pv(aTHX,a)
      |                                                 ^~~~~~~~~~
sv_pv_pl_c997df.xs:7:4: note: in expansion of macro 'sv_pv'
    7 |    sv_pv(in);
      |    ^~~~~
gmake: *** [makefile:333: sv_pv_pl_c997df.o] Error 1

Update : I probably should have provided the info that gcc-14.2 was being used in both 5.41.5 and 5.41.6.

If I suppress the "implicit function declaration" warning (which is fatal under gcc-14) then the error with the perl-5.41.6 build changes to:

C:/winlibs-ucrt-1420/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: sv_pv_pl_c997df.o:sv_pv_pl_c997d:(.text+0x1a): undefined reference to `Perl_SvPV_nolen'
collect2.exe: error: ld returned 1 exit status
gmake: *** [makefile:474: blib\arch\auto\sv_pv_pl_c997df\sv_pv_pl_c997df.dll] Error 1

@Leont
Copy link
Contributor

Leont commented Dec 5, 2024

TBH several things about that commit look wrong to me. The assumption that a Perl_SvPV_nolen exists is just one of them. I'm not sure what the intention was with the mTHX, and the sv_pvbyte has a space that should be an underscore.

AFAICT, this really should be:

#define sv_pv SvPV_nolen

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

4 participants