GNUstep Build Guide for Unix Systems

Version 1.3.4 09 Januari 2002
License: GPL, © 2001,2002 Dennis Leeuw <dleeuw@made-it.com>

1 Introduction

This guide will try to guide you through the installation process of building GNUstep from source code. I only have GNU/Linux systems, so it might be that some things are GNU/Linux related.

Some things are just assumed to be there, like a working system and the X-windows system (X11R6).

If you work your way through the document from start to finish, you should end up with a working system. No guarantees are made ofcourse. If you find things to be different on your system, please let me know.

1.1 Success stories

ArchitectureDistributionVersionRemarks
AMD K6-2Red Hat6.2gcc 2.95.2
Intel PentiumSlackware7.0Upgraded to gcc 2.95.2
Intel PentiumSuSE7.0/7.1 Professional 
AMD DuronSuSE7.1 Professional 
Dual Pentium IIMandrake7.2/8.0 
Intel Pentium IIIFreeBSD4.2Modified boot-scripts for BSD.
???FreeBSD4.3RCUsing GNU make.
Apple Powerbook G4SuSE7.1 PowerPC Edition 

If you succeed in building GNUstep with this document, please let me know at dleeuw@made-it.com and mention Architecture, Distribution, Version and things you had to do differently from this guide to get it working.

1.2 Credits

Writing a guide is not a one man job. First of all there needs to be a subject to write about, then there is the need to gather information and after that bugs, omissions, etc. are found in the work. The list tries to thank the people that helped me writing this guide. It is far from complete, but the best I could do. If you feel you should be on the list, but are not let me know.

2 Check your system

This chapter guides you through the checking of your system, to see if all vital components are there to install GNUstep. Since there are several Un*x flavours out there, I have tried to do my best to be as generic as possible.

Every part has a couple distinct sections, where we start with a test to see if the right program or library is available and if not I will almost always give a quick quide of how to install that piece. All additional software will be installed in /usr/local. Remember however that you should FIRST check to see if a package update for your system is available from your supplier, this keeps your system consistent and helps with future upgrades.

If you decide to go with the "compile from source" there are some tips you might find useful to monitor what is actually going on on your system.

Tips

Be sure to have atleast /usr/local/lib and /usr/X11R6/lib in your /etc/ld.so.conf before you continue.

The general procedure to compile most software programs is to use:

./configure
make
make install
make sure you use GNU make for this. That means that on e.g. FreeBSD you'll have to substitute the make command with gmake. I don't know much about other compilers then gcc, so I guess you are on your own on that one. Let me know if you have good tips.

Second I always like to keep track about what a program installs and where, so I always do (I assume sources go under /usr/src):

mkdir -p /var/adm/<programname>
touch /usr/src/test
./configure
make
make install
find / -cnewer /usr/src/test | grep -v "/proc" \
	 | grep -v "/var" | grep -v "/usr/src" \ 
	 > /var/adm/<programname>/filelist
Now I have a complete list of all installed files, which saves me trouble in generating packages, but also when removing the program, before upgrading or if something was build wrong (which happens).

2.1 make

Function

automatically determines which pieces of a program need to be compiled, and issues commands to recompile them.

Priority

A must have.

check

make --version
FreeBSD: gmake --version

Response

This should show: GNU Make version 3.75 or higher.

Download

place: ftp://ftp.gnu.org/gnu/make/
file: make-3.79.1.tar.gz

Build

./configure
make
make install

2.2 iconv

Function

Convert encoding of given files from one encoding to another.

Priority

A must have.

Check

iconv -V

Response

This should show: iconv (GNU libc) 2.1.2, or higher.

Download

place: ftp://ftp.ilog.fr/pub/Users/haible/gnu/

Build

TODO

2.3 GCC

Function

The GNU C-compiler. For GNUstep you only need the C and Objective-C compiler. Make sure the Objective-C part is installed on your system before proceding.

Priority

A must have.

Check

gcc --version

Response

This should show: gcc-3.0 or higher

Download

place: ftp://ftp.gnu.org/pub/gnu/gcc/
file: gcc-3.0.1.tar.gz

