Saturday, November 11, 2006

Installing wxPerl on RedHat 9

When I tried to install wxPerl on my RedHat 9, I found it was lack of so many perl modules.

First, I installed Module::Build. Everytime I tried to install, I got this error message: "Can't locate the perl binary used to run this script in..." I did googling and found the solution at this address: http://rt.cpan.org/Public/Bug/Display.html?id=19465. In short, you must type "unset LANG" from the terminal. It seems like this problem only occurs in RedHat.

The second requested module was Module::Pluggable. I downloaded it from cpan and I found out that it needed one module called Class::Inspector and two more modules which were too old, which were Test::More (0.47 from RedHat 9, >=0.62 requested, found in Test::Simple module) and File::Spec (0.83 from RedHat 9, >=3.00 requested, found in PathTools module). I downloaded and installed Class::Inspector and Test::Simple without any problem.

However, when I installed PathTools, I found this error while installing: "Module::Build is not configured with C_support". This could be solved by installing two more modules: ExtUtils::CBuilder and ExtUtils::ParseXS and reinstalling Module::Build. After that, PathTools could be installed successfully.

The third needed module was ExtUtils::MakeMaker. I installed it without any problem.

Then, it was time to build and compile wxWidgets from source. I downloaded the source from http://www.wxwidgets.org, the version I chose was 2.7.2. To install wxWidgets I run these commands below: mkdir buildgtk; cd buildgtk; ../configure --with-gtk; make; make install;
After that, compile STC: cd contrib/src/stc; make; makeinstall;
Back to buildgtk directory and run '/sbin/ldconfig'

The next module to be installed was Alien::wxWidgets. Before installing this module, some environment variables needed to be set:

WX_CONFIG="/usr/local/bin/wx-config"
export WX_CONFIG
LD_LIBRARY_PATH="/usr/local/lib"
export LD_LIBRARY_PATH

When Alien::wxWidgets was installed, it was time to install our main module: wxPerl. It was easy when you had reached this step. Just run: perl Makefile.PL; make; make install;

There were also demo for wxPerl which I tried to install. There were 5 more modules needed to install the demo itself. They were Class::Accessor, File::Slurp, File::chdir, IO::String, and UNIVERSAL::require.

The demo could be run although there were some parts which could cause Segmentation fault.

0 Comments:

Post a Comment

<< Home