Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

RE: Re: Can't use Win32 Perl to FTP - no Net::FTP for Win32?

by roberto (Acolyte)
on Nov 04, 2000 at 22:14 UTC ( [id://40008]=note: print w/replies, xml ) Need Help??


in reply to Re: Can't use Win32 Perl to FTP - no Net::FTP for Win32?
in thread Can't use Win32 Perl to FTP - no Net::FTP for Win32?

this requires "make" however and make is not standard on windows...
  • Comment on RE: Re: Can't use Win32 Perl to FTP - no Net::FTP for Win32?

Replies are listed 'Best First'.
RE: RE: Re: Can't use Win32 Perl to FTP - no Net::FTP for Win32?
by tye (Sage) on Nov 04, 2000 at 23:52 UTC

    Perl isn't standard on Windows either. And make is even easier to get (just one program to download) and is free. See one of the Win32 Perl FAQs for location.

            - tye (but my friends call me "Tye")
      Tye (if you'll pardon a stranger) - How about helping a few newbies along. Where is this easily downloaded make - a link would be nice. Thanks.

        To quote perlwin32.pod from Perl5.6.0, which can be found in the directory lib/pod under whatever directory you installed Perl into or by browsing html/index.html, selecting "Core Perl Docs", scrolling down until "perlwin32" (listed in alphabetical order), click it, click "Usage Hints", and scroll down a couple of screens to the "Building Extensions" heading and read:

        =item Building Extensions

        The Comprehensive Perl Archive Network (CPAN) offers a wealth of extensions, some of which require a C compiler to build. Look in http://www.cpan.org/ for more information on CPAN.

        Note that not all of the extensions available from CPAN may work in the Win32 environment; you should check the information at http://testers.cpan.org/ before investing too much effort into porting modules that don't readily build.

        Most extensions (whether they require a C compiler or not) can be built, tested and installed with the standard mantra:

            perl Makefile.PL
            $MAKE
            $MAKE test
            $MAKE install
        
        where $MAKE is whatever 'make' program you have configured perl to use. Use "perl -V:make" to find out what this is. Some extensions may not provide a testsuite (so "$MAKE test" may not do anything, or fail), but most serious ones do.

        It is important that you use a supported 'make' program, and ensure Config.pm knows about it. If you don't have nmake, you can either get dmake from the location mentioned earlier, or get an old version of nmake reportedly available from:

        ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
        (Update: the above hasn't worked the last few days I've tried but bikeNomad pointed me to this: http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe)
        (Update: They both work for me now, 2003-01-20.)
        Another option is to use the make written in Perl, available from CPAN:
            http://www.cpan.org/authors/id/NI-S/Make-0.03.tar.gz
            [Tye: changed link]
        
        You may also use dmake. See L</"Make"> above on how to get it.

        Note that MakeMaker actually emits makefiles with different syntax depending on what 'make' it thinks you are using. Therefore, it is important that one of the following values appears in Config.pm:

            make='nmake'        # MakeMaker emits nmake syntax
            make='dmake'        # MakeMaker emits dmake syntax
            any other value     # MakeMaker emits generic make syntax
                                    (e.g GNU make, or Perl make)
        
        If the value doesn't match the 'make' program you want to use, edit Config.pm to fix it.

        If a module implements XSUBs, you will need one of the supported C compilers. You must make sure you have set up the environment for the compiler for command-line compilation.

        If a module does not build for some reason, look carefully for why it failed, and report problems to the module author. If it looks like the extension building support is at fault, report that with full details of how the build failed using the perlbug utility.

        Note that you might be better off using dmake over nmake, so long as you follow the above instructions to tell Config (which tells MakeMaker) that you aren't using "nmake" like ActiveState did (or whatever was used by whoever built your copy of Perl).

        From earlier in the exact same file:

        =item Make

        You need a "make" program to build the sources. If you are using Visual C++ under Windows NT or 2000, nmake will work. All other builds need dmake.

        dmake is a freely available make that has very nice macro features and parallelability.

        A port of dmake for Windows is available from:

            http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip
        
        (This is a fixed version of original dmake sources obtained from http://www.wticorp.com/dmake/. As of version 4.1PL1, the original sources did not build as shipped, and had various other problems. A patch is included in the above fixed version.)

        Fetch and install dmake somewhere on your path (follow the instructions in the README.NOW file).

        But I should warn you that building extensions under Win9x has several catches due to the really poor command-line features of its COMMAND.COM. I know of three issues:

        1. A few places in generated makefiles say "dothis && dothat"
        2. A few places say "dothis 2>&1"
        3. A bug in the "perl Makefile.PL" step means that Perl.exe is not found
        I've seen patches for (1) and (3) (I made one of them) but I currently doubt that they've made it where they need to (the p5p mailing list). A quick fix for (1) is to change "&&" into a newline. It'd take me some digging to find the fix for (3). I'll bet (2) can usually be ignored.

        Note that I was disappoined with ActiveState's contribution here (that seems to happen a lot to me). I was pleased that their documentation mentioned building modules from CPAN but disappointed that the "make" issue was completely ignored.

        Also note that prior to Perl5.6.0, most of these links for finding versions of "make" appear to be missing.

        Just goes to show that there are always a million details to take care of and only several hundred thousand get done. (-:

                - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2024-04-19 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found