Skip Menu |

This queue is for tickets about the XS-MagicExt CPAN distribution.

Report information
The Basics
Id: 48738
Status: open
Priority: 0/
Queue: XS-MagicExt

People
Owner: Nobody in particular
Requestors: taro.nishino [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.04
Fixed in: (no value)



Subject: Module::Install::XSUtil bug
Hi Goro, As you can see from my cpan-testers report, the link errors occur under MSVC. MakeMaker Parameters of Makefile are as follows: # MakeMaker Parameters: # ABSTRACT => q[Provides PERL_MAGIC_ext manipulators for XS modules] # AUTHOR => q[Goro Fuji (gfx) <gfuji(at)cpan.org>.] # BUILD_REQUIRES => { } # CCFLAGS => q[-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 - D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED - DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT - DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX - DUSE_PPPORT -W3] # DIR => [] # DISTNAME => q[XS-MagicExt] # DL_FUNCS => { $(NAME)=>[] } # FUNCLIST => [q[magic_ext_mgx_attach], q[magic_ext_mgx_find], q[magic_ext_mgx_detach], q[magic_ext_mgx_attach], q[sv_magicext], q[SvREFCNT_dec], q[magic_ext_mgx_find], q[SvMAGIC], q[magic_ext_mgx_detach]] # INC => q["-I."] # NAME => q[XS::MagicExt] # NO_META => q[1] # OBJECT => q[$(O_FILES)] # PL_FILES => { } # PREREQ_PM => { Test::More=>q[0.88], XSLoader=>q[0.08], ExtUtils::MakeMaker=>q[6.42], ExtUtils::ParseXS=>q[2.2], Devel::PPPort=>q[3.19], ExtUtils::CBuilder=>q[0] } # VERSION => q[0.01] # clean => { FILES=>q[ppport.h XS-MagicExt-* *.stackdump *.gcda *.gcno *.gcov nytprof *.out cover_db t/MGX.c t/MGX.o t/MGX.obj t/MGX.dll] } # dist => { } # realclean => { FILES=>q[MYMETA.yml] } # test => { TESTS=>q[t/*.t] } You should notice that SvMAGIC, SvREFCNT_dec, and sv_magicext as well are contained in the array reference of FUNCLIST. Those are functions you yourself may not export, and the link errors are due to that. Best regards, Taro Nishino
Hi, Taro. Thank you. I know its function finding algorithm is poor, so I am considering a more smart one. Possibly this bug is fixed in the next release. Regards, -- Goro Fuji (gfx) GFUJI at CPAN.org
Subject: Re: [rt.cpan.org #48738] Module::Install::XSUtil bug
Date: Wed, 26 Aug 2009 00:28:56 +0900
To: bug-XS-MagicExt [...] rt.cpan.org
From: Taro Nishino <taro.nishino [...] gmail.com>
Hi Goro, Unfortunately XS-MagicExt-0.02 causes linker errors when MGX.xs is compiled. Simply put, the error messages mean that magic_ext_mgx_detach, magic_ext_mgx_find, and magic_ext_mgx_attach cannot be resolved. Thereby the 'bootstrap' test of 01_mgx.t fails. I guess that this is due to FUNCLIST being not defined. In fact, the MakeMaker dlsyms section of Makefile is as follows: # --- MakeMaker dlsyms section: MagicExt.def: Makefile.PL $(PERLRUN) -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"XS::MagicExt\", 'DLBASE' => '$(BASEEXT)', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" In addition, I attached the whole Makefile. Please, have a look. Best regards, Taro Nishino
Download Makefile
application/octet-stream 28.3k

Message body not shown because it is not plain text.

Hi Goro, Unfortunately XS-MagicExt-0.03 causes linker errors as follows: C:\temp\XS-MagicExt-0.03>prove -vb t/01_mgx.t t/01_mgx.t .. Generating script 'MGX.ccs' cl -nologo -c @"MGX.ccs" -Fo"MGX.obj" "MGX.c" cl : コマンド ライン warning D4029 : 標準の編集コンパイラでは最適化は使用でき ません。 MGX.c Generating script 'MGX.lds' link @"MGX.lds" -out:"MGX.dll" ライブラリ MGX.lib とオブジェクト MGX.exp を作成中 MGX.obj : error LNK2019: 未解決の外部シンボル _magic_ext_mgx_detach が関 数 _do_test で参照されました。 MGX.obj : error LNK2019: 未解決の外部シンボル _magic_ext_mgx_find が関数 _do_test で参照されました。 MGX.obj : error LNK2019: 未解決の外部シンボル _magic_ext_mgx_attach が関 数 _do_test で参照されました。 MGX.dll : fatal error LNK1120: 外部参照 3 が未解決です。 not ok 1 - bootstrap # Failed test 'bootstrap' # at t/01_mgx.t line 27. Undefined subroutine &MGX::do_test called at t/01_mgx.t line 32. # Tests were run but no plan was declared and done_testing() was not seen. Dubious, test returned 2 (wstat 512, 0x200) Failed 1/1 subtests Test Summary Report ------------------- t/01_mgx.t (Wstat: 512 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 2 Parse errors: No plan found in TAP output Files=1, Tests=1, 2 wallclock secs ( 0.03 usr + 0.03 sys = 0.06 CPU) Result: FAIL I confirmed that FUNCLIST is definitely defined. Despite myself, why do the link errors occur? I'm not sure why. This issue might be over my head! FYI, I attached Makefile. Please, have a look. Best regards, Taro Nishino

Message body is not shown because it is too large.

Hi Goro, Unfortunately XS-MagicExt-0.04 causes a segfault as follows: C:\temp\XS-MagicExt-0.04>prove -vb t/01_mgx.t t/01_mgx.t .. ok 1 - C:\Perl\bin\perl.exe Makefile.PL ok 2 - ... success Microsoft(R) Program Maintenance Utility Version 7.00.9955 Copyright (C) Microsoft Corporation. All rights reserved. cl : コマンド ライン warning D4029 : 標準の編集コンパイラでは最適化は使用でき ません。 ok 3 - nmake ok 4 - ... success Microsoft(R) Program Maintenance Utility Version 7.00.9955 Copyright (C) Microsoft Corporation. All rights reserved. # Failed test 'use XS::MagicExt installed in blib' # at t/mgx.t line 10. # 'C:\temp\XS-MagicExt-0.04\blib\lib/XS/MagicExt.pm' # doesn't match '(?-xism:/blib/)' Failed 1/1 test programs. 1/1 subtests failed. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : リターン コード '0x5' Stop. # Failed test '... success' # at t/01_mgx.t line 24. # got: '512' # expected: '0' # C:\Perl\bin\perl.exe "-Iinc" "-MModule::Install::ExtraTests" "-e" "Modul e::Install::ExtraTests::__harness('Test::Harness', 1, '', '', '', 0, 'blib\lib', 'blib\arch')" t/*.t # t/mgx.t .. # Dubious, test returned 5 (wstat 1280, 0x500) # Failed 2/2 subtests # # Test Summary Report # ------------------- # t/mgx.t (Wstat: 1280 Tests: 1 Failed: 1) # Failed test: 1 ok 5 - nmake test not ok 6 - ... success # Non-zero exit status: 5 # Parse errors: Bad plan. You planned 2 tests but ran 1. # Files=1, Tests=1, 3 wallclock secs ( 0.08 usr + 0.03 sys = 0.11 CPU) # Result: FAIL Microsoft(R) Program Maintenance Utility Version 7.00.9955 Copyright (C) Microsoft Corporation. All rights reserved. # Looks like you failed 1 test of 8. ok 7 - nmake realclean ok 8 - ... success 1..8 Dubious, test returned 1 (wstat 256, 0x100) Failed 1/8 subtests Test Summary Report ------------------- t/01_mgx.t (Wstat: 256 Tests: 8 Failed: 1) Failed test: 6 Non-zero exit status: 1 Files=1, Tests=8, 21 wallclock secs ( 0.06 usr + 0.03 sys = 0.09 CPU) Result: FAIL Best regards, Taro Nishino
Hi, Taro. Thank you for your reports. But..., hmm, I think segfault is difficult to fix... Regards, -- Goro Fuji (gfx) GFUJI at CPAN.org