Can't build on Windows strawberry-perl-5.26.0 32/64bit
Hi, Data::UUID is essential for CPAN Tester Reporter modules. So I can't automatically report CPAN test results.
I have got the following errors on Windows strawberry-perl-5.26.0 32/64bit. @kmx
Writing Makefile for Data::UUID
Writing MYMETA.yml and MYMETA.json
(C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe Makefile.PL exited with 0)
C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe Makefile.PL -- OK
Running make for R/RJ/RJBS/Data-UUID-1.221.tar.gz
cp UUID.pm blib\lib\Data\UUID.pm
Running Mkbootstrap for UUID ()
"C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "UUID.bs"
"C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- UUID.bs blib\arch\auto\Data\UUID\UUID.bs 644
"C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe" "C:\strawberry-perl-5.26-32bit\perl\lib\ExtUtils/xsubpp" -typemap C:\strawberry-perl-5.26-32bit\perl\lib\ExtUtils\typemap -typemap C:\strawberry-perl-5.26-32bit\cpan\build\Data-UUID-1.221-1\typemap UUID.xs > UUID.xsc
"C:\strawberry-perl-5.26-32bit\perl\bin\perl.exe" -MExtUtils::Command -e mv -- UUID.xsc UUID.c
gcc -c -s -O2 -DWIN32 -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.221\" -DXS_VERSION=\"1.221\" "-IC:\strawberry-perl-5.26-32bit\perl\lib\CORE" -D_STDIR=\"C:\\Users\\kang\\AppData\\Local\\Temp\" -D__MSWin32__ -D_DEFAULT_UMASK=0007 UUID.c
UUID.xs: In function 'inc':
UUID.xs:36:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ptable_store(instances, ent->key, (void *)++count);
^
UUID.xs:28:63: note: in definition of macro 'ptable_store'
# define ptable_store(T, K, V) ptable_store(aTHX_ (T), (K), (V))
^
UUID.xs: In function 'XS_Data__UUID_new':
UUID.xs:359:45: error: incomplete universal character name \U
if ((fd = fopen(UUID_STATE_NV_STORE, "rb"))) {
^
UUID.xs:359:45: warning: unknown escape sequence: '\k'
UUID.xs:359:45: warning: unknown escape sequence: '\A'
UUID.xs:359:45: warning: unknown escape sequence: '\L'
UUID.xs:359:45: warning: unknown escape sequence: '\T'
UUID.xs:365:46: error: incomplete universal character name \U
if ((fd = fopen(UUID_NODEID_NV_STORE, "rb"))) {
^
UUID.xs:365:46: warning: unknown escape sequence: '\k'
UUID.xs:365:46: warning: unknown escape sequence: '\A'
UUID.xs:365:46: warning: unknown escape sequence: '\L'
UUID.xs:365:46: warning: unknown escape sequence: '\T'
UUID.xs:376:49: error: incomplete universal character name \U
if ((fd = fopen(UUID_NODEID_NV_STORE, "wb"))) {
^
UUID.xs:376:49: warning: unknown escape sequence: '\k'
UUID.xs:376:49: warning: unknown escape sequence: '\A'
UUID.xs:376:49: warning: unknown escape sequence: '\L'
UUID.xs:376:49: warning: unknown escape sequence: '\T'
UUID.xs: In function 'XS_Data__UUID_create':
UUID.xs:420:47: error: incomplete universal character name \U
if((fd = fopen(UUID_STATE_NV_STORE, "wb"))) {
^
UUID.xs:420:47: warning: unknown escape sequence: '\k'
UUID.xs:420:47: warning: unknown escape sequence: '\A'
UUID.xs:420:47: warning: unknown escape sequence: '\L'
UUID.xs:420:47: warning: unknown escape sequence: '\T'
UUID.xs: In function 'XS_Data__UUID_DESTROY':
UUID.xs:583:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ptable_store(instances, self, (void *)count);
^
UUID.xs:28:63: note: in definition of macro 'ptable_store'
# define ptable_store(T, K, V) ptable_store(aTHX_ (T), (K), (V))
^
UUID.xs:587:48: error: incomplete universal character name \U
if ((fd = fopen(UUID_STATE_NV_STORE, "wb"))) {
^
UUID.xs:587:48: warning: unknown escape sequence: '\k'
UUID.xs:587:48: warning: unknown escape sequence: '\A'
UUID.xs:587:48: warning: unknown escape sequence: '\L'
UUID.xs:587:48: warning: unknown escape sequence: '\T'
gmake: *** [Makefile:343: UUID.o] Error 1
(C:\strawberry-perl-5.26-32bit\c\bin\gmake.exe exited with 512)
I cannot confirm, this is what I see:
C:\Users\kmx\Documents>cpanm Data::UUID -v
cpanm (App::cpanminus) 1.7043 on perl 5.026000 built for MSWin32-x64-multi-thread
Work directory is C:\Users\kmx/.cpanm/work/1496408902.47812
You have make C:\strawberry64\c\bin\gmake.exe
You have LWP 6.26
Falling back to Archive::Tar 2.26
You have C:\IBM\Notes\unzip.exe
Searching Data::UUID () on cpanmetadb ...
--> Working on Data::UUID
Fetching http://www.cpan.org/authors/id/R/RJ/RJBS/Data-UUID-1.221.tar.gz ... OK
Unpacking Data-UUID-1.221.tar.gz
Entering Data-UUID-1.221
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.24)
Running Makefile.PL
Configuring Data-UUID-1.221 ... Checking if your kit is complete...
Looks good
Configured options (run perl Makefile.PL --help for how to change this):
UUID state storage: c:/tmp
Generating a gmake-style Makefile
Writing Makefile for Data::UUID
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have Digest::MD5 0 ... Yes (2.55)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.24)
Building and testing Data-UUID-1.221 ... cp UUID.pm blib\lib\Data\UUID.pm
Running Mkbootstrap for UUID ()
"C:\strawberry64\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "UUID.bs"
"C:\strawberry64\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- UUID.bs blib\arch\auto\Data\UUID\UUID.bs 644
"C:\strawberry64\perl\bin\perl.exe" "C:\strawberry64\perl\lib\ExtUtils/xsubpp" -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap -typemap C:\Users\kmx\.cpanm\work\1496408902.47812\Data-UUID-1.221\typemap UUID.xs > UUID.xsc
"C:\strawberry64\perl\bin\perl.exe" -MExtUtils::Command -e mv -- UUID.xsc UUID.c
gcc -c -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.221\" -DXS_VERSION=\"1.221\" "-IC:\STRAWB~1\perl\lib\CORE" -D_STDIR=\"c:/tmp\" -D__MSWin32__ -D_DEFAULT_UMASK=0007 UUID.c
"C:\strawberry64\perl\bin\perl.exe" -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"Data::UUID\", 'DLBASE' => 'UUID', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
g++ UUID.def -o blib\arch\auto\Data\UUID\UUID.xs.dll -mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" UUID.o "C:\STRAWB~1\perl\lib\CORE\libperl526.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -Wl,--enable-auto-image-base
"C:\strawberry64\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 blib\arch\auto\Data\UUID\UUID.xs.dll
"C:\strawberry64\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- UUID.bs blib\arch\auto\Data\UUID\UUID.bs 644
"C:\strawberry64\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/basic.t ................. ok
t/from-name-collisions.t .. ok
t/leaky_dollar_bang.t ..... ok
t/pod-coverage.t .......... skipped: Pod coverage tests are not active. Please set $ENV{AUTHOR_TESTING} to activate.
t/pod.t ................... skipped: Pod coverage tests are not active. Please set $ENV{AUTHOR_TESTING} to activate.
t/segv.t .................. ok
t/threads.t ............... ok
All tests successful.
Files=7, Tests=36, 2 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU)
Result: PASS
"C:\strawberry64\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- UUID.bs blib\arch\auto\Data\UUID\UUID.bs 644
Files found in blib\arch: installing files in blib\lib into architecture dependent library tree
Installing C:\STRAWB~1\perl\site\lib\auto\Data\UUID\UUID.xs.dll
Installing C:\STRAWB~1\perl\site\lib\Data\UUID.pm
Appending installation info to C:\STRAWB~1\perl\lib/perllocal.pod
OK
Successfully installed Data-UUID-1.221
Installing C:\STRAWB~1\perl\site\lib\MSWin32-x64-multi-thread\.meta\Data-UUID-1.221\install.json
Installing C:\STRAWB~1\perl\site\lib\MSWin32-x64-multi-thread\.meta\Data-UUID-1.221\MYMETA.json
1 distribution installed
Well, it seems to work on my windows box because I have c:\tmp directory. If I delete it I see the same failure.
This is a hack in Makefile.PL that can help:
- $d =~ s/\\/\\\\/g if $^O eq 'MSWin32';
+ $d =~ s/\\/\//g if $^O eq 'MSWin32';
Definitely not a new bug in strawberry perl 5.26.0.
BTW applying #21 should fix this.
@kmx @rjbs
This is still a problem.
Creating "c:\tmp" will allow compilation as a work around, but this is definitely a bug in the Data::UUID make process. It's likely a File::Temp problem (seems like a common refrain).
I see the same issue here too - workaround works
I think that there may be a short description like an attached patch. Data-UUID-1.221-Win32-Limitation-pod.patch.txt
@kmx @rjbs , maybe the issue is using gmake? That's one of the main things that changed between 5.24 and 5.26 for the windows distributions.
I'm poking @nawglan to add the $d =~ s/\\/\//g if $^O eq 'MSWin32'; code to his PR (#32). That should fix it for everyone regardless of the larger patch that @kmx referenced.