http://www.perlmonks.org?node_id=1032375

HelenCr has asked for the wisdom of the Perl Monks concerning the following question:

Dear esteemed PerlMonks

I am trying to install (building first) Alien::wxWidgets with wxWidgets 2.9.4.

Build is failing - I'll be thankful to you for your help and advice.

Update 1: I've made a little progress, but then hit errors again; please see this post below in this thread: Re^2:Tiny, temporary progress, then an error again

Update 2: Problem in "Update 1" above, apparently fixed; there was a wrong setup.h file in the main wx directory. I took that file away, and then gmake charged on for about 25 minutes, doing compiling and linking. Then it broke, saying:

Creating library file: ..\..\lib\gcc_dll\libwxmsw29u_gl.a if not exist ..\..\lib\gcc_dll\mswu\wx mkdir ..\..\lib\gcc_dll\mswu\wx Unable to find setup.h directory at inc/My/Build/Win32.pm line 117.

The source of My::Build::Win32.pm can be found here: http://cpansearch.perl.org/src/MBARBON/Alien-wxWidgets-0.51/inc/My/Build/Win32.pm

Update 3: (5 14 2013): Working around several hitches, I've succeeded in building and installing Alien::wxWidgets: see below here: Re^2: Moderate success - and some questions

Update 4: (5 18 2013): I gave up on the struggle to fix wxWidgets 2.9.4 on Strawberry Perl (I've implemented all the expert advice and it didn't help the wxbase294u_gcc_custom.dll perl.exe crash; so I've installed Citrus Perl).
There, there are some problems installing some necessary additional modules - I'll be thankful to you if you could have a look at it: Citrus Perl: problems trying to load additional modules

I'm now running Strawberry Perl 5.16.3 on Windows 7.

(continuation of original post - disregard - not up-to-date):
____________________________________
Here is the log*:

C:\Users\Helen\.cpanplus\5.14.2\build\Alien-wxWidgets-0.64>Build Building Alien-wxWidgets Fetching wxWidgets... fetching from: http://prdownloads.sourceforge.net/wxwindows/wxWidgets- +2.9.4.tar.bz2 Extracting wxWidgets... Patching wxWidgets... Applying patch: C:\Users\Helen\.cpanplus\5.14.2\build\Alien-wxWidgets- +0.64\patches\wxMSW-2.9.4-makefiles.patch perl -pe "" -- "C:\Users\Helen\.cpanplus\5.14.2\build\Alien-wxWidgets- +0.64\patches\wxMSW-2.9.4-makefiles.patch " | "..\inc\bin\patch.exe" -N -p0 -u -b -z .bak patching file build/msw/makefile.gcc Applying patch: C:\Users\Helen\.cpanplus\5.14.2\build\Alien-wxWidgets- +0.64\patches\wxMSW-2.9.4-setup.patch perl -pe "" -- "C:\Users\Helen\.cpanplus\5.14.2\build\Alien-wxWidgets- +0.64\patches\wxMSW-2.9.4-setup.patch" |"..\inc\bin\patch.exe" -N -p0 +-u -b -z .bak patching file include/wx/msw/setup.h Applying patch: C:\Users\Helen\.cpanplus\5.14.2\build\Alien-wxWidgets- +0.64\patches\wxWidgets-2.9.0-magic.patch perl -pe "" -- "C:\Users\Helen\.cpanplus\5.14.2\build\Alien-wxWidgets- +0.64\patches\wxWidgets-2.9.0-magic.patch" | "..\inc\bin\patch.exe" -N + -p0 -u -b -z .bak patching file src/generic/grid.cpp Hunk #1 succeeded at 6082 (offset 485 lines). Applying patch: C:\Users\Helen\.cpanplus\5.14.2\build\Alien-wxWidgets- +0.64\patches\wxWidgets-2.9.4-plugin.patch perl -pe "" -- "C:\Users\Helen\.cpanplus\5.14.2\build\Alien-wxWidgets- +0.64\patches\wxWidgets-2.9.4-plugin.patch" | "..\inc\bin\patch.exe" - +N -p0 -u -b -z .bak patching file src/common/dynload.cpp if not exist gcc_mswudll mkdir gcc_mswudll process_begin: CreateProcess(NULL, -c "if not exist gcc_mswudll mkdir +gcc_mswudll", ...) failed. make (e=2): The system cannot find the file specified. gmake: [gcc_mswudll] Error 2 (ignored) if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll process_begin: CreateProcess(NULL, -c "if not exist ..\..\lib\gcc_dll +mkdir ..\..\lib\gcc_dll", ...) failed. make (e=2): The system cannot find the file specified. gmake: *** [..\..\lib\gcc_dll] Error 2 system: gmake -f makefile.gcc all UNICODE=1 MSLU=0 BUILD=release SHAR +ED=1 DEBUG_INFO=default DEBUG_FLAG=1 LDFLAGS=" -m32" CPPFLAGS="-m32" +: 512 at inc/My/Build/Win32.pm line 274
I am running DWIM Perl 5.14.2 on Windows 7.

What to do?

Many TIA - Helen

______________________________________________________
* this is in continuation to node: perlmonks.org/?node_id=1031454

Replies are listed 'Best First'.
Re: Build of Alien::wxWidgets failing: help
by jmlynesjr (Deacon) on May 07, 2013 at 01:21 UTC
      Thank you, James and AM.

      Now James: studying your link, the solution over there instructs one to make sure that setup.h from wxWidgets-2.9.4_Headers exists in

      WxWidgets\include\msvc\wx.
      In my case, setup.h is there, so this apparently is not the problem.

      AM: studying the bug reports you quote, they discuss mingw32-make.exe. My DWIM Perl installation (v 5.14.2) does not contain mingw32-make.exe. And indeed the error messages do not mention mingw32-make.exe. Instead, the relevant error messages are, in my opinion:

      ... ... make (e=2): The system cannot find the file specified. gmake: [gcc_mswudll] Error 2 (ignored) ... make (e=2): The system cannot find the file specified. gmake: *** [..\..\lib\gcc_dll] Error 2

      So it seems that it's looking for the files: gcc_mswudll and gcc_dll (or gcc_mswu.dll and gcc.dll?), which don't exist at my installation.

      Now I happened to hit this on the NET:
      www.nntp.perl.org/group/perl.wxperl.users/2013/02/msg8839.html , where Mark Dootson says:

      5.14.2.1 (November 2011) as included with DWIM Perl contains a gcc tool chain that is not compatible with Wx / wxWidgets 2.9.x builds
      So is the situation calling for an update to the Perl version? (to Strawberry Perl 5.16.x)?

      Many thanks for your dedication; and TIA - Helen

        That or try to install CitrusPerl, that we know works.

        James

        There's never enough time to do it right, but always enough time to do it over...

        AM: studying the bug reports you quote, they discuss mingw32-make.exe. My DWIM Perl installation (v 5.14.2) does not contain mingw32-make.exe. And indeed the error messages do not mention mingw32-make.exe. Instead, the relevant error messages are, in my opinion:

        Do you have a make.exe and a sh.exe in your %PATH%?

        I get that error message when I have those two files in path.

        I remove those two files from path, and it builds without problems

        This is a bug in wxWidgets makefile/bakefile...

Re: Build of Alien::wxWidgets failing: help
by markwx (Acolyte) on May 12, 2013 at 11:27 UTC

    Hi,

    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 5.16.3.1 - 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\relocation.pl.bat. 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

      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

      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 :)

Re: Build of Alien::wxWidgets failing: help
by Anonymous Monk on May 06, 2013 at 19:33 UTC

    What to do?

    use ppm, obviously