hideo55 / Module-Build-XSUtil

A Module::Build class for building XS modules
Other
6 stars 8 forks source link

01_build.t: ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xd600000, needed 0xd880000) #12

Open powerman opened 6 years ago

powerman commented 6 years ago
# cpanm -v Module::Build::XSUtil
…
Checking dependencies from MYMETA.json ...
Checking if you have XSLoader 0 ... Yes (0.27)
Checking if you have ExtUtils::CBuilder 0 ... Yes (0.280225)
Checking if you have File::Basename 0 ... Yes (2.85)
Checking if you have Test::More 0.98 ... Yes (1.302135)
Checking if you have Exporter 0 ... Yes (5.72)
Checking if you have Capture::Tiny 0 ... Yes (0.46)
Checking if you have Devel::CheckCompiler 0 ... Yes (0.07)
Checking if you have File::Spec::Functions 0 ... Yes (3.67)
Checking if you have Devel::PPPort 0 ... Yes (3.35)
Checking if you have File::Copy::Recursive 0 ... Yes (0.40)
Checking if you have File::Path 0 ... Yes (2.15)
Checking if you have File::Temp 0 ... Yes (0.2304)
Checking if you have Cwd::Guard 0 ... Yes (0.05)
Checking if you have parent 0 ... Yes (0.236)
Building and testing Module-Build-XSUtil-0.18 ... Building Module-Build-XSUtil
t/00_compile.t .. ok   
t/01_build.t .... 1/? # ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xd600000, needed 0xd880000)
# ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xd600000, needed 0xd880000)

#   Failed test at t/01_build.t line 19.
#                   ''
#     doesn't match '(?^:Result\:\s*PASS)'
# Looks like you failed 1 test of 2.
t/01_build.t .... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests 

Test Summary Report
-------------------
t/01_build.t  (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=2, Tests=3,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.33 cusr  0.06 csys =  0.40 CPU)
Result: FAIL
Failed 1/2 test programs. 1/3 subtests failed.
FAIL

BTW, the eg/Foo tests are pass when running on it's own:

# cpanm --look Module::Build::XSUtil
--> Working on Module::Build::XSUtil
Fetching http://www.cpan.org/authors/id/H/HI/HIDEAKIO/Module-Build-XSUtil-0.18.tar.gz ... OK
Entering /root/.cpanm/work/1522854496.18304/Module-Build-XSUtil-0.18 with /bin/zsh
# cd eg/Foo
# perl Build.PL && ./Build test
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Foo' version '0.18'
Error: No OUTPUT definition for type 'const char *', typekind 'tT_PV' found in Foo.xs, line 21
Error: No OUTPUT definition for type 'const char *', typekind 'tT_PV' found in Foo.xs, line 28
x86_64-pc-linux-gnu-gcc -I/usr/lib64/perl5/5.26.1/x86_64-linux/CORE -DVERSION="0.18" -DXS_VERSION="0.18" -fPIC -Wall -Wextra -Wdeclaration-after-statement -Wc++-compat -c -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=native -O2 -pipe -o lib/Foo.o lib/Foo.c
lib/Foo.c: In function 'XS_Foo_xs_version':
lib/Foo.c:187:15: warning: variable 'RETVAL' set but not used [-Wunused-but-set-variable]
  const char * RETVAL;
               ^~~~~~
lib/Foo.c: In function 'XS_Foo_version':
lib/Foo.c:203:15: warning: variable 'RETVAL' set but not used [-Wunused-but-set-variable]
  const char * RETVAL;
               ^~~~~~
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Foo/Foo.bs')
x86_64-pc-linux-gnu-gcc -shared -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed -o blib/arch/auto/Foo/Foo.so lib/Foo.o
t/basic.t .. ok   
All tests successful.
Files=1, Tests=2,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.04 cusr  0.01 csys =  0.06 CPU)
Result: PASS
powerman commented 6 years ago

Just in case, gcc -v:

Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/6.4.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/6.4.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-6.4.0-r1/work/gcc-6.4.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/6.4.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/6.4.0/python --enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 6.4.0-r1 p1.3' --enable-esp --enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --enable-vtable-verify --enable-libvtv --disable-libquadmath --enable-lto --without-isl --disable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 6.4.0 (Gentoo Hardened 6.4.0-r1 p1.3) 

and perl -V:

Summary of my perl5 (revision 5 version 26 subversion 1) configuration:

  Platform:
    osname=linux
    osvers=4.9.74-unofficial+grsec
    archname=x86_64-linux
    uname='linux home 4.9.74-unofficial+grsec #9 smp preempt fri jan 19 09:32:26 eet 2018 x86_64 intel(r) core(tm) i7-2600k cpu @ 3.40ghz genuineintel gnulinux '
    config_args='-des -Dinstallprefix=/usr -Dinstallusrbinperl=n -Ui_xlocale -Di_ndbm -Di_gdbm -Di_db -DDEBUGGING=none -Dinc_version_list=5.24.2 5.24.1 5.24.0 5.22.2 5.22.0 5.20.2  -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dnoextensions=ODBM_File -Duseshrplib -Darchname=x86_64-linux -Dcc=x86_64-pc-linux-gnu-gcc -Doptimize=-march=native -O2 -pipe -Dldflags=-Wl,-O1 -Wl,--as-needed -Dprefix=/usr -Dsiteprefix=/usr/local -Dvendorprefix=/usr -Dscriptdir=/usr/bin -Dprivlib=/usr/lib64/perl5/5.26.1 -Darchlib=/usr/lib64/perl5/5.26.1/x86_64-linux -Dsitelib=/usr/local/lib64/perl5/5.26.1 -Dsitearch=/usr/local/lib64/perl5/5.26.1/x86_64-linux -Dvendorlib=/usr/lib64/perl5/vendor_perl/5.26.1 -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.26.1/x86_64-linux -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dvendorman1dir=/usr/share/man/man1 -Dvendorman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dlibperl=libperl.so.5.26.1 -Dlocincpth=/usr/include  -Dglibpth=/lib64 /usr/lib64  -Duselargefiles -Dd_semctl_semun -Dcf_by=Gentoo -Dmyhostname=localhost -Dperladmin=root@localhost -Ud_csh -Dsh=/bin/sh -Dtargetsh=/bin/sh -Uusenm -Ui_xlocale -Di_ndbm -Di_gdbm -Di_db -DDEBUGGING=none -Dinc_version_list=5.24.2 5.24.1 5.24.0 5.22.2 5.22.0 5.20.2  -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dnoextensions=ODBM_File'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='x86_64-pc-linux-gnu-gcc'
    ccflags ='-fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    optimize='-march=native -O2 -pipe'
    cppflags='-fwrapv -fno-strict-aliasing -pipe'
    ccversion=''
    gccversion='6.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='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='x86_64-pc-linux-gnu-gcc'
    ldflags ='-Wl,-O1 -Wl,--as-needed'
    libpth=/usr/local/lib64 /lib64 /usr/lib64 /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include-fixed /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib
    libs=-lpthread -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.25.so
    so=so
    useshrplib=true
    libperl=libperl.so.5.26.1
    gnulibc_version='2.25'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed'

Characteristics of this binary (from libperl): 
  Compile-time options:
    HAS_TIMES
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
  Locally applied patches:
    gentoo/hints_hpux - Fix hpux hints
    gentoo/aix_soname - aix gcc detection and shared library soname support
    gentoo/EUMM-RUNPATH - https://bugs.gentoo.org/105054 cpan/ExtUtils-MakeMaker: drop $PORTAGE_TMPDIR from LD_RUN_PATH
    gentoo/config_over - Remove -rpath and append LDFLAGS to lddlflags
    gentoo/opensolaris_headers - Add headers for opensolaris
    gentoo/patchlevel - List packaged patches for perl-5.26.1-r2(#1) in patchlevel.h
    gentoo/cleanup-paths - Cleanup PATH and shrpenv
    gentoo/enc2xs - Tweak enc2xs to follow symlinks and ignore missing @INC directories.
    gentoo/darwin-cc-ld - https://bugs.gentoo.org/297751 darwin: Use $CC to link
    gentoo/cpan_definstalldirs - Provide a sensible INSTALLDIRS default for modules installed from CPAN.
    gentoo/interix - Fix interix hints
    gentoo/create_libperl_soname - https://bugs.gentoo.org/286840 Set libperl soname
    gentoo/mod_paths - Add /etc/perl to @INC
    gentoo/EUMM_perllocalpod - cpan/ExtUtils-MakeMaker: remove targets that generate perllocal.pod
    gentoo/drop_fstack_protector - https://bugs.gentoo.org/348557 Don't force -fstack-protector on everyone
    gentoo/usr_local - Configure: Don't include sources in /usr/local/ for compiling perl
    gentoo/D-SHA-CFLAGS - https://bugs.gentoo.org/506818 Do not set custom CFLAGS in cpan/Digest-SHA
    gentoo/io_socket_ip_tests - cpan/IO-Socket-IP: Disable network tests
    gentoo/tests - Fix EUMM podlocal tests
    debian/cpan-missing-site-dirs - Fix CPAN::FirstTime defaults with nonexisting site dirs if a parent is writable
    debian/makemaker-pasthru - Pass LD settings through to subdirectories
    fixes/memoize_storable_nstore - [rt.cpan.org #77790] Memoize::Storable: respect 'nstore' option not respected
    fixes/podman-pipe - Better errors for man pages from standard input
    fixes/respect_umask - Respect umask during installation
    fixes/net_smtp_docs - [rt.cpan.org #36038] Document the Net::SMTP 'Port' option
    fixes/document_makemaker_ccflags - [rt.cpan.org #68613] Document that CCFLAGS should include $Config{ccflags}
    fixes/parallel-manisort.patch - Fix parallel building
  Built under linux
  Compiled at Feb 24 2018 12:25:14
  %ENV:
    PERLDOC="-otext"
  @INC:
    /etc/perl
    /usr/local/lib64/perl5/5.26.1/x86_64-linux
    /usr/local/lib64/perl5/5.26.1
    /usr/lib64/perl5/vendor_perl/5.26.1/x86_64-linux
    /usr/lib64/perl5/vendor_perl/5.26.1
    /usr/local/lib64/perl5/5.24.2
    /usr/local/lib64/perl5/5.24.1
    /usr/local/lib64/perl5/5.24.0
    /usr/local/lib64/perl5
    /usr/lib64/perl5/vendor_perl/5.24.0
    /usr/lib64/perl5/vendor_perl/5.22.0
    /usr/lib64/perl5/vendor_perl/5.20.2
    /usr/lib64/perl5/vendor_perl
    /usr/lib64/perl5/5.26.1/x86_64-linux
    /usr/lib64/perl5/5.26.1