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

Re^2: How to change compiler options used by cpan ?

by flamey (Scribe)
on Mar 01, 2011 at 15:22 UTC ( [id://890775]=note: print w/replies, xml ) Need Help??


in reply to Re: How to change compiler options used by cpan ?
in thread How to change compiler options used by cpan ?

Well, everything was working before at some point, and got screwed up somehow. So, I think re-installing everything is a last resort, and possibly temporary solution, until it gets screwed up again. It's also mean re-installing a lot of modules again. And I'll learn nothing from this.

I don't want to copy as in copy files. I want to copy some settings, in particular compiler, linker, and makefile related settings. Making prior backups would be a key in this process.

  • Comment on Re^2: How to change compiler options used by cpan ?

Replies are listed 'Best First'.
Re^3: How to change compiler options used by cpan ?
by CountZero (Bishop) on Mar 01, 2011 at 18:58 UTC
    Well ... sounds familiar.

    I have been using AS Perl for many years, but for some unknown reason, the cpan of Perl 5.10 stopped working reliably.

    Re-installing Perl cured it for a while, after which again it "broke".

    I switched to strawberry-perl and had no problems since.

    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^3: How to change compiler options used by cpan ?
by Marshall (Canon) on Mar 02, 2011 at 15:38 UTC
    In general, you should use the Active State ppm tool and their repository to install modules. You get something that was compiled with the "right" compiler for all the XS parts and it is a faster installation process.

    The ActiveState modules use VC6 or mingw. The difference is that these link with the standard Windows memory management MSVCRT.dll, not some other one. This detail is important. This is memory management, malloc, free, etc.

    If something does not exist in the ppm repository, I have found that the most often case is that some pre-requisite doesn't work on Windows and won't compile.

    The number of modules that you install via the cpan shell versus the ppm shell should be very, very few (if any). Expect trouble every time you do this...Expect big trouble. If it is easy, ActiveState has already done it.

    I am working on one: WWW::Mechanize::Shell and can't get it to work because of a non-compilable module on Windows. I don't know if I will ever get it to work. If by the way anybody knows how to get this done, please tell me!

    If you want to re-install ActiveState...there are 2 important features of command line ppm that you need to know about:

    ppm profile save [ *filename* ] ppm profile restore [ *filename* ]
    Profile save will generate an XML file that describes all of your installed modules.

    Uninstall ActiveState to the extent that you can. Run uninstall and if your installation is really old, you may need to delete some directories also. Then, New install of the base ActiveState PERL system, then run from the command line, the ppm restore command. This XML profile is transferable between machines. There can be complications with paths, etc. For example I have cygwin on my machine and ActiveState wants a different version of compiler and "make". Running the "restore profile" will set things in order.

    If you have one machine on the same OS that works and another that does not. Then save the profile on the one that works. Do a un-install, then re-install, run profile file on the one that doesn't work. Of course I would keep a backup if this didn't work! I would imagine that you will have to do some manual installation the few modules on CPAN that are not in the PPM repository. There were troubles installing these to begin with and you will have to go through that again. If there were no troubles, then probably you would save yourself a LOT of grief by first looking at the ppm repository.

    running the cpan shell on ActiveState is a desperation move. It should however talk you through the compiler and dmake installation.

    An ActiveState install from the ppm repository is going to work. And has had at least some minimal testing by ActiveState. When you try to install a random CPAN module, it may or may not work under Windows due to a very long list of issues.

    When you run the "cpan" for the first time, it will prompt for lots of stuff. This is similar in Linux. In general that program is smarter than you are about what you do and you should accept the defaults.

      In general.. Well that implies tjat a PPM package exist which often is not the case unfort. Esp not for newer releases of Perl. And for the non commercial people in the world. Activestate does not allow downloading of older versions.

Re^3: How to change compiler options used by cpan ?
by Anonymous Monk on Mar 01, 2011 at 16:41 UTC

    What did you do to break it? The lesson should be 'don't do that!', and then reinstall to fix it right.

    A before & after diff of the install directory may help to figure out what broke.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 20:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found