|We don't bite newbies here... much|
Installing Template::Toolkit on Windowsby davies (Prior)
|on Feb 22, 2013 at 13:44 UTC||Need Help??|
This is needed by BugZilla and, I believe, other applications. Unfortunately, I've never been able to install it without a fight, one of which I documented in PPM has module but BugZilla says it's missing, and the goalposts seem to me to be highly mobile. I'm writing this in the hope that it will help people who are in the same position as I am and inspire those with the knowledge, power and tuits to make life a little easier for us lesser mortals. If you already know all these things, I will be wasting your time, but I had to do a lot of studying to work them out for myself. This is the short version.
The BugZilla installation instructions at https://wiki.mozilla.org/Bugzilla:Win32Install make the process look easy. The only route suggested is the command line as follows:
What could possibly go wrong? Well, it appears that ActiveState no longer serves TT, at least for 64 bit 5.16.2. At this point, I went off on a useless search. Google made it appear that there would be something useful at http://www.template-toolkit.org/. From here I went to the downloads page (http://www.template-toolkit.org/download/index.html) which talks about BugZilla. The links to ppm packages seemed to be exactly what I wanted. At this stage I was getting really optimistic, until I clicked on the link for the ppm download for TT. If you want to see a 404 error, this is the place to go (http://landfill.bugzilla.org/ppm/Template-Toolkit.ppd). As I said, the goalposts do seem to move, so I entertain hopes that this may change to something other than a dead end.
The next thing I tried was CPAN. While I was ultimately successful, I approached it with great trepidation. My only previous attempt (documented at Raspberry Pi: some sort of dependency hell involving YAML) had not been a success, and the helpful advice to use something else still rang in my ears. I didn't think that AS would have written ppm if CPAN worked better all along. It didn't start well, either. It tried to install "dmake" and the MinGW c compiler (which I thought I had installed anyway with git) and failed. The process threatened "This may take a few minutes", but I have a fast, powerful computer that was running nothing else, as well as a fast internet link, so it only took about 20 minutes. Anyway, I have no idea whether these things are necessary nor, in the case of "dmake", what its purpose is, so I decided to keep trying.
CPAN's help (brought up by "h"), is more of the form of a memory jogger than something to get the beginner started. It assumes rather a lot of knowledge, especially about things like "make". I believe that dmake and nmake (of which more later) are Windows variants of make, but if someone corrects me they are more likely to be right than I am. But it suggests install so, following ppm, I tried install Template-Toolkit. This complained about being unable to find the package, but suggested using i. This returns a list of possibilities, but there is little or nothing to indicate what to do next. I don't know if it is what I want, but the incantation that seemed to give me progress was install ABW/Template-Toolkit-2.24.tar.gz.
The process started with the reporting of so many files that I couldn't scroll back to the start as the buffer (set to the maximum Windows will allow) wasn't large enough. It then complained about the lack of a c compiler and make utility and started - apparently - the same process that had taken 20 minutes to fail earlier. Another 20 minutes later, I was pleasantly surprised to see a report of success. I was also told Please use the `dmake` program to run commands from a Makefile! without any clue as to where to find dmake, what a makefile is or why I might want to run commands from one.
I then got a lot of text about Template::Stash::XS, followed by a pair of options where I used the defaults:
I suspect that these should not be chosen unless a c compiler is available, but as indicated earlier, I'm not absolutely sure what constitutes "available". Anyway, this produced some encouraging messages until a range of colours that I won't attempt to reproduce reported (I've tried to improve the wrapping):
First, the "dmake" commands have to be run in a way I didn't expect which I will explain in the next paragraph. Second, "the README" file is either missing or lost among all the others that exist on my machine. Third, the mention of "nmake" seems to be a total red herring. These can prove a vast time sink and certainly got me nowhere. I made further progress only when I gave up and tried to install again from scratch.
This failed with the message Has already been unwrapped into directory C:\Perl\cpan\build\Template-Toolkit-2.24-RFIUGI. However, this gives an important clue. Leaving the CPAN shell, I changed to this directory and then tried issuing the three "dmake" commands suggested earlier.
Bugzilla's checksetup routine now indicates that TT is present. Only 9 more modules to go.