Two days ago, after successfully installing Alien::wxWidgets, Wx and Wx::Demo on Strawberry Perl, with a bit of trouble and a lot oit f time, I was curious to see how Wx::Demo works on ActivePerl, and if it shows the same screwed up result in the wxComboCtrl demo. (For the impatient: it does.)
ActivePerl has PPM
, right? So this should be a piece of cake. Let me see... Uh, nothing. Ooh yes, I forgot to add repositories. I'll add my favorites: TCool, Bribes, Trouchelle, UWinnipeg.
Good, now both Alien::wxWidgets and Wx appear. Smooth, in less than a few minutes, both are installed. Now to check, run
perl -MWx -le "print Wx->VERSION"
Uh oh... I get a Windows dialog box telling me some DLL (I forgot its exact name, something with "custom" in its name) can't be found, and the above command line just produces a syntax error, saying the module can't be loaded.
What next? Well, ActivePerl now supports the MinGW compiler, and I've got one installed as it came with the Strawberry distro... just add "c:\strawberry\c\bin
" back to PATH
, and I'm good to go.
So, uninstall Wx again, and try to install it with CPAN
. Wait a minute, now it says I don't have a (usable) Alien::wxWidgets? But I installed 0.45 with PPM? Aargh! So if you install Alien::wxWidgets with PPM, you can't use it to install Wx with CPAN
, and that's the main purpose of that module! Right, uninstall that too, and install it with CPAN
, too.
I was not expecting a smooth ride with CPAN
, and that's exactly what I've got. Installing in one go didn't work, obviously, so I broke it down into smaller tasks installing troublesome dependencies first. That did go smoothly, apart from one module that failed tests: Module::Build. I don't get why a module that is seen by many as the future of CPAN
, can be so much trouble. I assumed it would work well enough, so I force install
ed it.
Installing Alien::wxWidgets took... forever. I gave up waiting and went doing something else, even forgetting all about it. I was surprised to see, accidently stumbling back to this console window, that it was still actively chugging along. Anyway, it tested smoothly, and installed with no problems.
Installing Wx next, went a lot faster. In a matter of minutes it was installed. Well, sortof...
I got some trouble trying to open Wx. Even just "look Wx
" tried to unpack the package, ending in the error message
gzip: stdout: broken pipe
CPAN
barfing and refusing to open a shell.
I assume this implies that pipe between the external gzip
and tar
program are probably treated in text mode by mistake; maybe that my ports of these programs are broken. But replacing the UnxUtils programs with those from GnuWin32 offers no improvement whatsoever.
Strawberry Perl didn't have that problem. Let me see what's in its "o conf
" settings... a space?? In ActivePerl's CPAN
, both are empty. How can you do that...
o conf gzip ' ' o conf tar ' '
That works. I don't know what it means, I assume it now will try to use Perl modules instead of external programs, but at least, it no longer produces a broken pipe. That's what matters.
And now: no more broken pipe!
There was a problem with ExtUtils::XSpp, which refused to be installed as a dependency, it looks like it didn't even try (??), so I had to install that manually, and retry.
Argh, CPAN
, I hate you! If in the CPAN
shell, some step in the build process fails, and you retry, it'll happily assume that step worked and go to the next step, and then croak. Exiting CPAN
and relaunching it is often enough to really make it start over, but sometimes you may have to manually delete the built files.
Anyway, installing Wx finally worked. So did installing Wx::Demo. Running the demos shows that it all worked.
Conclusion: yes, you can install Wx on ActivePerl and the MinGW C compiler, but it'll take a lot of time, and some kicking of the (CPAN
) engine in strategic spots.
Oh, and yes, the combo control shows the exact same weird behavior as it did in Strawberry Perl, here's a screenshot to show what I mean). I'm curious to hear if it works better on other platforms than Windows it does. I'm trying to decide if it's a bug in Wx, or in Wx::Demo, and if it's tied to the platform.
p.s. Just earlier today I found there's a PPM repository on WxPerl's own site. Aargh! Well, it was an interesting experience anyway. And now I've got Wx version 0.93, which is a bit more recent than the version on that repository (0.89)... :)