Skip to content

Setting Up a Linux Build Environment

lylejohnson edited this page Sep 13, 2010 · 16 revisions

If you’d like to be able to build FXRuby from source on Linux, you’re going to need to set up a build environment. This page describes how to set up an FXRuby build environment under Ubuntu Linux 9.04. If you’re working with a different Linux distribution, some of the instructions will obviously be different.

Install Ruby

So, you’re going to need a Ruby installation, and it’s not included in the stock Ubuntu distribution.To keep things simple, however, you can just install the ruby-full package for Ubuntu by typing

sudo aptitude install ruby-full

If you want or need to build Ruby from its source code, please see the Ruby downloads page.

Install FOX Dependencies

To build FOX from source, you’re going to need a lot of dependencies that Ubuntu doesn’t install by default. First, you want to install the various image library development packages (for PNG, JPEG and TIFF image support):

sudo aptitude install zlib1g-dev libpng12-dev libjpeg62-dev libtiff4-dev

Then, you want to install the various X11 and OpenGL dependency development packages:

sudo aptitude install libx11-dev libglu1-xorg-dev libxcursor-dev libxext-dev libxrandr-dev

Download, Build and Install FOX

Ubuntu does include a pre-built FOX package, but it’s based on FOX 1.6.25 (a fairly old release). I recommend that you download the latest FOX source code and build it from scratch.

You can download the latest source code tarball for FOX from the FOX home page. As of this writing, the latest stable version is version 1.6.36. Note that the latest developer version is 1.7.20 (or so), but that version is incompatible with FXRuby.

tar xzf fox-1.6.36.tar.gz
cd fox-1.6.36
./configure
make
make install

If you run into trouble building FOX, please consult the installation instructions at the FOX web site, and follow up on the FOX mailing list if necessary.

Install FXScintilla

This step is optional, but if you want to be able to use the FXScintilla widget in your FXRuby programs, you’ll need to get the FXScintilla library installed.

sudo aptitude install libfxscintilla-dev

Install G++

To my surprise, the C++ compiler wasn’t included in the stock Ubuntu distribution (only the C compiler). You’re going to need to install that too:

sudo aptitude install g++

Clone this wiki locally