Build

mkdir gcc-build
cd gcc-build
../gcc-3.0.1/configure --prefix=/usr/local --enable-shared --enable-threads
make bootstrap
make install

NOTE: If you only need a C and Objective-C compiler only you may add --enable-languages=objc to the ./configure part.

2.4 ffcall

Function

This is a collection of four libraries which can be used to build foreign function call interfaces in embedded interpreters. The four packages are:

Priority

A Foreign Function is essential, but that might be another one too.

Check

Still haven't found a way to check if the lib is available. Solutions are welcome.

Response

Yep, that's what I am waiting at ;)

Download

place: ftp://ftp.santafe.edu/pub/gnu/
file: ffcall-1.8.tar.gz
patch: ffcall-1.8.diff

The ffcall-1.8a.tar.gz file from ftp.gnustep.org already has the following patch applied.

Build

cd ffcall-1.8
patch -p1 <../ffcall-1.8.diff
./configure
make
make install

2.5 GMP

Function

GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. There is no limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich set of functions, and the functions have a regular interface.

Priority

GNUstep can live without it, but this guides expects it to be present.

Check

strings /etc/ld.so.cache | grep gmp
Find the path to libgmp.so.3
strings <path>libgmp.so.3 | grep -e ^3.[[:digit:]].[[:digit:]]$

Response

This should show: 3.1.1 or higher

Download

place: ftp://ftp.gnu.org/pub/gnu/gmp
file: gmp-3.1.1.tar.gz

Build

cd gmp-3.1.1
./configure
make
make install
ldconfig

2.6 Guile

Function

Guile is an interpreter for the Scheme programming language, packaged as a library which can be incorperated into your programs. Your users have full access to the interpreter, so guile itself can be extended, based on the needs of the user. The result is a scripting language tailored to your application.

Priority

Only needed for GNUstep Guile which is not an essential part, but provides you with scripting functionality within GNUstep.

Check

guile --version

Response

This should show: Guile 1.4 or higher

Download

place: ftp://ftp.gnu.org/pub/gnu/guile
file: guile-1.4.tar.gz

Build

cd guile
./configure --with-modules --with-threads
make
make install
ldconfig

2.7 OpenSSL

Function

OpenSSL is a Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library.

Priority

Non-essential, but do you dare to live without security ?

Check

openssl version

Response

This should show: OpenSSL 0.9.6b 5 Apr 2001 or higher

Download

place: http://www.openssl.org/source/
file: openssl-0.9.6b.tar.gz

Build

cd openssl-0.9.6a
./config --prefix=/usr/local
make
make test
make install
ldconfig

2.8 libtiff

Function

This software provides support for the Tag Image File Format (TIFF), a widely used format for storing image data.

Priority

A must have

Check

strings /usr/lib/libtiff.so| grep LIBTIFF

Response

This should show: LIBTIFF, Version 3.4036 or higher. 3.4 is the major number of the library and the 036 is the beta version.

Download

place: http://www.libtiff.org/
file: tiff-v3.5.6-beta.tar.gz

Build

This build assumes that libjpeg and zlib are installed in /usr/lib and the include files can be found in /usr/include. The new tiff lib will be installed in /usr/local.

./configure --with-JPEG --with-ZIP --with-DIRS_LIBINC=/usr/include --with-DIR_GZLIB=/usr/lib --with-DIR_JPEGLIB=/usr/lib
make
make install
ldconfig

2.9 libxml

Function

This is the GNOME libxml library, which implements generic xml functions.

Priority

A must have

Check

xml2-config --version
or if xml2-config does not exist
xml-config --version

Response

This should show: 2.2.3 or higher

Download

place: ftp.gnome.org/pub/GNOME/stable/sources/libxml/
file: libxml2-2.4.4.tar.gz

Build

cd libxml2-2.4.4
./configure
make
make install
ldconfig

FreeBSD: If you installed libxml2 through ports, make sure that you change in the gnustep-base the configure script. It should include -lgiconv.

2.10 DGS

Function

