Skip to content

ExtUtils-ParseXS-3.44: xsubpp seems to output false-positive warnings #19661

@twata1

Description

@twata1

Module:
ExtUtils-ParseXS-3.44

Description

Hello,

The following link is the background.

DBD-MariaDB-1.22: Build warnings

As shown below, the xsubpp command outputs warnings when I run the gmake command.
According to perl5-dbi/DBD-MariaDB#169 (comment) here, it seems to be a false positive warnings.

Warning: duplicate function definition 'do' detected in MariaDB.xs, line 104
Warning: duplicate function definition 'rows' detected in MariaDB.xs, line 229
Warning: duplicate function definition 'last_insert_id' detected in MariaDB.xs, line 248

Steps to Reproduce

  1. Start the mysqld in advance for testing.
C:\mysql\bin>mysqld --defaults-file="..\my.ini" --console
  1. Install ExtUtils::ParseXS 3.44 beforehand. (The following command confirms ExtUtils::ParseXS 's version.)
C:\home\sunlight2\DBD-MariaDB-1.22>module-version ExtUtils::ParseXS

The version of ExtUtils::ParseXS in C:\home\sunlight2\perl5\lib\perl5 is 3.44
  1. Download DBD-MariaDB-1.22.tar.gz from metacpan and extract it and run make Makefile.PL and gmake.
C:\home\sunlight2\DBD-MariaDB-1.22>perl Makefile.PL


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'root' can connect to your MariaDB or MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

I will use the following settings for compiling and testing:

  cflags       (mysql_config) = -IC:\Strawberry\c\bin\..\include\mysql50716
  libs         (mysql_config) = -LC:\Strawberry\c\bin\..\lib -lmysql
  mysql_config (guessed     ) = mysql_config
  testdb       (default     ) = test
  testhost     (default     ) =
  testpassword (default     ) =
  testport     (default     ) =
  testsocket   (default     ) =
  testuser     (guessed     ) = root

To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::MariaDB::INSTALL'.

Checking if libs and header files are available for compiling...
Checking if correct version of MariaDB or MySQL client is present...
Looks good.

Embedded server: not supported by client library

Client library deinitialize OpenSSL library functions: no

Checking if your kit is complete...
Looks good
WARNING: Older versions of ExtUtils::MakeMaker may errantly install README.pod as part of this distribution. It is recom
mended to avoid using this path in CPAN modules.
Using DBI 1.643 (for perl 5.030002 on MSWin32-x64-multi-thread) installed in C:/Strawberry/perl/vendor/lib/auto/DBI/
Generating a gmake-style Makefile
Writing Makefile for DBD::MariaDB
"\x{0159}" does not map to cp932 at C:\home\sunlight2\perl5\lib\perl5/ExtUtils/MakeMaker.pm line 1266.
"\x{0159}" does not map to cp932 at C:\home\sunlight2\perl5\lib\perl5/ExtUtils/MakeMaker.pm line 1266.
"\x{0159}" does not map to cp932 at C:\home\sunlight2\perl5\lib\perl5/ExtUtils/MakeMaker.pm line 1266.
Writing MYMETA.yml and MYMETA.json

C:\home\sunlight2\DBD-MariaDB-1.22>gmake
cp lib/DBD/MariaDB.pod blib\lib/DBD/MariaDB.pod
cp lib/DBD/MariaDB/INSTALL.pod blib\lib/DBD/MariaDB/INSTALL.pod
cp lib/DBD/MariaDB.pm blib\lib/DBD/MariaDB.pm
cp README.pod blib\lib/DBD/MariaDB/README.pod
Running Mkbootstrap for MariaDB ()
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "MariaDB.bs"
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- MariaDB.bs blib\arch\auto\DBD\MariaDB\MariaDB.bs 644
"C:\Strawberry\perl\bin\perl.exe" -p -e "s/~DRIVER~/MariaDB/g" C:\Strawberry\perl\vendor\lib\auto\DBI\Driver.xst > MariaDB.xsi
"C:\Strawberry\perl\bin\perl.exe" "C:\home\sunlight2\perl5\lib\perl5\ExtUtils/xsubpp"  -typemap C:\Strawberry\perl\lib\ExtUtils\typemap  MariaDB.xs > MariaDB.xsc
Warning: duplicate function definition 'do' detected in MariaDB.xs, line 104
Warning: duplicate function definition 'rows' detected in MariaDB.xs, line 229
Warning: duplicate function definition 'last_insert_id' detected in MariaDB.xs, line 248
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv -- MariaDB.xsc MariaDB.c
gcc -c  -IC:\Strawberry\perl\vendor\lib\auto\DBI -IC:\Strawberry\c\bin\..\include\mysql50716 -DHAVE_DBI_1_634 -DHAVE_DBI_1_642 -DHAVE_GET_OPTION -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2   -DVERSION=\"1.22\" -DXS_VERSION=\"1.22\"  "-IC:\Strawberry\perl\lib\CORE"   MariaDB.c
gcc -c  -IC:\Strawberry\perl\vendor\lib\auto\DBI -IC:\Strawberry\c\bin\..\include\mysql50716 -DHAVE_DBI_1_634 -DHAVE_DBI_1_642 -DHAVE_GET_OPTION -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2   -DVERSION=\"1.22\" -DXS_VERSION=\"1.22\"  "-IC:\Strawberry\perl\lib\CORE"   dbdimp.c
gcc -c  -IC:\Strawberry\perl\vendor\lib\auto\DBI -IC:\Strawberry\c\bin\..\include\mysql50716 -DHAVE_DBI_1_634 -DHAVE_DBI_1_642 -DHAVE_GET_OPTION -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2   -DVERSION=\"1.22\" -DXS_VERSION=\"1.22\"  "-IC:\Strawberry\perl\lib\CORE"   socket.c
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \
     -e "Mksymlists('NAME'=>\"DBD::MariaDB\", 'DLBASE' => 'MariaDB', 'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' =>{  }, 'DL_VARS' => []);"
g++ MariaDB.def -o blib\arch\auto\DBD\MariaDB\MariaDB.xs.dll -mdll -s -L"c:\Strawberry\perl\lib\CORE" -L"c:\Strawberry\c\lib" MariaDB.o dbdimp.o socket.o   "C:\Strawberry\perl\lib\CORE\libperl530.a" "C:\Strawberry\c\bin\..\lib\libmysql.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libmoldname.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libkernel32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libuser32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libgdi32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libwinspool.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libadvapi32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libshell32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libole32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\liboleaut32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libnetapi32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libuuid.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libws2_32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libmpr.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libwinmm.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libversion.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libodbc32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libodbccp32.a" "c:\Strawberry\c\x86_64-w64-mingw32\lib\libcomctl32.a" -Wl,--enable-auto-image-base
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 blib\arch\auto\DBD\MariaDB\MariaDB.xs.dll

C:\home\sunlight2\DBD-MariaDB-1.22>

Expected behavior

These warnings (Warning: duplicate function definition ...) are not output.

Perl configuration

C:\home\sunlight2\DBD-MariaDB-1.22>perl -V
Summary of my perl5 (revision 5 version 30 subversion 2) configuration:

  Platform:
    osname=MSWin32
    osvers=10.0.18363.720
    archname=MSWin32-x64-multi-thread
    uname='Win32 strawberry-perl 5.30.2.1 #1 Tue Mar 17 03:21:32 2020 x64'
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='gcc'
    ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CO
NTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields'
    optimize='-s -O2'
    cppflags='-DWIN32'
    ccversion=''
    gccversion='8.3.0'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='long long'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags ='-s -L"c:\Strawberry\perl\lib\CORE" -L"c:\Strawberry\c\lib"'
    libpth=c:\Strawberry\c\lib c:\Strawberry\c\x86_64-w64-mingw32\lib c:\Strawberry\c\lib\gcc\x86_64-w64-mingw32\8.3.0
    libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=
    so=dll
    useshrplib=true
    libperl=libperl530.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=xs.dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-mdll -s -L"c:\Strawberry\perl\lib\CORE" -L"c:\Strawberry\c\lib"'


Characteristics of this binary (from libperl):
  Compile-time options:
    HAS_TIMES
    HAVE_INTERP_INTERN
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_IMPLICIT_CONTEXT
    PERL_IMPLICIT_SYS
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
  Built under MSWin32
  Compiled at Mar 17 2020 03:27:53
  %ENV:
    PERL5LIB="C:\home\sunlight2\perl5\lib\perl5"
    PERL_LOCAL_LIB_ROOT="C:\home\sunlight2\perl5"
    PERL_MB_OPT="--install_base "C:\\home\\sunlight2\\perl5""
    PERL_MM_OPT="INSTALL_BASE=C:\\home\\sunlight2\\perl5"
  @INC:
    C:\home\sunlight2\perl5\lib\perl5/MSWin32-x64-multi-thread
    C:\home\sunlight2\perl5\lib\perl5
    C:/Strawberry/perl/site/lib
    C:/Strawberry/perl/vendor/lib
    C:/Strawberry/perl/lib

C:\home\sunlight2\DBD-MariaDB-1.22>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions