Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Build of Alien::wxWidgets failing: help

by markwx (Acolyte)
on May 12, 2013 at 11:27 UTC ( #1033184=note: print w/replies, xml ) Need Help??

in reply to Build of Alien::wxWidgets failing: help


As the current maintainer of Alien::wxWidgets I thought I had better check that the current version does build perfectly well with currently Strawberry Perl. I can confirm that it does.

My steps to confirming this on a 32 bit machine were:

1. Download the zip package of Strawberry - I have multiple Perl installations and did not want the Strawberry msi messing with my environment.

2. Extract the zip contents to C:\Perl\strawberry5163

3. Run the relocation batch file C:\Perl\strawberry5163\ I did this by just double clicking in explorer.

4. As I didn't use the MSI I need to have a batch file to open a command prompt with the correct environment, so I created strawb5163.bat with the following 5 line content:

set PATH=C:\Perl\strawberry5163\perl\bin;%PATH%
set PATH=C:\Perl\strawberry5163\perl\vendor\bin;%PATH%
set PATH=C:\Perl\strawberry5163\perl\site\bin;%PATH%
set PATH=C:\Perl\strawberry5163\c\bin;%PATH%
cmd /K

I ran this batch file to open a command prompt. I downloaded Alien-wxWidgets-0.64.tar.gz from CPAN and extracted the content. I changed to the resulting directory within my command prompt and did:

perl Build.PL

I answerwed yes to 'download and build' and selected '2.9.4'.

It all built with no problems using the usual

perl Build
perl Build test
perl Build install

I don't know why you would think messing around with the wxWidgets source might help.

Anyhow, I would suggest you build with the following to get a fully featured Wx / wxWidgets

perl Build.PL --wxWidgets-graphicscontext
perl Build
perl Build test
perl Build install

  • Comment on Re: Build of Alien::wxWidgets failing: help

Replies are listed 'Best First'.
Re^2: Moderate success - and some questions
by HelenCr (Monk) on May 14, 2013 at 14:57 UTC
    Dear markwx

    Thank you for your time and work. After two weeks (!) of wrestling and struggling, I have succeeded (I think*) in building and installing Alien::wxWidgets 2.9.4 on StrawberryPerl 5.16.3.
    I must say that the road was strewn with pitfalls and gotchas.

    For the benefit of the PerlMonks community, here is the story and the details:

    1. Firstly, I wanted to use StrawberryPerl 5.16.3, since I've read some recent answer by Mark Dootson, that you need 5.16.3 for successful use of wxWdigets 2.9.4.
    So I downloaded SB 5.16.3 64 bit (since I'm using Windows 7 64 bit), and installed it.
    According to the documentation, in order to run side-by-side multiple Perl installations, all you need to do is to tweak the ENV variables so they should point to the right Perl installation. So, I did that.

    2. First hitch: I have been using CPANPLUS (typing "cpanp" at the command prompt) to download and install modules. CPANPLUS now ships with standard Perl distributions, and is considered more user friendly and offering more functionality than cpan. It turns out that CPANPLUS has something called "indices cache" (whatever that is - I couldn't find any documentation for it), and if you don't refresh that cache, cpanp keeps pointing to the previous Perl installation. It took me a couple of days to find out that you have to type: "x" at the cpanp shell, in order to refresh that cache.
    I did that. Then, in order to build and install wxWidgets 2.9.4, you need to enter some parameters (mainly the wxWidgets version number, 2.9.4) locally; so you can't just go: >i n at the cpanp prompt. (n is just an integer index number of the Alien::wxWidgets module in the cpanp search list). You need to go:   cpanp>z n.
    This: a. downloads wxWidgets, b. expands the tarball, and c. opens a shell where you can enter the Perl build commands.
    cpanp stores all of that at:
    C:\Documents and Settings\YourUsername\.cpanplus\5.16.3\build\Alien-wxWidgets-0.64\.
    Since this path contains spaces, it creates a big problem that we'll hit later on.

    3. Anyway we go: perl Build.PL, and immediately hit the next hitch: "Cannot find the file specified":

    doing extensive Googling, one finds that there is lots of stuff and advice in the NET about this problem; it turns out that it's a PATH issue (the script wrongly pulls-in some executables from a stray CPP compiler installation (cygwin?) on your system, instead of your StrawberryPerl's gcc). So I hacked PATH to contain only the system %windir% and the perl bin and lib directories. Once I did that, build charges ahead merrily for about 25 minutes, doing compilations and links.

    4. Then we hit the next hitch I mentioned above: the "spaces in the dirname" problem:

    What I did then to workaround that: I opened a new directory: c:\build, and moved \Alien-wxWidgets-0.64 there, (whereby moving there everything below it).
    Build, build test and build install then completed successfully.

    5. The next step was to install Wx::. You go: cpanp>m Wx and you get a long list of modules, where, let's say, the number n corresponds to Wx::. You then go:  cpanp>i n. It then went into about 30 minutes of compilations and linkings, and then in the testing, it crashed with:

    and here is the part in the log where it occurred:

    Amazingly, cpanp came back then and asked whether to ignore it and continue. I answered "yes", and it completed the installation.

    Things seem normal now; when I go: >perl -MWx -le " print join q/ /, $Wx::VERSION, Wx::wxVERSION_STRING "
    I get: 0.9922 wxWidgets 2.9.4.
    Several applications I have using wxWidgets are behaving normally.

    I hope I don't have a broken module somewhere, or a broken wxWidgets class lurking somewhere, that in the future will break exactly at the wrong moment.
    Update: Indeed, the problem (apparently in wxbase294u_gcc_custom.dll) has already showed up here: wxPerl: attempting to install Wx::Demo crashes perl.exe

    So markwx (and all knowledgeable Monks), I'd like to ask you the following questions:

    1. Can I re-test Alien::wxWidgets and/or Wx::, in order to pinpoint whether there is a broken module or class somewhere?
    2. Using  cpanp> z Alien::wxWidgets to do the installation, is there a way to configure CPANPLUS and tell it to set a different build directory (to workaround the "spaces in the path" problem?)
    3. Can you explain the way to overcome the PATH problem? (in section 3 in the story above - that's different from the spaces issue)?
    Many TIA - Helen
    * I'm saying; "I think", since, as you can glean from the long story, there is some chance that there is a breakage somewhere

      do you have Wx::OpenGL? Wx::Scintilla? Wx::ActiveX or others like that, that come from cpan?

      You'll have to recompile each and every one of those too

        Uninstall all available that depend on Wx

        cpanp -u Wx::ActiveX Wx::DialUpManager Wx::GLCanvas Wx::Metafile Wx::Mozilla Wx::PdfDocument Wx::Polygon Wx::Scintilla Wx::WebKit

        Then install the ones Wx::Demo uses

        cpanp -i Wx::ActiveX Wx::GLCanvas Wx::PdfDocument

Re^2: Build of Alien::wxWidgets failing: help
by Anonymous Monk on May 16, 2013 at 10:00 UTC

    Anyhow, I would suggest you build with the following to get a fully featured Wx / wxWidgets perl Build.PL --wxWidgets-graphicscontext perl Build perl Build test perl Build install

    If you have an existing build directory, like is common with wxWidgets, might have to  build realclean before you can rebuild with graphicscontext -- it appears that I have to (doing that now)

      like is common with wxWidgets,

      And cpanplus :)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2021-05-17 04:55 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (154 votes). Check out past polls.