Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Building Win32::GuiTest for perl 5.14 or higher

by SuicideJunkie (Priest)
on Jun 25, 2012 at 19:02 UTC ( #978242=perlquestion: print w/ replies, xml ) Need Help??
SuicideJunkie has asked for the wisdom of the Perl Monks concerning the following question:

I'd been meaning to get around to trying BrowserUk's Windows screengrab with GD, but I didn't have all the packages and didn't have time to install them until recently.

I made some time while updating my perl install at work, but to my disappointment, it seems that Win32::GuiTest is not available from my usual suspects for perls past 5.12... http://code.activestate.com/ppm/Win32-GuiTest/ and http://trouchelle.com/perl/ppmrepview.pl?id=66915&v=14 for example.

>cpan install Win32::GuiTest is also failing with

CPAN.pm: Building K/KA/KARASIK/Win32-GuiTest-1.59.tar.gz Set up gcc environment - 3.4.5 (mingw-vista special r3) Checking if your kit is complete... Looks good Writing Makefile for Win32::GuiTest Writing MYMETA.yml and MYMETA.json C:Perlbinperl.exe: not found dmake.exe: Error code 255, while making 'blib\lib\Win32\.exists' KARASIK/Win32-GuiTest-1.59.tar.gz C:\Perl\site\bin\dmake.exe -- NOT OK

Has anybody been able to build and run Win32::GuiTest under perl 5.14 or higher, and if so, any tips on how to get this working?


Solution: Re: Building Win32::GuiTest for perl 5.14 or higher - Use Bribes http://www.bribes.org/perl/ppmdir.html

Thanks, syphilis!

Comment on Building Win32::GuiTest for perl 5.14 or higher
Select or Download Code
Re: Building Win32::GuiTest for perl 5.14 or higher
by davido (Archbishop) on Jun 25, 2012 at 19:09 UTC

    Did the INSTALL section from the module's README prove to be unhelpful? It looks to me like it provides some good information, though the .ppd it refers to hasn't been updated since 2007. -- However, the pass matrix shows that it has passed for Strawberry Perl with version 5.14.2. The README also mentions a batch file to run to prepare the Visual Studio build environment before building the module. Since Visual Studio is the means by which ActivePerl is built, I believe that advice would be applicable to your ActivePerl setup.

    To answer the question, "Has anybody been able to build and run.... under perl 5.14 or higher...?" the answer is yes.


    Dave

      the answer is yes.

      Don't you find it a little suspicious that an XS based module with total dependency upon the Windows OS architecture and APis is so successful in building on Linux, Solaris, BSD et al?

      I suspect this is a more meaningful source.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

        Another "yes." :)

        The test suite uses a lot of SKIP blocks if the OS isn't reported as win32 or cygwin, so it's issuing false positives for Linux. The author should bail out (or possibly die at Makefile.PL stage) if Win32/cygwin isn't available. That would prevent false positives, while simultaneously preventing a bunch of FAILs from cluttering the results.

        In particular, this line from Makefile.PL should be elevated to fatal:

        warn "** This module can only work under Win32\n" unless $can_compile;

        The author might also have better results at portability across win32 platforms if he used ExtUtils::CppGuess to detect the correct compiler to use and the appropriate linker libraries. I've spent some time looking over that module and consider it pretty solid. A lot of work has gone into making that module "do the right thing."

        But nevertheless there is still a Win32 "PASS" at the 5.14.2 level using Strawberry Perl, both with 32 bit and 64 bit Perls.

        Nice PPM status source. I like that.

        This might be helpful: RT#75338 suggests forcing the build.

        Updated: Added a look at Makefile.PL and EU::CppGuess.


        Dave

      The install section mentions running perl makefile.pl but the archive mentioned (http://www.sourceforge.net/projects/winguitest) doesn't include that. There's makedist.pl, but that can't find some files and seems to be trying to build the archive it came out of...

      The .ppd file included with the archive won't install, mainly due to the line: <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" /> Changing that from 5.8 to 5.14 lets it install but then perl.exe throws an unhandled exception as soon as use Win32::GuiTest appears in my test script.

      The archive from cpan (http://search.cpan.org/CPAN/authors/id/K/KA/KARASIK/Win32-GuiTest-1.59.tar.gz) does have a nice makefile.pl, but gives the same result that cpan install Win32::GuiTest did.

      I have the same problem:

      J:\ps>ppm install Win32::GuiTest Downloading ActiveState Package Repository packlist...not modified ppm install failed: Can't find any package that provides Win32::GuiTes +t
      J:\ps>perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x86-multi-thread

Re: Building Win32::GuiTest for perl 5.14 or higher
by syphilis (Canon) on Jun 25, 2012 at 23:45 UTC
    C:Perlbinperl.exe: not found

    That's the first problem that you need to fix. Why is C:\Perl\bin\perl.exe being reduced to C:Perlbinperl.exe ?

    If this is something that CPAN.pm is causing then you might be able to get around it by building manually - ie cd to the top level Win32-GuiTest-1.59 source folder and run 'perl Makefile.PL', 'dmake test', 'dmake install'.
    But if that still produces the same error then we need to work out why that happens, and how to fix it.

    Alternatively, the bribes repo *does* provide a ppm package for Win32-GuiTest-1.58 for perls 5.6 through to 5.14 (inclusive).
    The author of that repo would probably, if requested, update to version 1.59 if you need the latest.

    Cheers,
    Rob
Re: Building Win32::GuiTest for perl 5.14 or higher
by Anonymous Monk on Jun 26, 2012 at 04:39 UTC

    :Perlbinperl.exe: not found .... dmake.exe

    This means the makefile was written for nmake and not dmake, so it won't work with dmake

    Try  cpanp -i Win32::GuiTest

    or use  cpanp -z Win32::GuiTest then  perl Makefile.PL MAKE=dmake && dmake test then dmake install

    This shouldn't happen on activestate, but ActiveState is know to patch ExtUtils::MakeMaker and fudge it up, you might consider installing the latest manually from CPAN

      This means the makefile was written for nmake and not dmake, so it won't work with dmake

      I don't think so. The error I get when I run 'dmake' with a makefile written for 'nmake' is significantly different:
      C:\sisyphusion\Win32-GuiTest-1.59>dmake dmake: Error: -- `C:\_32\ap1600\libConfig.pm' not found, and can't be + made
      Cheers,
      Rob

        I don't think so

        Well, your path and his path do not match :) but I take your point

        I've seen that message before so many times

        ddg://C:Perlbinperl.exe: not found -> Re: perl on win2k, make: C:Perlbinperl.exe: Command not found, #114 (Win32 build failure due to incorrect `make` detection) Parrot

        so I jump to nmake/dmake/make mixing

        I've also seen it happen in postamble but that isn't the case here, even though there is a problem (for some)

        Failed to load or import from ExtUtils::ParseXS (version 2.2210). Plea +se check that ExtUtils::ParseXS is installed correctly and that the n +ewest version will be found in your @INC path: "report_error_count" i +s not exported by the ExtUtils::ParseXS module Can't continue after import errors at C:\perl\site\5.12.1\lib\ExtUtils +\xsubpp line 6 dmake: Error code 255, while making 'GuiTest.cpp'

        The solution

        --- Makefile.PL 2012-03-14 06:13:45.000000000 -0700 +++ Makefile.PL-new 2012-06-26 01:08:22.640625000 -0700 @@ -55,7 +55,7 @@ sub xs_c { ' .xs.cpp: - $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $ +(XSUBPPARGS) $*.xs >xstmp.c && $(MV) xstmp.c $*.cpp + $(PERL) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs >xstmp.c && $ +(MV) xstmp.c $*.cpp '; }

        So yeah, OP needs to take CPAN out of the equation and try things by hand, maybe with tracing

Re: Building Win32::GuiTest for perl 5.14 or higher
by sam_bakki (Pilgrim) on Jun 27, 2012 at 07:04 UTC

    Hi

    I built and use Win32::GuiTest in perl 5.15.
    Here is what I did

    1. DOwnload Win32::GuiTest from http://search.cpan.org/~karasik/Win32- +GuiTest-1.59/lib/Win32/GuiTest.pm 2. Extract Win32-GuiTest-1.59.tar.gz.tar.gz.tar.gz 3. Make sure VC compiler is not in path I rename C:\Program Files (x86)\Microsoft Visual Studio 9.0 to C:\ +Program Files (x86)\Microsoft Visual Studio 9.0_org 4. cd Win32-GuiTest-1.59 5. perl Makefile.PL 6. dmake 7. dmake test [Dont worry if some test fails] 8. dmake install My settings, perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for MSWin32-x +86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2011, Larry Wall Binary build 1402 [295342] provided by ActiveState http://www.ActiveSt +ate.com Built Oct 7 2011 15:49:44 gcc --version gcc (GCC) 4.6.2 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There i +s NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR +POSE.gcc (GCC) 4.6.2 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There i +s NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR +POSE. dmake -V dmake.exe - Version 4.11-20080107-SHAY (Windows / MS Visual C++) Copyright (c) 1990,...,1997 by WTI Corp.

    Thanks & Regards,
    Bakkiaraj M
    My Perl Gtk2 technology demo project - http://code.google.com/p/saaral-soft-search-spider/ , contributions are welcome.

      If you have microsoft compiler, just use nmake -- dmake/mingw is for folks without microsoft compiler

        It is much easier to use the right tool if you just ask Perl which tool to use, for example:

        C:\> perl -V:make make='dmake';

        - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://978242]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2014-08-29 11:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (280 votes), past polls