Skip Menu |

This queue is for tickets about the Cache-Memcached-GetParserXS CPAN distribution.

Report information
The Basics
Id: 121384
Status: open
Priority: 0/
Queue: Cache-Memcached-GetParserXS

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.01
Fixed in: (no value)



Subject: undefined symbol: get_dest
The test suite fails on some of my smoker systems (debian/stretch, Ubuntu 16.04, freebsd 10.3): ... # Failed test 'use Cache::Memcached::GetParserXS;' # at t/Cache-Memcached-GetParserXS.t line 4. # Tried to use 'Cache::Memcached::GetParserXS'. # Error: Can't load '/home/cpansand/.cpan/build/2017042521/Cache-Memcached-GetParserXS-0.01-0/blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.so' for module Cache::Memcached::GetParserXS: /home/cpansand/.cpan/build/2017042521/Cache-Memcached-GetParserXS-0.01-0/blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.so: undefined symbol: get_dest at /opt/perl-5.25.12/lib/5.25.12/x86_64-linux/DynaLoader.pm line 193. # # Compilation failed in require at t/Cache-Memcached-GetParserXS.t line 4. # BEGIN failed--compilation aborted at t/Cache-Memcached-GetParserXS.t line 4. &Cache::Memcached::GetParserXS::constant not defined at t/Cache-Memcached-GetParserXS.t line 34. # Looks like your test exited with 255 just after 1. t/Cache-Memcached-GetParserXS.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 6/6 subtests ... This works fine on older systems e.g. debian/jessie.
Same, Ubuntu 18.04.1, perl 5.26.1 cpanm (App::cpanminus) 1.7043 on perl 5.026001 built for x86_64-linux-gnu-thread-multi Work directory is /home/nicolas/.cpanm/work/1547554824.19462 You have make /usr/bin/make You have LWP 6.31 You have /bin/tar: tar (GNU tar) 1.29 Copyright © 2015 Free Software Foundation, Inc. Lisens GPLv3+: GNU GPL versjon 3 eller senere <http://gnu.org/licenses/gpl.html>. Dette er fri programvare. Du står fritt til å endre og dele den videre. Det stilles INGEN GARANTI, i den grad dette tillates innenfor gjeldende lovverk. Skrevet av John Gilmore og Jay Fenlason. You have /usr/bin/unzip Searching Cache::Memcached::GetParserXS () on cpanmetadb ... --> Working on Cache::Memcached::GetParserXS Fetching http://www.cpan.org/authors/id/H/HA/HACHI/Cache-Memcached-GetParserXS-0.01.tar.gz -> OK Unpacking Cache-Memcached-GetParserXS-0.01.tar.gz Entering Cache-Memcached-GetParserXS-0.01 Checking configure dependencies from META.yml Configuring Cache-Memcached-GetParserXS-0.01 Running Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Cache::Memcached::GetParserXS Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34) Checking if you have ExtUtils::Constant 0 ... Yes (0.23) Checking if you have Cache::Memcached 1.21 ... Yes (1.30) Building and testing Cache-Memcached-GetParserXS-0.01 cp lib/Cache/Memcached/GetParserXS.pm blib/lib/Cache/Memcached/GetParserXS.pm Running Mkbootstrap for GetParserXS () chmod 644 "GetParserXS.bs" "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- GetParserXS.bs blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.bs 644 "/usr/bin/perl" "/usr/share/perl/5.26/ExtUtils/xsubpp" -typemap '/usr/share/perl/5.26/ExtUtils/typemap' GetParserXS.xs > GetParserXS.xsc Please specify prototyping behavior for GetParserXS.xs (see perlxs manual) mv GetParserXS.xsc GetParserXS.c x86_64-linux-gnu-gcc -c -I. -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.26/CORE" GetParserXS.c In file included from GetParserXS.xs:5:0: ppport.h:237:0: warning: "PERL_UNUSED_DECL" redefined # define PERL_UNUSED_DECL In file included from GetParserXS.xs:2:0: /usr/lib/x86_64-linux-gnu/perl/5.26/CORE/perl.h:323:0: note: this is the location of the previous definition # define PERL_UNUSED_DECL __attribute__unused__ GetParserXS.xs: In function ‘parse_buffer’: GetParserXS.xs:143:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘STRLEN {aka long unsigned int}’ [-Wformat=] printf("GOT buf (len=%d)\nFirst line: %s\n", len, first_line); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GetParserXS.xs:208:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=] printf("doing store: len=%d key=[%s] of data [%c]\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ strlen(barekey), barekey, *(buf + new_p)); ~~~~~~~~~~~~~~~ rm -f blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.so x86_64-linux-gnu-gcc -shared -L/usr/local/lib -fstack-protector-strong GetParserXS.o -o blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.so \ \ chmod 755 blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.so Manifying 1 pod document "/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- GetParserXS.bs blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.bs 644 PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t # Failed test 'use Cache::Memcached::GetParserXS;' # at t/Cache-Memcached-GetParserXS.t line 4. # Tried to use 'Cache::Memcached::GetParserXS'. # Error: Can't load '/home/nicolas/.cpanm/work/1547554824.19462/Cache-Memcached-GetParserXS-0.01/blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.so' for module Cache::Memcached::GetParserXS: /home/nicolas/.cpanm/work/1547554824.19462/Cache-Memcached-GetParserXS-0.01/blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.so: undefined symbol: get_dest at /usr/lib/x86_64-linux-gnu/perl/5.26/DynaLoader.pm line 187. # ^@ at t/Cache-Memcached-GetParserXS.t line 4. # Compilation failed in require at t/Cache-Memcached-GetParserXS.t line 4. # BEGIN failed--compilation aborted at t/Cache-Memcached-GetParserXS.t line 4. &Cache::Memcached::GetParserXS::constant not defined at t/Cache-Memcached-GetParserXS.t line 34. # Looks like your test exited with 255 just after 1. t/Cache-Memcached-GetParserXS.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 6/6 subtests Test Summary Report ------------------- t/Cache-Memcached-GetParserXS.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 6 tests but ran 1. Files=1, Tests=1, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.11 cusr 0.02 csys = 0.16 CPU) Result: FAIL Failed 1/1 test programs. 1/1 subtests failed. Makefile:1025: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 255 -> FAIL Installing Cache::Memcached::GetParserXS failed. See /home/nicolas/.cpanm/work/1547554824.19462/build.log for details. Retry with --force to force install it. on. 26. april 2017 07.14.26 skrev SREZIC: Show quoted text
> The test suite fails on some of my smoker systems (debian/stretch, > Ubuntu 16.04, freebsd 10.3): > > ... > # Failed test 'use Cache::Memcached::GetParserXS;' > # at t/Cache-Memcached-GetParserXS.t line 4. > # Tried to use 'Cache::Memcached::GetParserXS'. > # Error: Can't load '/home/cpansand/.cpan/build/2017042521/Cache- > Memcached-GetParserXS-0.01- > 0/blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.so' for > module Cache::Memcached::GetParserXS: > /home/cpansand/.cpan/build/2017042521/Cache-Memcached-GetParserXS- > 0.01-0/blib/arch/auto/Cache/Memcached/GetParserXS/GetParserXS.so: > undefined symbol: get_dest at /opt/perl-5.25.12/lib/5.25.12/x86_64- > linux/DynaLoader.pm line 193. > # # Compilation failed in require at t/Cache-Memcached-GetParserXS.t > line 4. > # BEGIN failed--compilation aborted at t/Cache-Memcached-GetParserXS.t > line 4. > &Cache::Memcached::GetParserXS::constant not defined at t/Cache- > Memcached-GetParserXS.t line 34. > # Looks like your test exited with 255 just after 1. > t/Cache-Memcached-GetParserXS.t .. > Dubious, test returned 255 (wstat 65280, 0xff00) > Failed 6/6 subtests > ... > > This works fine on older systems e.g. debian/jessie.
It's probably not the correct fix but this fixes it. diff --git a/GetParserXS.xs b/GetParserXS.xs index 27e22a4cf..94639966a 100644 --- a/GetParserXS.xs +++ b/GetParserXS.xs @@ -24,25 +24,25 @@ int get_nslen (AV* self) { return 0; } -inline void set_key (AV* self, const char *key, int len) { +void set_key (AV* self, const char *key, int len) { av_store(self, KEY, newSVpv(key, len)); } -inline SV *get_key_sv (AV* self) { +SV *get_key_sv (AV* self) { SV** svp = av_fetch(self, KEY, 0); if (svp) return (SV*) *svp; return 0; } -inline SV *get_on_item (AV* self) { +SV *get_on_item (AV* self) { SV** svp = av_fetch(self, ON_ITEM, 0); if (svp) return (SV*) *svp; return 0; } -inline SV *get_offset_sv (AV* self) { +SV *get_offset_sv (AV* self) { SV** svp = av_fetch(self, OFFSET, 0); if (svp) return (SV*) *svp; @@ -52,44 +52,44 @@ inline SV *get_offset_sv (AV* self) { return (SV*) *svp; } -inline void clear_on_item (AV* self) { +void clear_on_item (AV* self) { SV** svp = av_store(self, ON_ITEM, newSV(0) ); } -inline void set_flags (AV* self, int flags) { +void set_flags (AV* self, int flags) { av_store(self, FLAGS, newSViv(flags)); } -inline void set_offset (AV* self, int offset) { +void set_offset (AV* self, int offset) { av_store(self, OFFSET, newSViv(offset)); } -inline void set_state (AV* self, int state) { +void set_state (AV* self, int state) { av_store(self, STATE, newSViv(state)); } -inline HV* get_dest (AV* self) { +HV* get_dest (AV* self) { SV** svp = av_fetch(self, DEST, 0); if (svp) return (HV*) SvRV(*svp); return 0; } -inline HV* get_finished (AV* self) { +HV* get_finished (AV* self) { SV** svp = av_fetch(self, FINISHED, 0); if (svp) return (HV*) SvRV(*svp); return 0; } -inline IV get_state (AV* self) { +IV get_state (AV* self) { SV** svp = av_fetch(self, STATE, 0); if (svp) return SvIV((SV*) *svp); return 0; } -inline SV* get_buffer (AV* self) { +SV* get_buffer (AV* self) { SV** svp = av_fetch(self, BUF, 0); if (svp) return *svp;
Actually I switched the inlines to static based on the advice from https://rt.cpan.org/Ticket/Display.html?id=31110 Doing so also worked.
On Wed Sep 11 17:51:20 2019, TODDR wrote: Show quoted text
> Actually I switched the inlines to static based on the advice from > https://rt.cpan.org/Ticket/Display.html?id=31110 > > Doing so also worked.
This is the patch I went with. diff --git a/modules/Cache-Memcached-GetParserXS/Cache-Memcached-GetParserXS/GetParserXS.xs b/modules/Cache-Memcached-GetParserXS/Cache-Memcached-GetParserXS/GetParserXS.xs index 27e22a4cf..00a9cb026 100644 --- a/modules/Cache-Memcached-GetParserXS/Cache-Memcached-GetParserXS/GetParserXS.xs +++ b/modules/Cache-Memcached-GetParserXS/Cache-Memcached-GetParserXS/GetParserXS.xs @@ -24,25 +24,25 @@ int get_nslen (AV* self) { return 0; } -inline void set_key (AV* self, const char *key, int len) { +static void set_key (AV* self, const char *key, int len) { av_store(self, KEY, newSVpv(key, len)); } -inline SV *get_key_sv (AV* self) { +static SV *get_key_sv (AV* self) { SV** svp = av_fetch(self, KEY, 0); if (svp) return (SV*) *svp; return 0; } -inline SV *get_on_item (AV* self) { +static SV *get_on_item (AV* self) { SV** svp = av_fetch(self, ON_ITEM, 0); if (svp) return (SV*) *svp; return 0; } -inline SV *get_offset_sv (AV* self) { +static SV *get_offset_sv (AV* self) { SV** svp = av_fetch(self, OFFSET, 0); if (svp) return (SV*) *svp; @@ -52,44 +52,44 @@ inline SV *get_offset_sv (AV* self) { return (SV*) *svp; } -inline void clear_on_item (AV* self) { +static void clear_on_item (AV* self) { SV** svp = av_store(self, ON_ITEM, newSV(0) ); } -inline void set_flags (AV* self, int flags) { +static void set_flags (AV* self, int flags) { av_store(self, FLAGS, newSViv(flags)); } -inline void set_offset (AV* self, int offset) { +static void set_offset (AV* self, int offset) { av_store(self, OFFSET, newSViv(offset)); } -inline void set_state (AV* self, int state) { +static void set_state (AV* self, int state) { av_store(self, STATE, newSViv(state)); } -inline HV* get_dest (AV* self) { +static HV* get_dest (AV* self) { SV** svp = av_fetch(self, DEST, 0); if (svp) return (HV*) SvRV(*svp); return 0; } -inline HV* get_finished (AV* self) { +static HV* get_finished (AV* self) { SV** svp = av_fetch(self, FINISHED, 0); if (svp) return (HV*) SvRV(*svp); return 0; } -inline IV get_state (AV* self) { +static IV get_state (AV* self) { SV** svp = av_fetch(self, STATE, 0); if (svp) return SvIV((SV*) *svp); return 0; } -inline SV* get_buffer (AV* self) { +static SV* get_buffer (AV* self) { SV** svp = av_fetch(self, BUF, 0); if (svp) return *svp;
Any hope of this getting an updated release to patch this?