Skip Menu |

This queue is for tickets about the Wx CPAN distribution.

Report information
The Basics
Id: 129768
Status: open
Priority: 0/
Queue: Wx

People
Owner: Nobody in particular
Requestors: professa [...] dementianati.com
Cc:
AdminCc:

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



Subject: Wx fails to build with error: 'my_perl' was not declared in this scope
Date: Fri, 7 Jun 2019 13:47:51 -0700
To: bug-Wx [...] rt.cpan.org
From: Professa Dementia <professa [...] dementianati.com>
OS: Windows 8.1 Perl: Strawberry Perl 5.30.0.1 (64bit) wxWidgets: Version 3.0.2 - automatically selected and downloaded by cpan Cpan was used to install Wx, which attempted to install wxWidgets and Alien::wxWidgets as dependencies. Both of these built and installed without error. Wx, however, fails to build. All programs in Wx-0.9932-0\ext fail with the same error: "'my_perl' was not declared in this scope". Research indicates this is related to threads. C:\Strawberry\cpan\build\Wx-0.9932-0>gmake "C:\Strawberry\perl\bin\perl.exe" script/copy_files.pl files.lst Skip blib\lib\Wx\cpp\constants.h (unchanged) Skip blib\lib\Wx\cpp\setup.h (unchanged) Skip blib\lib\Wx\cpp\event.h (unchanged) Skip blib\lib\Wx\cpp\v_cback.h (unchanged) Skip blib\lib\Wx\cpp\streams.h (unchanged) Skip blib\arch\Wx\build\Opt.pm (unchanged) Skip blib\lib\Wx\cpp\compat.h (unchanged) Skip blib\lib\Wx\cpp\v_cback_def.h (unchanged) Skip blib\lib\Wx\cpp\helpers.h (unchanged) Skip blib\lib\Wx\cpp\e_cback.h (unchanged) Skip blib\lib\Wx\cpp\chkconfig.h (unchanged) Skip blib\lib\Wx\typemap (unchanged) Skip blib\lib\Wx\cpp\overload.h (unchanged) cp cpp/wxapi.h blib\lib\Wx\cpp\wxapi.h "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e touch -- wxt_copy_files Skip blib\lib\Wx\XSP\Overload.pm (unchanged) Skip blib\lib\Wx\XSP\Event.pm (unchanged) Skip blib\lib\Wx\XSP\Enum.pm (unchanged) Skip blib\lib\Wx\build\MakeMaker\Win32_MSVC.pm (unchanged) Skip blib\lib\Wx\build\MakeMaker\Win32_MinGW.pm (unchanged) Skip blib\lib\Wx\build\MakeMaker\Core.pm (unchanged) Skip blib\lib\Wx\build\MakeMaker.pm (unchanged) Skip blib\lib\Wx\build\Utils.pm (unchanged) Skip blib\lib\Wx\build\Options.pm (unchanged) Skip blib\lib\Wx\XSP\Virtual.pm (unchanged) Skip blib\lib\Wx\build\MakeMaker\Win32.pm (unchanged) Skip blib\lib\Wx.pm (unchanged) Skip blib\lib\Wx\build\MakeMaker\Hacks.pm (unchanged) Skip blib\lib\Wx\build\MakeMaker\MacOSX_GCC.pm (unchanged) Skip blib\lib\Wx\build\MakeMaker\Any_wx_config.pm (unchanged) Skip blib\lib\Wx\Overload\Handle.pm (unchanged) Skip blib\lib\Wx\Overload\Driver.pm (unchanged) Skip blib\lib\Wx\Api.pod (unchanged) Skip blib\lib\Wx\App.pm (unchanged) Skip blib\lib\Wx\build\MakeMaker\Any_OS.pm (unchanged) Skip blib\lib\Wx\Timer.pm (unchanged) Skip blib\lib\Wx\ArtProvider.pm (unchanged) Skip blib\lib\Wx\Locale.pm (unchanged) Skip blib\lib\Wx\RadioBox.pm (unchanged) Skip blib\lib\Wx\Menu.pm (unchanged) Skip blib\lib\Wx\Thread.pod (unchanged) Skip blib\lib\Wx\Event.pm (unchanged) Skip blib\lib\Wx\Loader.pod (unchanged) Skip blib\lib\Wx\NewClass.pod (unchanged) cp lib/Wx/Mini.pm blib\lib\Wx\Mini.pm gmake[1]: Entering directory 'C:/Strawberry/cpan/build/Wx-0.9932-0/ext' gmake[2]: Entering directory 'C:/Strawberry/cpan/build/Wx-0.9932-0/ext/test' "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- PerlTest.bs ..\..\blib\arch\auto\Wx\PerlTest\PerlTest.bs 644 g++ -m64 -O2 -mthreads -m64 -Os -c -I. -I.. -IC:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\lib -IC:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\include -I. -I. -IC:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\lib -IC:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\include -I. -I..\.. -IC:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\lib -IC:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\include -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=\"0.01\" -DXS_VERSION=\"0.01\" "-IC:\Strawberry\perl\lib\CORE" -DWXPL_EXT -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -DWXUSINGDLL -DNOPCH -DNO_GCC_PRAGMA -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -DWXUSINGDLL -DNOPCH -DNO_GCC_PRAGMA -DWXPL_EXT -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -DWXUSINGDLL -DNOPCH -DNO_GCC_PRAGMA PerlTest.c In file included from ..\../cpp/wxapi.h:57, from PerlTest.c:23: C:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\include/wx/hashmap.h: In static member function 'static void** _wxHashTableBase2::AllocTable(size_t)': C:\Strawberry\perl\lib\CORE/perl.h:175:17: error: 'my_perl' was not declared in this scope # define aTHX my_perl ^~~~~~~ C:\Strawberry\perl\lib\CORE/embedvar.h:38:18: note: in expansion of macro 'aTHX' # define vTHX aTHX ^~~~ C:\Strawberry\perl\lib\CORE/embedvar.h:54:19: note: in expansion of macro 'vTHX' #define PL_Mem (vTHX->IMem) ^~~~ C:\Strawberry\perl\lib\CORE/iperlsys.h:818:4: note: in expansion of macro 'PL_Mem' (*PL_Mem->pCalloc)(PL_Mem, (num), (size)) ^~~~~~ C:\Strawberry\perl\lib\CORE/XSUB.h:612:33: note: in expansion of macro 'PerlMem_calloc' # define calloc PerlMem_calloc ^~~~~~~~~~~~~~ C:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\include/wx/hashmap.h:121:25: note: in expansion of macro 'calloc' return (void **)calloc(sz, sizeof(void*)); ^~~~~~ C:\Strawberry\perl\lib\CORE/perl.h:175:17: note: suggested alternative: 'my_fork' # define aTHX my_perl ^~~~~~~ C:\Strawberry\perl\lib\CORE/embedvar.h:38:18: note: in expansion of macro 'aTHX' # define vTHX aTHX ^~~~ C:\Strawberry\perl\lib\CORE/embedvar.h:54:19: note: in expansion of macro 'vTHX' #define PL_Mem (vTHX->IMem) ^~~~ C:\Strawberry\perl\lib\CORE/iperlsys.h:818:4: note: in expansion of macro 'PL_Mem' (*PL_Mem->pCalloc)(PL_Mem, (num), (size)) ^~~~~~ C:\Strawberry\perl\lib\CORE/XSUB.h:612:33: note: in expansion of macro 'PerlMem_calloc' # define calloc PerlMem_calloc ^~~~~~~~~~~~~~ C:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\include/wx/hashmap.h:121:25: note: in expansion of macro 'calloc' return (void **)calloc(sz, sizeof(void*)); ^~~~~~ gmake[2]: *** [Makefile:341: PerlTest.o] Error 1 gmake[2]: Leaving directory 'C:/Strawberry/cpan/build/Wx-0.9932-0/ext/test' gmake[1]: *** [Makefile:497: subdirs] Error 2 gmake[1]: Leaving directory 'C:/Strawberry/cpan/build/Wx-0.9932-0/ext' gmake: *** [Makefile:647: subdirs] Error 2
Subject: [rt.cpan.org #129768]
Date: Fri, 19 Jul 2019 13:32:28 +0200
To: Bug Wx <bug-Wx [...] rt.cpan.org>
From: Kai-Uwe Eckhardt <kuehro [...] posteo.de>
Show quoted text
> C:\Strawberry\perl\lib\CORE/XSUB.h:612:33: note: in expansion of macro > 'PerlMem_calloc' > # define calloc PerlMem_calloc > ^~~~~~~~~~~~~~ > C:\Strawberry\perl\site\lib\Alien\wxWidgets\msw_3_0_2_uni_gcc_3_4\include/wx/hashmap.h:121:25: > note: in expansion of macro 'calloc' > return (void **)calloc(sz, sizeof(void*));
# define calloc PerlMem_calloc has been added to XSUB.h between the Strawberry releases 5.28 (where Wx installs fine) and 5.30 https://github.com/Perl/perl5/commit/5ace197f9a644bde21b1b41430099295ed92365e#diff-9f655f96189bd19669d20a123da441de leading to conflicts with dirty tricks in Wx. It builds and passes the tests after patching cpp\wxapi.h @@ -133,6 +133,7 @@ #undef getc #undef getenv #undef malloc +#undef calloc #undef open #undef read #undef realloc Test result: ... All tests successful. Test Summary Report ------------------- t/04_userdata.t (Wstat: 0 Tests: 65 Failed: 0) TODO passed: 25, 33, 41, 57 Files=23, Tests=786, 19 wallclock secs ( 0.27 usr + 0.09 sys = 0.36 CPU) Result: PASS Have fun, Kai-Uwe