The Display Ghostscript System is functionally upward-compatible with Adobe Display PostScript, but it has been written independently. The Display Ghostscript System provides a device-independent imaging model for displaying information on a screen. The imaging model uses the PostScript language which has powerful graphics capabilities and frees the programmer from display-specific details like screen resolution and color issues.

Priority

This part is optional, you don't need it to run GNUstep and you could also use the XFree86 DPS extension. More about this in later versions of this guide.

Check

dgs-config --version

Response

This should show: 0.5.10 or higher

Download

place: ftp.gnustep.org/pub/gnustep/dgs/
file: dgs-0.5.10
place: ftp://ftp.fh-koblenz.de/pub/Ghostscript/gnu/fonts/
file: ghostscript-fonts-5.10a.tar.gz

Build
NOTE: dgs needs libjpeg. Make sure this one is installed or read the INSTALL document in the dgs source tree.

cd dgs-0.5.10
./configure --prefix=/usr/X11R6
make
make install

On most distributions the ghostscript fonts are already installed. Try /usr/share/ghostscript/fonts. If the are there all you need to do is:
rmdir /usr/X11R6/share/ghostscript/fonts
ln -s /usr/share/ghostscript/fonts /usr/X11R6/share/ghostscript/fonts

If you system does not have the ps-fonts installed do the following:
cd /usr/X11R6/share/ghostscript/fonts
tar zxvf ghostscript-fonts-5.10a.tar.gz

3 Building GNUstep Basic

By default GNUstep is built into /usr/GNUstep. Since /usr should be mountable readonly according to the LSB and since almost all major distros use /opt for their desktop environments, this book will use /opt/GNUstep for all GNUstep related programs.

The GNUstep version used in this book, is a CVS checkout of the core (containing: gnustep-make, base, gui, xdps and xgps). Most of the time, however, a daily-snapshot can be used. The daily snapshots can be downloaded from ftp://ftp.gnustep.org/pub/daily-snapshots. If somehow a daily-snapshot does not work for you try a CVS checkout. And to be nice to other people on the Internet, first unpack a local copy of the snapshot and then do the CVS checkout, as described below. This saves on bandwidth, is quicker, and will save you download time.

Download

place: ftp://ftp.gnustep.org/pub/daily-snapshots/
file: core.`date +%Y%m%d`.tar.bz2
file: dev-apps.`date +%Y%m%d`.tar.bz2

tar yxvf core.`date +%Y%m%d`.tar.bz2
tar yxvf dev-apps.`date +%Y%m%d`.tar.bz2
tar yxvf dev-libs.`date +%Y%m%d`.tar.bz2
cvs -z3 -d :pserver:anoncvs@cvs.gnustep.org:/cvsroot update -Pd core
cvs -z3 -d :pserver:anoncvs@cvs.gnustep.org:/cvsroot update -Pd dev-apps
cvs -z3 -d :pserver:anoncvs@cvs.gnustep.org:/cvsroot update -Pd dev-libs
cp -a core core.cvs
cp -a dev-apps dev-apps.cvs
cp -a dev-apps dev-libs.cvs

From now one you can use the above cvs commands to keep your sources up-to-date.

3.1 gnustep-make

Function

This package sets up the GNUstep directory tree, sets some environment variables and contains scripts for all other packages installed hereafter.

Build

cd core.cvs/make
./configure --prefix=/opt/GNUstep
make
make install

Final steps

If you are using Bourne Shell (/bin/sh), Korn Shell (/bin/ksh), or the Bourne Again Shell (/bin/bash), type:

. /opt/GNUstep/System/Makefiles/GNUstep.sh

If you are using C-Shell (/bin/csh), the T-C-Shell (/bin/tcsh), type:

source /opt/GNUstep/System/Makefiles/GNUstep.csh

3.2 gnustep-base

Function

It provides functionality that aims to implement the non-graphical portion of the OpenStep standard (the Foundation library).

Build

cd core.cvs/base
./configure
make
make install

3.3 gnustep-guile

Function

The gnustep_guile library lets you use (and extend) the GNUstep libraries from within Guile. This effectively provides you with scripting language for GNUstep and an interactive system for developing GNUstep applications.

