Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

perl on win2k

by ekkis (Initiate)
on Nov 30, 2004 at 20:43 UTC ( #411273=perlquestion: print w/replies, xml ) Need Help??

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

dear perlmonks,

this poor pilgrim is at present travailing with the task of building perl on a Win2k box. why not just install ActivePerl or some other binary distro you might ask? the problem with distributions is always the same: the lack of ready-made packages for stuff one needs. - in my particular case, DBD::Sybase and DBD::Oracle.

so the goal is to have a source-based installation that allows me to /perl -MCPAN -e "install whatever"/

as per the instuctions in the perl source distribution, I've compiled and installed perl. when running the tests some stuff failed but in general everything seems to work.

however I'm now trying to build/install DBI. I have MSYS installed and used dmake to make perl.

the first thing that happens is I get:

cpan> install DBI Running install for module DBI Running make for T/TI/TIMB/DBI-1.46.tar.gz LWP not available Fetching with Net::FTP: +z CPAN: Digest::MD5 loaded ok LWP not available Fetching with Net::FTP: Checksum for C:\msys\1.0\home\ecalder\.cpan\sources\authors\id\T\TI\TI +MB\DBI-1.46.tar.gz ok Scanning cache C:\msys\1.0\home\ecalder\.cpan\build for sizes DBI-1.46/ DBI-1.46/Driver_xst.h DBI-1.46/DBI.xs /usr/bin/tar: Skipping to next header gzip: stdin: invalid compressed data--crc error /usr/bin/tar: 352 garbage bytes ignored at end of archive /usr/bin/tar: Error exit delayed from previous errors Uncompressed C:\msys\1.0\home\ecalder\.cpan\sources\authors\id\T\TI\TI +MB\DBI-1.46.tar.gz successfully Using Tar:C:\msys\1.0\bin\tar.EXE xvf C:\msys\1.0\home\ecalder\.cpan\s +ources\authors\id\T\TI\TIMB\DBI-1.46.tar: /usr/bin/tar: C\:\\msys\\1.0\\home\\ecalder\\.cpan\\sources\\authors\\ +id\\T\\TI\\TIMB\\DBI-1.46.tar: Cannot open: I/O error /usr/bin/tar: Error is not recoverable: exiting now Couldn't untar C:\msys\1.0\home\ecalder\.cpan\sources\authors\id\T\TI\ +TIMB\DBI-1.46.tar
however, I can do soemthing like:
# tar xzvf DBI-1.46.tar.gz
and that works... since that worked I cd into the directory and do /perl Makefile.PL/ and then /make/, which results in:
/bin/sh.exe: C:perlbinperl.exe: command not found make: *** [blib\lib\DBI\] Error 127
also /dmake/ yields:
dmake.exe: Error -- \bin\sh: No such file or directory
your wisdom is most valued.

- ekkis

Replies are listed 'Best First'.
Re: perl on win2k
by JSchmitz (Canon) on Nov 30, 2004 at 21:10 UTC
    ActiveState has those modules
    I can't really see the point in what you are trying to do - I mean you are trying to build something meant for a *nix distribution on a windows machine. ActiveState has a package manager that works pretty much like the perl -MCPAN -e shell command..just install ActiveState then from the install dir go to bin then fire up ppm should look like this:
    C:\Perl\bin>ppm PPM - Programmer's Package Manager version 3.1. Copyright (c) 2001 ActiveState Corp. All Rights Reserved. ActiveState is a devision of Sophos. Entering interactive shell. Using Term::ReadLine::Stub as readline lib +rary. Type 'help' to get started. ppm> install DBD::Oracle

      ppm> install DBD::Oracle
      if only it were that simple. another module I can't seem to find: Sybase::DBlib
        search first, install later
      > I can't really see the point in what you are trying to do

      one other thing that just kills me:

      # perl -D -le 'print "ok"' Recompile perl with -DDEBUGGING to use -D switch
      > I can't really see the point in what you are trying to do

      it's really more about the freedom to be able to install any module from CPAN I may need without being held hostage by the lack of a package than about compiling perl.

      I have found package support poor and to date I cannot make DBD::Sybase/Oracle work on anything above 5.6.0

      > ppm> install DBD::Oracle

      I get:

      Searching for 'DBD::Oracle' returned no results. Try a broader search +first.
      evn after adding the esoftmatic repository that olivierp pointed me to... and if I download the files myself and install them e.g. /ppm install DBD-Sybase.ppd/, trying to use I get errors:
      perl -le ' use DBI; use DBD::Sybase; '
      The context allocation routine failed. The following problem caused the failure: Invalid context version.
      it is SO painful to work in w2k! ah!!!
Re: perl on win2k
by olivierp (Hermit) on Nov 30, 2004 at 21:16 UTC
    While these 2 modules may not be the only ones you want / need, and that having your own source-based distribution has its advantages, I suggest you take a look here for DBI related ppm's for Win32.
    Those packages are frequently up-to-date with CPAN.
    There are also lots of other ppm repositories that can be of use, one of them is even run by a monk and accepts "packaging" requests under some conditions.
      thanks for the links. I had come across those repositories (the monk's, btw, hasn't been operational in a while... I remember it down a couple months ago when I first tried it). however what I can't seem to find is a working ppd of DBD::Sybase... even doesn't have one. which is why I'd love to be untethered from ActiveState... goes doesn once in a while, it happens with every host. Has worked for me all year
Re: perl on win2k
by osunderdog (Deacon) on Dec 01, 2004 at 03:37 UTC

    I agree with doing it from scratch.

    Have you tried nmake rather than dmake?

    Also, after you manually unpackaged the tar, have you tried to go back into CPAN and install the package? If you left it where it was it should be picked up by CPAN.

    Just some thoughts. Hope it helps.

    "Look, Shiny Things!" is not a better business strategy than compatibility and reuse.

      Why, he's not using microsoft compiler?

        Correct. I jumped the gun on that one.

        "Look, Shiny Things!" is not a better business strategy than compatibility and reuse.

Re: perl on win2k
by Anonymous Monk on Dec 02, 2004 at 12:34 UTC
    What is your perl -V? MSYS is not windows, so don't confuse the two.


    C:\>echo C:\Perl\bin\perl.exe C:\Perl\bin\perl.exe C:\>
    user@host ~ $ echo C:\Perl\bin\perl.exe C:Perlbinperl.exe user@host ~ $

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://411273]
Approved by JediWizard
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2022-07-02 14:19 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (103 votes). Check out past polls.