Version 4 (modified by bowtie, 3 years ago) (diff)



There is an experimental DMG package that is crashing and needs your help. See this blog entry and see the the open tickets: osxbugs

Mac OS X Installation Instructions

On OS X, you cannot use the system's 'perl' executable, you have to use the 'wxPerl' executable (see this thread regarding wxPerl invocation).

Installation using pkgsrc should also work.

Installation from CPAN

The most straightforward method is to install everything from source. This will ignore any existing wxWidgets installation.

  1. $ wxPerl -MCPAN -eshell
  2. [cpan] $ install Alien::wxWidgets [choose install from source, which is NOT the default]
  3. Go do something else while it compiles wxWidgets.
  4. [cpan] $ install Wx
  5. [cpan] $ install Padre

Padre has a LOT of prerequisites. You're likely to run into some problems with tests failing. IPC::Run3 was a particular problem due to its prerequisites, but a later individual install worked fine. Just make your way through them all, and 'force notest install $module' as needed. Once you've got padre installed you start it by running /usr/local/bin/padre.

Taking the lazy way

If you're lazy and enjoy taking risks... the easiest way to install on OSX may be (there will be some test failures - which you'll have to force install, including Padre itself, due to wxPerl issues):

cpan Alien::wxWidgets
wxPerl -MCPAN -eshell
 $ install Padre

and then replace the /usr/local/bin/padre script with the updated version at

If you are risk averse and like playing in your own sandbox, then it is recommended that you download and compile the current release of Perl from source ( Note: you'll need to run ./Configure with -Dusethreads. After which you won't need to use wxPerl, but can do the standard make, make test, make install of Padre via cpan.

After installing Alien::wxWidget there are new versions of wx-config and wxrc somewhere in your Perl Library Path, (mine went under site_perl/darwin-thread-multi-2level/Alien/wxWidgets/mac_2_8_10_uni/bin), which need to be first in your PATH, otherwise Wx might build against the wrong Library. As an alternative you can set an environment variable WX_CONFIG which has to point to the new wx-config executable. See the Wx docs for more info.

Another caveat: don't build inside of a gnu-screen or ssh session, otherwise Wx's tests will fail with a strange errormessage, stating that it can't create the clipboard because of permission problems.

OS X 10.4 has wxPerl 0.22, 10.5 has a more recent version (0.6x for some x)

Aside from building from source, you can also install newer versions of Wx on OS X using a package manager:


fink install wxmac28

Mac Ports

port install wxWidgets

installing _and_ upgrading wxWidgets and wxPerl

If you have trouble you can check which version of wxWidgets you have:

$ perl -MWx -le'print  "Wx Version: $Wx::VERSION " . Wx::wxVERSION_STRING()'

and on Mac:

$ wxPerl -MWx -le'print  "Wx Version: $Wx::VERSION " . Wx::wxVERSION_STRING()'

We use Wx 0.87 and wxWidgets 2.8.8 so you probably should have those (or newer) too.

When installing Alien::wxWidgets it will ask if you want to compile wxWidgets. Do you want to fetch and build wxWidgets from sources? If you don't have any installed or if you have an old version (< 2.8.8) then you should answer yes. It will try to download the source code of wxWidgets which is big and the download often fails.

To get around that you can download the file manually and put it in the extracted directory of Alien::wxWidgets.

Something like this:

 $ cd /tmp
 $ wget
 $ cpan
 cpan> look Alien::wxWidgets
 $ cp /tmp/wxWidgets-2.8.8.tar.gz .
 $ perl Makefile.PL
 $ make
 $ make test
 $ make install
 $ exit

wxPerl on Linux distributions