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

Hi, I am trying to install PDL from CPAN using cygwin. When I type in "install PDL", it downloads PDL and the other modules it needs (inline, Astro, OpenGL). But when it tries to write a Makefile, it gives me this error: c:\Dev-Cpp\bin\make.exe: *** No rule to make target `/usr/lib/perl5/5.10/i686-cygwin/Config.pm', needed by 'makefile'. STOP I have Dev-Cpp on my computer, but I don't know how it is related here. I appreciate any suggestions on how to fix this problem. Thanks

Replies are listed 'Best First'.
Re: PDL installation
by ikegami (Patriarch) on Feb 02, 2010 at 02:20 UTC
    It looks like you're using a non-cygwin make from when trying to build under cygwin. The non-cygwin make knows nothing of cygwin's virtual directory structure. MAybe this can be avoided by removing c:\Dev-Cpp\bin from your path.
Re: PDL installation
by pdltiger (Acolyte) on Feb 02, 2010 at 15:27 UTC

    PDL installations can be really nice when they run smoothly, but when they don't ... here be monsters. For future reference, and especially for others who read this post with their own PDL installation woes, the best place to post questions would be the PDL mailing list, which is perldl at jack.hawaii.edu WHERE you replace jack with jach.

    Here's my diagnosis of your problem. I assume you're somewhat familiar with makefiles, though if not you can skip over this diagnosis. Your error message indicates that you have some target in your makefile that depends on Config.pm, but Config.pm does not have a make rule. (In my makefile, the Config.pm dependence actually creeps in through the CONFIGDEP variable.) This should never happen because the Config.pm file should ALWAYS be created when you run Makefile.PL. That leads me to believe that your CPAN install process somehow managed to bork this step, which seems odd, to say the least.

    Hopefully a few manual commands will fix this. Try this at the CPAN prompt:

    cpan> look PDL # This will drop you into a shell # where you can issue commands by hand: shell> perl Makefile.PL shell> make

    If that goes well, you can finish with a couple more commands:

    shell> make test shell> make install shell> exit

    Post back and let me know what happens when you issue the initial two make commands.

    David
      Hi David, Thanks for replying. I tried what you said and when I typed "look PDL" it gave me this error: " Your configuration does not define a value for subshells. Please define it with "o conf shell <your shell>" " Also, I removed Dev-Cpp from my PATH and tried to install PDL again, but it still gave me the same error. When I read the error more carefully this time, it also said that my version of Perl was compiled by gcc.exe and it said that it located this file in my computer. I found out that this file is in Dev-Cpp\bin folder. Maybe that's why it is using Dev-Cpp version of make? Thanks for your help Milad
        It's best that Cygwin uses its own compiler and make utility - so you really do need to make the Dev-CPP stuff invisible.

        Firstly, are you running Cygwin from its bash shell ? (Double click \cygwin\cygwin.bat - there's probably a desktop icon that acts as a shortcut to that file.) Then, in that Cygwin shell, run echo $PATH. What does that produce ?

        Cheers,
        Rob

        You don't have a shell set? Well, I guess my not-Windows experience is bleeding through. You could probably set a shell, but I'm not sure exactly how to do that and it looks like you're getting better advice in some of the other responses.

        If you ever run into trouble in the future with a CPAN installation and want to try running the installation by hand, you should figure out how to set the shell (the command is given in the error message) and then it shold work.

        Good luck!