Priority

Not an essential part.

Build

cd dev-libs.cvs/guile
./configure
make
make install

3.4 gnustep-gui

Function

It is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon the OpenStep specification as released by NeXT Software, Inc. The library does not completely conform to the specification and has been enhanced in a number of ways to take advantage of the GNU system. These classes include graphical objects such as buttons, text fields, popup lists, browser lists, and windows; there are also many associated classes for handling events, colors, fonts, pasteboards and images.

System specific

BSD: add ADDITIONAL_LIB_DIRS = /usr/local/lib to core/gui/Source/GNUmakefile.preamble

Build

cd core.cvs/gui
./configure
make
make install

3.5 WindowMaker

Function

libPropList
The purpose of PL is to closely mimick the behaviour of the property lists used in GNUstep/OPENSTEP (there formed with the NSString, NSData, NSArray and NSDictionary classes) and to be compatible with it. PL enables programs that use configuration or preference files to make these compatible with GNUstep/OPENSTEP's user defaults handling mechanism, without needing to use Objective-C or GNUstep/OPENSTEP themselves. And is needed by WindowMaker.

WindowMaker
Window Maker is the GNU window manager for the X Window System. It was designed to emulate the look-and-feel of part of the NEXTSTEP(tm) GUI. It's supposed to be relatively fast and small, feature rich, easy to configure and easy to use, with a simple and elegant appearance borrowed from NEXTSTEP(tm).

Check

wmaker --version

Response

This should show: Window Maker 0.62.0 or higher

Download

place: http://windowmaker.org/pub/source/release/
file: libPropList-0.10.1.tar.gz
file: WindowMaker-0.65.1.tar.bz2

Build

cd libPropList-0.10.1
./configure --prefix=$GNUSTEP_SYSTEM_ROOT
make
make install

cd WindowMaker-0.65.1
./configure --prefix=$GNUSTEP_SYSTEM_ROOT --with-appspath=$GNUSTEP_SYSTEM_ROOT/Apps --datadir=$GNUSTEP_SYSTEM_ROOT/Library --sysconfdir=$GNUSTEP_SYSTEM_ROOT/Library/Configuration
make
make install

3.6 gstep-xdps

Function

This is the Display Ghostscript Backend.

Build

cd core.cvs/xdps
./configure
make
make install

3.7 gnustep-xgps

Function

This is the generic X back-end for the GNUstep project.

Build

cd core.cvs/xgps
./configure
make
make install

4 Configuration GNUstep Basic

Now the initial installation is done. You now have the basic libraries and tools to start building an GNUstep environment. But first we have to configure some stuff and start up some services.

4.1 Boot Scripts

Function

gdomap owns (that is it is registered with IANA) port 538 and uses it to maintain information about what GNUstep services are available on your network, so that apps on one machine can talk to apps on other machines.

If for some reason your local network is shared with other people who do not like this, you can use the -c flag to specify a file containing a list of IP addresses where GNUstep apps might be running, or use the -p flag to tell gdomap that there are no other machines it should probe.

Script

Create a boot script (dependend on your system) and put in it:

GNUSTEP_SYSTEM_ROOT=/opt/GNUstep/System
if [ -f $GNUSTEP_SYSTEM_ROOT/Tools/ix86/linux-gnu/gdomap ]; then
echo -n "Starting GNUstep services... "
$GNUSTEP_SYSTEM_ROOT/Tools/ix86/linux-gnu/gdomap
echo "gdomap "
fi

4.2 Shell startup scripts

Function

gdnc is the distributed notification server - it provides support for the NSDistributedNotificationCenter class. This allows applications to send notifications that are visible to other applications - for example a notification that an app has started up or shut down.

gpbs is the pasteboard server - it provides inter-application cut and paste facilities and is used by the 'services' facility.

Script

If you are using Bourne Shell (/bin/sh), Korn Shell (/bin/ksh), or the Bourne Again Shell (/bin/bash), add to .profile (or to .bashrc, or .bash_profile) files of the users using GNUstep:

