Flame has asked for the wisdom of the Perl Monks concerning the following question:
I've been struggling with this for the past year now, and it's finaly gotten to be enough to make me want to break something. I've attempted to install several modules over the past several years using PPM, only to find that NO-ONE has a PPM version of the module. Eg: CGI-Panel, the latest one to 'not be there'.
I have attempted to install several of these modules via CPAN, using every variation on make I can find:
I don't know what to try anymore, but I have NEVER gotten a module to install properly without PPM. I have tried CPAN, and downloading modules myself and going for a manual install... I have been unable to get things like mod_perl or, more recently, CGI-Panel installed. I'm getting really tired of this. Is it just me, or are other win32 users finding it to be a technical impossibility. I don't know what else to try... so I'm finaly giving in... HELP!
My code doesn't have bugs, it just develops random features.
Flame ~ Lead Programmer: GMS | GMS
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: nmake, CPAN and Modules not listed in PPM
by PodMaster (Abbot) on Oct 15, 2002 at 07:22 UTC | |
I have attempted to install several of these modules via CPAN, using every variation on make I can findWhy did you do that? You should only use what perl -MConfig die$Config{make} reports as your make tool. To attempt different ones would end in certain failure. I spend a good deal of time compiling modules, and maintaining my own ppm repository. CPAN.pm in my experience, has sucked enormously on win32 ~ CPANPLUS has faired better, but I still prefer to do things manually. The next release of CPANPLUS is highly anticipated, because it will essentially replace PPM (a great set of modules, but a very bad shell if you ask me). Now, I checked out CGI::Panel, and it requires Apache::Session, MD5, and Storable, all of which you should either have, or are available over ppm. I get all my Apache/mod_perl modules fro Randy Kobes's ppm repository, including Apache::Session. I suggest you update your CGI.pm ~ that way you can have at least 1 good install experience under your belt ;) update: If you dont' have your enviroment set up right, you may have to run vcvars32.bat. After a manual install, I also find it useful to run
Dog_and_pony: while that is true, I still need to run WriteToc sometimes, and well, I haven't typed the above snippet since I day I wrote it on my homenode (been cut'n'pasting ever since, and will continue to do so).
____________________________________________________ | [reply] [d/l] [select] |
by Dog and Pony (Priest) on Oct 15, 2002 at 11:20 UTC | |
You have moved into a dark place. It is pitch black. You are likely to be eaten by a grue. | [reply] [d/l] [select] |
|
Re: nmake, CPAN and Modules not listed in PPM
by grantm (Parson) on Oct 15, 2002 at 03:13 UTC | |
The Perl-XML FAQ addresses this in What if a module is not available in PPM format? But I've only used that for Pure Perl modules - ie: nothing that requires a C compiler. It definitely does work though. | [reply] |
by Flame (Deacon) on Oct 15, 2002 at 03:18 UTC | |
| [reply] | |
|
Re: nmake, CPAN and Modules not listed in PPM
by runrig (Abbot) on Oct 15, 2002 at 04:32 UTC | |
As long as there is no compiling involved, I've always been successful at manually installing modules using nmake.exe (the version straight from MS, like the link from here). When they do need to be compiled, I almost always find it in ActiveState's repository (though often not the latest version). One of your attempts above indicates you were installing a module that requires compiling (Digest::MD5 which I believe is available from ActiveState), another attempt (the XML::SAX) looks like you just didn't install a prerequisite module. Hang in there, keep trying, you'll get it eventually... | [reply] |
by Flame (Deacon) on Oct 15, 2002 at 13:34 UTC | |
It's my understanding that newer versions of PPM have a workaround for this, however when I tried moving to another version of ActivePerl, I was unable to install modules at all with PPM, CPAN or anything else, (looks like LWP was broken?) Anyway, this is sorta off-topic, but a real nusance... I don't know if they fixed it or not, I haven't looked in the past 4 months. My code doesn't have bugs, it just develops random features. | [reply] |
|
Re: nmake, CPAN and Modules not listed in PPM
by blm (Hermit) on Oct 15, 2002 at 03:19 UTC | |
Are there any examples of computer output/errors that you can post along with the particular module being built and the make utility used? You wouldn't happen to have tried MINGW? It has a unix-ish Make.exe and a gcc that creates native win32 binaries. If a module is not in the Activestate PPM (or is it PPD) repository it may be in someone elses that you can have ppm.bat search through. --blm-- | [reply] |
by Flame (Deacon) on Oct 15, 2002 at 04:09 UTC | |
I aborted it, and got:
I tried again using XML::SAX, which I heard was 'Pure Perl' to see if it makes a difference, I grabbed output where I could:
Then
And
Unfortunately, I have no idea what just over half of that really means as I rarely work with CPAN (obviously, because it doesn't work...) I hope this helps... My code doesn't have bugs, it just develops random features. | [reply] [d/l] [select] |
by blm (Hermit) on Oct 15, 2002 at 05:29 UTC | |
Thanks this does help In the output from building Bundle::CPAN the build of Digest::MD5 failed because it could not find cl.exe the linking program that comes with Visual Studio. It may also come with what was MASM. MASM seems to have been renamed to Build environment and might need Visual Studio to install it anyway. Relevant line:
With XML::Sax it seemed to fail as a dependancy was unsatisfied. It seems to need XML::NamespaceSupport which you attempted to build next. (Good!). Unfortunately the build failed with the following output indicating a syntax error in the makefile. Possibily the module assumes a GNU or UNIX-like Make binary. This banner indicates nmake.exe is being used. If I remember correctly it has differences in its makefile syntax :-( IMHO there is no simple answer to these problems. The Bundle::CPAN found you were running windows and adjusted accordingly but needed a cl.exe linker to link binary objects. Can you get Visual Studio or do you already have it? I am not sure what is best to fix the other problem. You have tried various make utilities. I will try installing these on my development machine and see what I can do: make some helpful instructions or a binary package. All of this may come down to the fact that on windows one doesn't get the compiler included with the OS. This is why I try to use linux or something similar _where possible_ Updated: Reread root node. You do have Visual Studio 6! Cool! Make sure that the dos environment variables are registered so it can find the cl.exe etal in the path and the .lib files. There would have been an option to register these variables at installation of VS 6. If this was not done there may be a batch file you can run to do this. --blm-- | [reply] [d/l] [select] |
by strat (Canon) on Oct 15, 2002 at 11:27 UTC | |
This tells you that the program cl.exe is not found in PATH. cl.exe is somewhere in the paths of VisualC++. If you add the path where you find it to your PATH-Environmentvariable, this error will probably not occur any more... Write something like the following at the end of your autoexec.bat (and then reboot):
Best regards, | [reply] [d/l] [select] |
by Flame (Deacon) on Oct 16, 2002 at 03:07 UTC | |
by grantm (Parson) on Oct 15, 2002 at 20:12 UTC | |
I have just tried installing XML::SAX using the CPAN shell and it worked for me. I don't have a C compiler installed, and wonder if the fact that you do might be your problem. Here's the version information from my copy of nmake:
If your version is newer, that may be contributing to the makefile syntax error message you're getting. I got my older version via the link in the Perl-XML FAQ (above). | [reply] [d/l] |
|
Re: nmake, CPAN and Modules not listed in PPM
by jjdraco (Scribe) on Oct 15, 2002 at 03:48 UTC | |
If this information could lead to a solution I would like to hear it too. jjdraco learning Perl one statement at a time. | [reply] [d/l] |
|
Re: nmake, CPAN and Modules not listed in PPM
by dug (Chaplain) on Oct 15, 2002 at 03:11 UTC | |
# ActiveState 6.5.1 Build 631 Wow. I want to live where you do. Elian, did I miss something on the parrot lists? <grin> | [reply] |
by Flame (Deacon) on Oct 15, 2002 at 03:15 UTC | |
| [reply] | |
|
Re: nmake, CPAN and Modules not listed in PPM
by mattr (Curate) on Oct 15, 2002 at 05:09 UTC | |
Anyway, in the end I am using Storable fine on windows but think I am using a version that came with the perl installation. Or I built it okay and forgot how I did it then installed it and forgot that too. :p To me nmake does not seem to solve all problems. I think it would be really really good to have a faq on PM (which I'd read too!) on how to build perl / perl modules on windows with free software. (i.e. is the answer cygwin, mingw, deeper activestate and module building knowledge, or what? Maybe we should be building our own perl in cygwin and not using activestate?) Anyway my motto about modules and windows is "it ain't over 'til the fat lady sings". I definitely am not going to try anything with Inline::C anytime soon on windows anyway. | [reply] |
|
Re: nmake, CPAN and Modules not listed in PPM
by tstock (Curate) on Oct 15, 2002 at 07:36 UTC | |
I gave up and decided to use a development platform, instead of win(whatever) for development. Thats how I _personally_ solved that problem. Yes, there is more than one way to do it, but some ways are just unnecessarily painful. tstock | [reply] |
|
Re: nmake, CPAN and Modules not listed in PPM
by Anonymous Monk on Oct 15, 2002 at 11:25 UTC | |
Did you try out dmake ? (Not the unix parallel build tool, the dmake they use for compiling openoffice.org!) THis helped me over all my trouble, even though I still consider manual build to be easiest on Win32 (mingw32). anonymous monk | [reply] |
|
Re: nmake, CPAN and Modules not listed in PPM
by gjb (Vicar) on Oct 15, 2002 at 09:56 UTC | |
| [reply] |
by Anonymous Monk on Oct 15, 2002 at 11:46 UTC | |
| [reply] |
|
Re: nmake, CPAN and Modules not listed in PPM
by quinkan (Monk) on Oct 15, 2002 at 23:27 UTC | |
Several points to make: 1. Even if you have VC++ installed, you need to set up your compiler environment properly before it will work. Installation of VC++ almost invariably creates a BAT file: VCVARS32.BAT which has the environment vars set up. Run this in your console if you get the "can't find cl.exe" messages. Otherwise, add the commands from VCVARS32.BAT to your AUTOEXEC.BAT file, if you have enough environment memory to do that. 2. Try CPANPLUS as an installation tool -- but be aware it has a few bugs. Mostly, it gives funny messages which seem ominous -- and then you find it worked anyway. 3. Make sure you update the ExtUtils::MakeMaker module. ASPN's 5.6.1 version of this had Win32 bugs galore, and these have been the source of most problems, in my experience. More recent versions are +much+ better. From memory, I think this update did most to fix those problems with Makefile command formats that were inconsistent with nmake. 4. Look to Randy Kobes' site for ppm files for many useful modules, and read the stuff he writes about them in various places (including newsgroups). He provides a great service for those of us who are OS-handicapped. Also check Dave Roth out, and http://www.northbound-train.com/perlwin32.html good luck. | [reply] |
|
Re: nmake, CPAN and Modules not listed in PPM
by Anonymous Monk on Oct 15, 2002 at 13:51 UTC | |
The source is there, and module owners will probably be interested in making their work cross-platform, especially when the other platform is such a major platform as Win32. So - you can either ask for documentation and do it yourself, or you can nag/bribe the module owner to make it Win32-compatible. Another way to get the module is to install Linux. Before you whince - remember that VMWare offers free trial of their software. VMWare will run Linux as an application under windows (and vice versa). As a means of checking out Linux without repartitioning your harddrive and configuring exotic hardware, it's a nice way to start. Please note that you will still need to install the actual Linux OS - VMWare just offers you a virtual machine to install it on so that your risk is lower. (Disclaimer : I use VMWare at work, but I don't work for them). I also believe that you can get prebuilt binaries of mod_perl-enabled apache for Win32 somewhere. The mod_perl homepage is probably you friend. | [reply] |
|
Re: nmake, CPAN and Modules not listed in PPM
by mojotoad (Monsignor) on Oct 15, 2002 at 16:50 UTC | |
Not to mention the shell saves on point-n-clickitis. It is a bit slower due to the extra layer, supposedly, but this has not been a problem for everyday uses not involving massive number crunching. Matt | [reply] |
by Dr. Mu (Hermit) on Oct 17, 2002 at 06:46 UTC | |
I've ported several ActivePerl programs to Windows machines lacking Perl using perl2exe. Just one executable and maybe a dll are all that need to be transferred. It's a simple, nearly flawless procedure. I've also ported Tcl programs written for cygwin to other Windows machines, and the process was very messy by contrast, requiring an installation of cygwin and numerous other files. How would this play out with Perl/cygwin? Could I still use perl2exe, or would I have to install Perl/cygwin on the target machine? | [reply] |
by mojotoad (Monsignor) on Oct 17, 2002 at 18:15 UTC | |
Tcl relies on libraries that must be present on the target system; hence more complexity in porting due to the extra compilation and installation of libraries -- much the same problem as with installing CPAN modules in ActiveState installations. cygwin, at its core, is nothing more than a library that handles system calls (think libstd.o) and maps them to associated sequences of calls in native Windows. It's an emulation layer, of sorts. As it turns out, the perl interpreter does much of this also -- so ActiveState perl can handle library calls normally associated with any other version of perl. The only requirement in moving a perl program or module from cygwin into the regular windows environment is that all Perl module dependencies are met -- that is, ActiveState perl must have the same modules installed as the perl installation in the cygwin environment. But therein lies the rub. Many modules require compilation using make and a C compiler. This is where most people run into trouble trying to install modules using CPAN on their ActiveState installations. This is where cygwin helps out -- this compilation and installation process for modules on CPAN. If it weren't for the complications arising from this step (namely the reliable presence of a compiler and version of make), moving Perl modules and programs back and forth from cygwin, unix, and Windows would be no problem.* Matt * This assumes programs that do not rely on OS-specific commands in system(), exec(), or backtick calls. | [reply] [d/l] [select] |
|
Re: nmake, CPAN and Modules not listed in PPM
by polypompholyx (Chaplain) on Oct 15, 2002 at 18:08 UTC | |
| [reply] |