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

Dear Monks,

I'm running on 64-bit CentOS 6.5 with perlbrew installed. Under perlbew, I've compiled up 5.19.8 as a 64-bit Perl with thread support:

> uname -a Linux localhost.localdomain 2.6.32-431.1.2.0.1.el6.x86_64 #1 SMP Fri D +ec 13 13:06:13 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux > perl -v This is perl 5, version 19, subversion 8 (v5.19.8) built for x86_64-li +nux-thread-multi

My ultimate goal is to get the latest version of Padre running (I currently have Padre 0.96 installed using the system Perl 5.10.1 that comes with CentOS; I can't upgrade Padre via cpan as root for the system, because it requires a newer version of Perl, which is why I'm trying perlbrew).

Using cpan as my normal user, I've updated all the packages that need updating. I am now trying to get Wx installed, but it fails. Here is the last few lines of the build log:

make[1]: Entering directory `/home/myuser/.cpan/build/Wx-0.9922-nFvy2q +/ext' make[2]: Entering directory `/home/myuser/.cpan/build/Wx-0.9922-nFvy2q +/ext/mdi' cp lib/Wx/MDI.pm ../../blib/lib/Wx/MDI.pm Running Mkbootstrap for Wx::MDI () chmod 644 MDI.bs /export/myuser/perl5/perlbrew/perls/perl-5.19.8/bin/perl5.19.8 /export +/myuser/perl5/perlbrew/perls/perl-5.19.8/lib/5.19.8/ExtUtils/xsubpp +-noprototypes -nolinenumbers -typemap /home/myuser/perl5/perlbrew/pe +rls/perl-5.19.8/lib/5.19.8/ExtUtils/typemap -typemap ../../typemap -t +ypemap typemap MDI.xs > MDI.xsc && mv MDI.xsc MDI.c g++ -pthread -c -I. -I../.. -I/usr/lib/wx/include/gtk2-unicode-rele +ase-2.8 -I/usr/include/wx-2.8 -D_REENTRANT -D_GNU_SOURCE -fno-strict +-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_S +OURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.01\" -DXS_VERSION=\" +0.01\" -fPIC "-I/home/myuser/perl5/perlbrew/perls/perl-5.19.8/lib/5.1 +9.8/x86_64-linux-thread-multi/CORE" -DWXPL_EXT -D_FILE_OFFSET_BITS=6 +4 -D_LARGE_FILES -D__WXGTK__ MDI.c rm -f ../../blib/arch/auto/Wx/MDI/MDI.so LD_RUN_PATH="/usr/lib" g++ -shared -fPIC -shared -O2 -fstack-prote +ctor MDI.o -o ../../blib/arch/auto/Wx/MDI/MDI.so \ -lpthread -lwx_gtk2u_core-2.8 -lwx_baseu-2.8 \ /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4. +4.7/../../../libwx_gtk2u_core-2.8.so when searching for -lwx_gtk2u_co +re-2.8 /usr/bin/ld: skipping incompatible /usr/lib/libwx_gtk2u_core-2.8.so wh +en searching for -lwx_gtk2u_core-2.8 /usr/bin/ld: cannot find -lwx_gtk2u_core-2.8 collect2: ld returned 1 exit status make[2]: *** [../../blib/arch/auto/Wx/MDI/MDI.so] Error 1 make[2]: Leaving directory `/home/myuser/.cpan/build/Wx-0.9922-nFvy2q/ +ext/mdi' make[1]: *** [subdirs] Error 2 make[1]: Leaving directory `/home/myuser/.cpan/build/Wx-0.9922-nFvy2q/ +ext' make: *** [subdirs] Error 2 MDOOTSON/Wx-0.9922.tar.gz /usr/bin/make -- NOT OK Failed during this command: MDOOTSON/Wx-0.9922.tar.gz : make NO

I have wxGTK-devel installed:

> rpm -qa | grep wxGTK wxGTK-2.8.12-1.el6.rf.i686 wxGTK-2.8.12-1.el6.rf.x86_64 wxGTK-devel-2.8.12-1.el6.rf.i686

Does anyone have any ideas about what might be my problem? I've tried to find something via Google, but I haven't been successful.

Replies are listed 'Best First'.
Re: Unable to install Wx
by kevbot (Vicar) on Feb 17, 2014 at 20:49 UTC

    You may want to try installing wxWidgets using the Alien::wxWidgets module, using the cpan client from your perlbrew perl (This will not mess with your system wx installation). Then attempt to install the Wx module.

    If that does not work, you may want to install Alien::wxWidgets manually.

    • Download & extract the Alien-wxWidgets tar.gz file and
    • Then run perl Makefile.PL
    • When prompted, Do you want to fetch and build wxWidgets from sources? enter yes
    • When prompted for a version of wxWidgets to install, choose the latest version (or a different version that may work better for your OS).
    • Then install Wx

      Thanks. I'll give that a try. I think I'm running into a problem with Wx not building cleanly for a 64-bit perl. I was able to get Wx compiled up and passing its tests by manually building and adding the correct include path on the command line:

      perl Makefile.PL --extra-cflags=-I/usr/lib64/wx/include/gtk2-unicode-r +elease-2.8

      The problem I now have is with Wx::Scintilla. Same problem, but since Wx::Scintilla is using a build script instead of a Makefile, I haven't yet discovered how to override its include paths (I thought it should be getting them from wx-config). I'm really tempted to go back to a 32-bit Perl and hopefully avoid these issues.

        I had similar problems a couple years back when I was trying to run the most up-to-date version of Padre on Mac OS X. I made this post about it Getting a working Padre and Wx on Mac OS X (Snow Leopard) with Perl 5.14.0. Basically, I resorted to compiling a threaded 32-bit perl with perlbrew, and then installed Alien::wxWidgets, Wx, and finally Padre. I would hope that a similar approach would work on Linux.

        UPDATE: I seem to recall that wx 2.8 did not play nice with 64-bit, and that 2.9 was required for 64-bit. So, you may be able to stay completely 64-bit if you install the most recent version of wxWidgets with the Alien::wxWidgets module (i.e. 2.9 or later, I believe the most current is 2.9.4).