thekestrel has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

Thanks to dragonchild I got put onto the virtues of Graph in a previous question of mine. I'm now wanting to expand its functionality with the use of Graph::Layout::Aesthetic which all sounds fine and dandy, just go grab it off CPAN, however I'm new to ActiveState Perl (which is what I'm on at the moment) and it seems to have a 'limited' offering of packages with their package manager PPM.

I can download the package from CPAN, but can't make it. I looked around and you can ahold of nmake from microsoft which got me part of the way there, but now I'm missing something called 'cl' (see, CC:cl in Makefile). This leads to a few questions,... Is the building of modules on Windows distributions of perl generally none transferrable? Is this a this particular package not made as OS independant as it could be? Is there a free version of 'cl' floating around that would allow me to build it myself?

Searching CPAN is came across PPM which allows you to make 'ppd' files from CPAN modules, which is what the ActiveState Package manager seems to like. The only thing is I can't make this from scratch either and it isn't offered as a Module from their master list that I can see?

Am I missing something or is getting packages ported to windows the bain of maintainers lives (yes, I know life would be easier on a linux box or something, but this is what I have to work with at the moment). Ideally, getting pointed to a ppd of the library I want would be the answer, but more generically being able to fold my own ppd's would be handy. Has anyone come across this before or can offer me some incite? I'm running perl 5.6.8.


Regards Paul

Replies are listed 'Best First'.
Re: ActiveState modules
by BrowserUk (Patriarch) on Mar 02, 2005 at 22:43 UTC

    The 'cl' you are referring to is cl.exe which is the MS VC++ compiler. You can download this (as a part of the huge VC++ compiler suite from here.

    Be warned. If you have never installed a compiler, you have a steep learning curve to master.


    Examine what is said, not who speaks.
    Silence betokens consent.
    Love the truth but pardon error.

      It should be noted that there are some caveats when compiling extensions with a different version of the compiler than that which compiled the Perl (which is the case when building modules for ActivePerl with the Visual C++ Toolkit), this is due to the fact that the C runtime libraries will reside in different DLLs so OS level objects that might be shared between Perl and the extension that are defined in the runtime (such as HANDLEs and so forth) will not be valid in the part that didn't define them. I was recently caught out by this with respect to Term::ReadKey and it is discussed here

      Of course modules that don't share C runtime thingies with Perl shouldn't be affected by this.

      /J\

        A good point worth noting++

        As it is, I still use the older version of VC++ (Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.00.9466 for 80x86) for anything Perl related, but I'm not sure if this is still available for download anywhere?


        Examine what is said, not who speaks.
        Silence betokens consent.
        Love the truth but pardon error.
      Thanks BrowserUk,

      I have the compiler installed no problems, but apparently perl\lib\CORE\win32.h includes windows.h. From memory this is the first port of call for all windows applications and looking at samples of it on the web it basically includes the rest of the world in .h format. The cut down toolkit does not come with the windows .h plethora of files, am I right in assuming one needs the full version of Visual studio to get these or are older versions of these also proferred around somewhere?

      Regards Paul
        From memory this is the first port of call for all windows applications

        You're memory is correct. I already had those header files from an earlier install.

        You probably need to get this (108 MB!), but that also has this (23MB) as a pre-requisite.


        Examine what is said, not who speaks.
        Silence betokens consent.
        Love the truth but pardon error.
Re: ActiveState modules
by radiantmatrix (Parson) on Mar 03, 2005 at 00:05 UTC

    You should be aware that ActiveState's method for "choosing" moules goes something like this:

    1. Mirror the CPAN
    2. Run each module through an automated compile
    3. If it works, it gets put on ASPN (which is what the PPM tool accesses)
    So, be warned that this is something that didn't pass an automated build process; that may be for some simple and easy-to-fix reason, but it might be a huge headache as well.

    Also, note that searching for module names with the familiar '::' separator doesn't always work with PPM. Try replacing it with '-'. I found that the build failed for this module by visiting the PPM site's "G" section (Must... resist... calling it... G spot...) and searching for 'Graph-Layout-Aesthetic'.

    radiantmatrix
    require General::Disclaimer;
    s//2fde04abe76c036c9074586c1/; while(m/(.)/g){print substr(' ,JPacehklnorstu',hex($1),1)}

      RadiantMatrix,
      Thats pretty neat. I didn't realize they autotested from CPAN. At least I know they tried now so I can pull the package apart and see what is broken for windows.
      Regards Paul.
Re: ActiveState modules
by chas (Priest) on Mar 02, 2005 at 23:39 UTC