Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl for Windows ?

by Herkum (Parson)
on Mar 01, 2008 at 06:43 UTC ( [id://671342]=note: print w/replies, xml ) Need Help??


in reply to Perl for Windows ?

Answer this question, do you use/need lots of CPAN modules? if the answer is yes lean towards a *NIX solution.

Activestate Perl is alright, but its lack of maintenance of PPM packages and no make (nmake is NOT a good replacement) basically cripples your ability to use CPAN which, to me, is the biggest benefit of Perl. You can get by without most of the CPAN stuff but it certainly is not the same.

Replies are listed 'Best First'.
Re^2: Perl for Windows ?
by syphilis (Archbishop) on Mar 01, 2008 at 07:59 UTC
    do you use/need lots of CPAN modules? if the answer is yes lean towards a *NIX solution

    Had you asked "do you use/need lots of *NIX modules?", I would have agreed with the answer you gave ... but you didn't, and I don't.

    Recent versions of 'nmake' are fine, and there's also the excellent and actively maintained 'dmake' freely available from CPAN. ActivePerl works fine with both 'dmake' and 'nmake', and with both the MinGW (port of gcc) and Microsoft compilers. Then, of course, there's Strawberry Perl which includes both 'dmake' and the MinGW compiler with it. In short, CPAN is now very accessible to Win32 builds of perl.

    Cheers,
    Rob

      Thirded. I use AS builds, MSC v6 and nmake v7. I install most modules manually. Downloading the .gz; use gunzip and tar from UnxUtils; then the four part mantra.

      Some modules that have particularly complex dependancies on third party modules, GD for example, I have built myself, but it is simply easier to use a PPM if it is available.

      The main problem I encounter when building XS modules is unresolvable externals, usually from Perl%x.dll. The source of this problem is that win32 allows the programmer to specify which entrypoints in .dll are exported. This is used on win32 builds to ensure that only those entrypoints that are part of the official PerlApi are exported.

      Under *nix using gcc et al. either a) has no way to limit what is exported from an .so; b) there is a mechanism but it isn't used. Either way, the result is that programmers writing XS modules under *nix, frequently use functions from perl58x.so that aren't officially a part of the PerlApi and don't notice because they get resolved and work. But when someone comes to try and build those modules on win32, those unofficial apis won't resolve. The originating authors without access to/interest in win32 simply put the problem down to "windoze" and that's where it ends.

      If one #define was changed to allow all the functions in perl5x.dll to be exported, another huge swath of failures would disappear.


      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.
        If one #define was changed to allow all the functions in perl5x.dll to be exported, another huge swath of failures would disappear

        This, I expect, alludes to (eg) your attempts to build Data::Alias as discussed in From whence comes perl-5.8.6-smartmatch.tar?.

        Is it really just a matter of changing one #define ? If so, which one ? - and what's the change ? It could be interesting to build perl with that one define changed appropriately - and then see what happens as a result of that change. (Did we ever determine the reason that not all functions are exported ?)

        Cheers,
        Rob

      Perl has lots of modules that have nothing to do with *NIX. To use those modules you need make. Let me give you an example. Consider the Template module.

      The PPM for Template is listed as 1.11(from Activestate), the current version on CPAN is 2.19. I was using version 2.15 recently and came across a bug in which it does not like to using DateTime modules in the template itself( example: can be found here). The answer was to use the XS version of Template The XS version requires make(refer to Corion's post for clarity), nmake did not work. I tried to find a compiled version, and in the Template tarball the INSTALL file refers to a web site that is about 4 years out of date. I got lucky, the bug was fixed in the non-XS version of Template in 2.19, but these sorts of situations can be common.

      More than a few times I have had to go back and forth between CPAN and PPM trying to get a combination of modules from either or to get the functionality that I want. It is not fun.

        The XS version requires make (nmake did not work).

        This is wrong on at least two levels.

        There are three flavours of make-style programs for Windows Perl - nmake.exe from Microsoft, dmake.exe (originally Watcom?) and the Borland

        make.exe</p>. ActiveState Perl is the only Perl that uses and supports + PPM, and it will always be configured to use <c>nmake.exe</p>. <p>If you want to <i>install</i> modules via CPAN, you need a <c>make
        -style program. If you want to compile XS components, you need not only a make-style program but also the (exact) C compiler that your Perl was compiled with. ActiveState Perl is built using Microsoft Visual C++ 6.0 (MSVC6), so you will need that. You can get adventurous and also configure it to use the MinGW build of gcc, which then turns your ActiveState Perl into a Perl that can easily build self-contained XS distributions from CPAN as well.

      I fully second your opinion!

      I run ActiveState Perl + MinGW + a recent nmake.exe and I have installed on my laptop a local CPAN-mirror which is updated daily, so even when in the air or under water I can still install almost any module I like.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re^2: Perl for Windows ?
by stiller (Friar) on Mar 01, 2008 at 08:10 UTC
    Activestate Perl is alright, but its lack of maintenance of PPM packages and ...
    I use Ubuntu on my own computer, Red Hat on company servers, Windows/ActiveState and Windows/Cygwin on company desktops.

    I must say ActiveState has become very nice the last couple of years. No matter what OS you choose, the relationship between CPAN and OS distros is an issue at some point, more for those that habitually tries very many different packages all the time. Usually that is not a problem google can't help. Sometimes it is. Not a big issue. Note that there is suplementary repositories for most distros, including ActiveState.

    That off course, does not mean that I shouldn't soon try out Strawberry, I will...

    Edit: Almost forgot: If Ubuntu is OP's favourite, I would try to find out if Wine was a viable option, or if running windows and flightplanner in VmWare is. If not, I'd go for dual boot.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://671342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-03-28 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found