Home Page
FAQ
Download
Sourceforge
Screenshots
Users Guide
MIDI
      

The FreeWRL FAQ : building from sources

Introduction

This is the Build from Sources documentation. It tries to answer most questions about building FreeWRL from sources. If you encounter something that is not covered on this FAQ, please send an email to John Stewart at freewrl-09 -at- rogers.com.

Mailing list

There is a mailing list about FreeWRL. This is a closed list, so you must be on the list to send mail to it. (this is an anti-spam measure). The address is freewrl@crc.ca. To subscribe to this list, send an email to freewrl-join@crc.ca. The subject and contents of the message do not matter; you should get a reply to the request in a few minutes.

For more information on the mailing list interface, look at the GNU Mailman web page.

How can I help?

Tell us what you use FreeWRL for! It helps us in our internal funding and planning cycle to know how FreeWRL is used- for certain kinds of research, for industrial design, or for whatever.

We are always looking for coding help, but realize that FreeWRL (and any project of this magnitude) is difficult for people to jump in to. Giving us a pat on the back helps; telling us what FreeWRL is used for helps; submitting bugs helps.

(Linux) Building FreeWRL from sources on Linux computers

Linux requirements

Build process maintainer tools

These are NOT needed except you intend to modify the build process files (configure.ac, Makefile.am, ...).
  • automake (version >= 1.10)
  • autoconf (version >= 2.60)
  • libtool (version >= 2.2)

Build dependencies

Packages required are from Debian (you can find similar packages in your distribution):

  • X11 development files (package: x11-dev, libxxf86vm-dev, libxaw7-dev)
  • OpenGL development files (package: libgl-dev)
  • Motif library (optional, package: lesstif2-dev)
  • JPEG library (package: libjpeg62-dev)
  • PNG library (package: libpng12-dev)
  • XML library (package: libxml2-dev)
  • Expat library (package: libexpat1-dev)
  • Java compiler (optional, package: java-compiler)
  • Javascript Engine, SpiderMonkey for example (optional, package: libmozjs-dev)
  • Browser plugin development files (optional, package: iceape-dev)
TODO: implement the source repository, then the following paragraph will be operable.

Debian trick to download and install all that (provided you installed our Debian repository in your sources):

sudo apt-get build-dep freewrl

Runtime dependencies

  • X11 libraries (package: libxaw7)
  • OpenGL libraries (package: libgl1, libglu1)
  • Motif library (optional) (package: lesstif2)
  • Freetype library (package: libfreetype6)
  • PNG library (package: libpng12-0)
  • JPEG library (package: libjpeg62)
  • XML library (package: libxml2)
  • Expat library (package: libexpat1)
  • Javascript Engine library (package: libmozjs1d)
  • Java runtime environment (package: java-runtime)
  • Vera font (package: ttf-bitstream-vera)
  • Internet download helper (package: wget)
  • Sound converter (optional) (package: sox)
  • Image converter (package: convert)

Getting the sources

Download the source package from Sourceforge.

Download the sources from CVS.

Configure the package

If you have installed all the dependencies in the system (/usr) you should be able to configure the package without option. If you have installed any of them in special directory, you should provide this directoy to configure (see ./configure --help).

./configure [options]

Build the software

make

Now decide where to install FreeWRL. Default is /usr/local. If you choose to install it in your $HOME, provide this destination directory to make with the argument DESTDIR=mydir, or with a combination of DESTDIR and prefix

Example 1 (normal install, in /usr/local):

make install [DESTDIR=...]

Example 2 (install in $HOME/freewrl without the annoying /usr):

make install DESTDIR=~/freewrl prefix=""

If you've choosen non-standard installation, don't forget to set PATH and LD_LIBRARY_PATH accordingly:

export PATH=~/freewrl/bin:$PATH
export LD_LIBRARY_PATH=~/freewrl/lib:$LD_LIBRARY_PATH

You can put those two lines in a little environment file that you'd source before using FreeWRL.

Building freewrl with Spidermonkey

Freewrl will no longer build against spidermonkey, since it has been surpassed by mozilla's newer javascript engine libraries (xulrunner-1.8 and xulrunner-1.9). But freewrl is still compatible with spidermonkey, and the following modifications will allow you to build freewrl against spidermonkey-1.7 if it is already installed on your system.

Edit spidermonkey.pc in the freewrl source directory, and change the prefix path (the first line of this file) to match your system.

Edit configure.ac, and find the following lines:

AC_MSG_NOTICE([Determining Javascript engine to build against])
found_JAVASCRIPT_ENGINE=no
case "$os_type" in
     mac) 
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,spidermonkey,1.7.0)
        ;;
     *)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,mozilla-js,1.9)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,xulrunner-js,1.8)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,seamonkey-js)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,firefox-js)
        AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,firefox2-js)
        ;;
esac

Insert the line "AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,spidermonkey,1.7.0)" just above the line for mozilla-js.

Run "autoreconf --force --install" to rebuild the configure script.

Run ./configure and make as per the instructions above.

(OSX) Building FreeWRL from sources on Apple computers

Building from source on OSX : X11 target

Currently the automatic build system knows about X11 only. In the future it will handle also the Mac Carbon target.

Requirements: OSX build environment

You need to install the OSX development environment, the X11 package, and optionnaly the latest X11 server for OSX : XQuartz. You need to install Mac Ports and those required packages :
  • pkgconfig
  • spidermonkey
  • libxml2
  • expat

OSX build environment

Install XCode (minimum version 1.3). Install the X11 package from XCode.

(Optional) XQuartz

XQuartz offer an update X11 server for OSX. Apple ships the default branch of it with every release of OSX. But if you want an updated version you can grab it from XQartz website.

Mac Ports installation:

Install Mac Ports (http://www.macports.org/) and follow its intructions for profile update. Mac Ports update :
$ sudo port selfupdate

Required packages installation:

Open a Terminal window and type :
$ sudo port install pkgconfig
$ sudo port install spidermonkey
$ sudo port install libxml2
$ sudo port install expat
That'done :). You'll have a full functional GNU build env on OSX !

Building FreeWRL/FreeWRL from sources

For freewrl to configure, you'll issue in top src dir:
$ export PKG_CONFIG_PATH=$PWD:$PKG_CONFIG_PATH
Configure :
$ autoreconf
$ ./configure --enable-debug --with-target=motif
Build :
$ make
Test it :
$ src/bin/freewrl
Note: I've added spidermonkey.pc in freewrl top src dir. To help pkg-config find the cflags & libs for this Javascript engine.

SourceForge.net Logo