. /opt/GNUstep/System/Makefiles/GNUstep.sh
if [ `gdomap -L GDNCServer | grep -c Found` == '0' ]; then
echo "Starting GNUstep services..."
gdnc
gpbs
fi

Or if you are using C-Shell (/bin/csh), the T-C-Shell (/bin/tcsh), then add to your .cshrc files:

source /opt/GNUstep/System/Makefiles/GNUstep.sh
if [ `gdomap -L GDNCServer | grep -c Found` == '0' ]; then
echo "Starting GNUstep services..."
gdnc
gpbs
fi

Or if you are using C-Shell (/bin/csh), the T-C-Shell (/bin/tcsh), then add

4.3 Setting the Defaults

Every system needs to know certain settings to work correctly, like the timezone, etc. GNUstep uses the defaults database for that. The defaults are set by the defaults command.

Setting the time-zone

The different time zones can be found in: `$GNUSTEP_SYSTEM_ROOT/Libraries/Resources/NSTimeZones/zones'.

I live in the Netherlands and set my timezone this way:
defaults write NSGlobalDomain "Local Time Zone" Europe/Amsterdam

Setting your prefered language

To set your language do the following:
defaults write NSGlobalDomain NSLanguages "English"

Setting the backend

GNUstep can be used with different backends. Currently there are two different backends available for Unix-like systems. You have the choise of using xgps, which is the default, or xdps which is the WYSIWYG backend.

To switch from the default to the xdps backend type the following:
defaults write NSGlobalDomain GSBackend libgnustep-xdps

4.4 X Configuration

Chris B. Vetter supplied a sample xinitrc file that might help you when configuring X setup for GNUstep. Please adjust for your own situation, the file is pretty self-explaining.

4.5 Window Maker

Run for every user wmaker.inst

5 Environment Basic

This chapter will help you build the basic parts of the GNUstep Environment. All parts are my preferences, so decide for yourself which parts you want to add or leave out. The only reason they are here is that this will give you an idea about how to go forward and create the system you like best.

The builds are intended for Distribution maintainers. That means that all Apps are placed in the $GNUSTEP_SYSTEM_ROOT/Apps directory and not in $GNUSTEP_LOCAL_ROOT/Apps.

5.1 Extensions

Function

This package contains some classes that extend the basic behavior of base classes by adding some features. The current extensions are an extended exception handling mechanism, a garbage collector, some classes that allow you to easily create methods that accept printf-like arguments.

Build

cd dev-libs.cvs/extensions
./configure
make
make install

5.2 GWorkspace

Function

The GNUstep Workspace Manager.

Download

place: http://www.gnustep.it/enrico/gworkspace/
file: gworkspace-0.2.0.tar.gz

Build

cd GWorkspace
make install
cd Apps_wrappers
cp -a * $GNUSTEP_SYSTEM_ROOT/Apps

5.3 gdb

Function

gdb patched to play nicely with Objective-C and to install within the GNUstep tree.

Download

place: ftp://ftp.gnu.org/gnu/gdb/
file: gdb-5.0.tar.gz

Patches

Link: configure.gdb-5.0
Link: gdb-5.0-objc-unoff.20010211.patch

Build

cd gdb-5.0
patch -b -p1 -i ../gdb-5.0-objc-unoff.20010211.patch
cp ../configure.gdb-5.0 configure
./configure --prefix=$GNUSTEP_SYSTEM_ROOT
make
make install

5.4 ProjectCenter

Function

ProjectCenter should become the GNUstep counterpart to NeXT's ProjectBuilder.

Build

cd dev-apps.cvs/ProjectCenter
make GNUSTEP_INSTALLATION_DIR="$GNUSTEP_SYSTEM_ROOT" install

5.5 GORM

Function

Gorm is an application for creating the user interface (and possibly entire applications) for a GNUstep application. Initially a close clone of the old NeXTstep 3.3 Interface Builder application.

Build

cd dev-apps.cvs/Gorm

make GNUSTEP_INSTALLATION_DIR="$GNUSTEP_SYSTEM_ROOT" install