Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 OS: Tests Fail #41

Closed
nanis opened this issue Dec 4, 2015 · 12 comments
Closed

Windows 10 OS: Tests Fail #41

nanis opened this issue Dec 4, 2015 · 12 comments

Comments

@nanis
Copy link

nanis commented Dec 4, 2015

This is on Windows 10, perl 5.23.5 built with VS2013. Here are some examples of failures:

D:\...\> prove -vb t\13_compile_sort.t

Improperly formed package declaration found in file 'c:/opt/perl/site/5.23.5/lib/Devel/StackTrace.pm' near '            package    # the newline keeps dzil from adding a version here', croaking at t\13_compile_sort.t line 0.
INIT failed--call queue aborted.

The relevant code in Devel::StackTrace:

 package    # the newline keeps dzil from adding a version here
            DB;

RPerl::CompileUnit::Module::Class seems to want to handle something like this, but wants the word "hide" to occur on the same line as the package statement.

Now, if I go and "fix" the line in Devel::StackTrace by making package DB; a single line statement, here is what I get:

t\13_compile_sort.t .. Improperly formed package declaration found in file 'c:/opt/perl/site/5.23.5/lib/Exception/Class/Base.pm' near ' package => 'package',', croaking at t\13_compile_sort.t line 0.

Here is the relevant part of Exception::Class::Base:

my %trace_fields = (
    package => 'package',
    file    => 'filename',
    line    => 'line',
);

In this case, this might be a bug in Exception::Class::Base because the reserved word package should be quoted when used as a hash key, so I may open an issue with the author of that module.

It may also make sense to ask the Devel::StackTrace author to use the word "hide" in that package statement.

However, after fixing both of these, I get:

t\13_compile_sort.t .. Use of uninitialized value $module_file_line in pattern match (m//) at D:\Src\rperl\blib\lib/RPerl/CompileUnit/Module/Class.pm line 157, <$MODULE_FILE> line 402. End of file 'c:/opt/perl/5.23.5/lib/File/Basename.pm' reached without finding '=cut' end of multi-line POD comment '=head1', croaking at t\13_compile_sort.t line 0.

which I have not tried to diagnose at this point.

Summary of my perl5 (revision 5 version 23 subversion 5) configuration:
   
  Platform:
    osname=MSWin32, osvers=10.0, archname=MSWin32-x64-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -GF -W3 -O2 -MD -Zi -DNDEBUG -favor:INTEL64 -GF -Gy -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY',
    optimize='-O2 -MD -Zi -DNDEBUG -favor:INTEL64 -GF -Gy -GL -fp:precise',
    cppflags='-DWIN32'
    ccversion='18.00.31101', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8, longdblkind=0
    ivtype='__int64', ivsize=8, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg  -libpath:"c:\opt\perl\5.23.5\lib\CORE"  -machine:AMD64 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" -subsystem:console,"5.02"'
    libpth="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64"
    libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
    perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl523.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg  -libpath:"c:\opt\perl\5.23.5\lib\CORE"  -machine:AMD64 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" -subsystem:console,"5.02"'


Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
                        PERLIO_LAYERS PERL_COPY_ON_WRITE
                        PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_NO_REGISTRY
                        USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE
  Built under MSWin32
  Compiled at Dec  4 2015 15:20:38
  %ENV:
    PERLDOC_PAGER="c:\opt\cygwin64\bin\less.exe -+C -E -F -g -i"
  @INC:
    c:/opt/perl/site/5.23.5/lib/MSWin32-x64-multi-thread
    c:/opt/perl/site/5.23.5/lib
    c:/opt/perl/5.23.5/lib
    .

Here are the problematic tests:

Test Summary Report
-------------------
t\04_type_scalar.t           (Wstat: 65280 Tests: 4 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 319 tests but ran 4.
t\05_type_array.t            (Wstat: 65280 Tests: 2 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 232 tests but ran 2.
t\06_type_hash.t             (Wstat: 65280 Tests: 2 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 247 tests but ran 2.
t\07_interpret_execute.t     (Wstat: 6400 Tests: 0 Failed: 0)
  Non-zero exit status: 25
  Parse errors: No plan found in TAP output
t\08_precompiled_oo_inherit.t (Wstat: 65280 Tests: 15 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 250 tests but ran 15.
t\09_precompiled_sort.t      (Wstat: 65280 Tests: 11 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 254 tests but ran 11.
t\10_parse.t                 (Wstat: 6400 Tests: 0 Failed: 0)
  Non-zero exit status: 25
  Parse errors: No plan found in TAP output
t\11_generate.t              (Wstat: 6400 Tests: 0 Failed: 0)
  Non-zero exit status: 25
  Parse errors: No plan found in TAP output
t\13_compile_sort.t          (Wstat: 6400 Tests: 0 Failed: 0)
  Non-zero exit status: 25
  Parse errors: No plan found in TAP output
@wbraswell wbraswell changed the title Tests fail to run due to failure to handle the word "package" Windows OS: Tests fail to run due to failure to handle the word "package" Dec 4, 2015
@wbraswell wbraswell changed the title Windows OS: Tests fail to run due to failure to handle the word "package" Windows 10 OS: Tests Fail Dec 4, 2015
@wbraswell
Copy link
Owner

@nanis Thank you for filing this issue, I am currently working with @bulk88 to figure out some Windows bugs in the latest RPerl release. We are regularly on IRC, please come spend some time with us.
irc.perl.org #perl11

@bulk88
Copy link
Collaborator

bulk88 commented Dec 5, 2015

None of the files that were attempted to be rperl compiled, should have ever been rperl compiled. There is a black/whitelist in rperl of modules file paths to exclude, the blacklist in rperl is broken on Windows since July 2015.

The black/whitelist is in https://github.com/wbraswell/rperl/blob/master/lib/RPerl/CompileUnit/Module/Class.pm#L115

@nanis
Copy link
Author

nanis commented Dec 5, 2015

@bulk88 That makes sense. I haven't looked at it yet, but is this a file name canonicalization issue?

@wbraswell
Copy link
Owner

@nanis
RPerl is not meant to compile any random Perl software. RPerl currently supports a subset of the Perl 5 language. However, running the automated RPerl tests SHOULD work.

@nanis
Copy link
Author

nanis commented Dec 5, 2015

@wbraswell These are problems that happen when I type nmake test in my rperl clone from GitHub.

@wbraswell
Copy link
Owner

@nanis
Okay I understand, I only have Linux so sometimes it is hard for me to be much help on other operating systems. If you are capable of submitting a pull request to fix this Windows issue, please read our CONTRIBUTING file. If not, you can wait until @bulk88 and I eventually fix it.
https://raw.githubusercontent.com/wbraswell/rperl/master/CONTRIBUTING
Thanks!

@nanis
Copy link
Author

nanis commented Dec 5, 2015

If I can find time to figure it out, I'll let you know.

BTW, trace output says Devel::StackTrace was not skipped due to CORE & RPERL_DEPS namespaces.

@wbraswell
Copy link
Owner

Devel::* should be skipped due to this:
https://github.com/wbraswell/rperl/blob/master/lib/rperlnamespaces_generated.pm#L61
which was generated from this:
https://github.com/wbraswell/rperl/blob/master/script/namespaces_regenerate.pl#L56

Since you say it is not properly being skipped, then obviously that is likely part of the problems of running RPerl in Windows, and needs to somehow be debugged.

@bulk88
Copy link
Collaborator

bulk88 commented Dec 5, 2015

@wbraswell These are problems that happen when I type nmake test in my rperl clone from GitHub.

Using MSVC with RPerl fails badly because RPerl uses extensively C++11 features which MSVC doesnt support, yet, if ever. Stick to GCC perl (strawberry).

@nanis
Copy link
Author

nanis commented Dec 5, 2015

@bulk88 I am not sure I understand ... Wouldn't there have been a compile error then?

@wbraswell
Copy link
Owner

@nanis
I had assumed you would have already read the INSTALL notes files and were thus using Strawberry Perl. Please upgrade to Strawberry and try again. Thanks!

https://github.com/wbraswell/rperl/blob/master/INSTALL#L83-L92

@nanis
Copy link
Author

nanis commented Dec 5, 2015

I wasn't interested in RPerl at all until you commented on my blog post on Facebook. I took that as an invitation to try RPerl, checked out the repo, and did perl Makefile.PL, nmake, and nmake test which is what I do with every Perl distro.

I don't really read INSTALL documents. Maybe Makefile.PL can croak if used with an unsupported compiler?

At this point, I am happy with the 33% improvement in Perl's arithmetic performance, so I am not going to spend more time on this.

If I need C++ performance, I'll write C++.

Thank you.

@nanis nanis closed this as completed Dec 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants