Version 1.3.4 09 Januari 2002
License: GPL, © 2001,2002 Dennis Leeuw <dleeuw@made-it.com>
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.
| Architecture | Distribution | Version | Remarks |
|---|---|---|---|
| AMD K6-2 | Red Hat | 6.2 | gcc 2.95.2 |
| Intel Pentium | Slackware | 7.0 | Upgraded to gcc 2.95.2 |
| Intel Pentium | SuSE | 7.0/7.1 Professional | |
| AMD Duron | SuSE | 7.1 Professional | |
| Dual Pentium II | Mandrake | 7.2/8.0 | |
| Intel Pentium III | FreeBSD | 4.2 | Modified boot-scripts for BSD. |
| ??? | FreeBSD | 4.3RC | Using GNU make. |
| Apple Powerbook G4 | SuSE | 7.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.
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.
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.
TipsBe 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 installmake 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>/filelistNow 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).
automatically determines which pieces of a program need to be compiled, and issues commands to recompile them.
PriorityA must have.
checkmake --version
FreeBSD: gmake --version
This should show: GNU Make version 3.75 or higher.
Downloadplace: ftp://ftp.gnu.org/gnu/make/
file: make-3.79.1.tar.gz
./configure
make
make install
Convert encoding of given files from one encoding to another.
PriorityA must have.
Checkiconv -V
ResponseThis should show: iconv (GNU libc) 2.1.2, or higher.
Downloadplace: ftp://ftp.ilog.fr/pub/Users/haible/gnu/
BuildTODO
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.
PriorityA must have.
Checkgcc --version
ResponseThis should show: gcc-3.0 or higher
Downloadplace: ftp://ftp.gnu.org/pub/gnu/gcc/
file: gcc-3.0.1.tar.gz
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.
This is a collection of four libraries which can be used to build foreign function call interfaces in embedded interpreters. The four packages are:
A Foreign Function is essential, but that might be another one too.
CheckStill haven't found a way to check if the lib is available. Solutions are welcome.
ResponseYep, that's what I am waiting at ;)
Downloadplace: 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.
Buildcd ffcall-1.8
patch -p1 <../ffcall-1.8.diff
./configure
make
make install
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.
PriorityGNUstep can live without it, but this guides expects it to be present.
Checkstrings /etc/ld.so.cache | grep gmp
Find the path to libgmp.so.3
strings <path>libgmp.so.3 | grep -e ^3.[[:digit:]].[[:digit:]]$
This should show: 3.1.1 or higher
Downloadplace: ftp://ftp.gnu.org/pub/gnu/gmp
file: gmp-3.1.1.tar.gz
cd gmp-3.1.1
./configure
make
make install
ldconfig
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.
PriorityOnly needed for GNUstep Guile which is not an essential part, but provides you with scripting functionality within GNUstep.
Checkguile --version
ResponseThis should show: Guile 1.4 or higher
Downloadplace: ftp://ftp.gnu.org/pub/gnu/guile
file: guile-1.4.tar.gz
cd guile
./configure --with-modules --with-threads
make
make install
ldconfig
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.
PriorityNon-essential, but do you dare to live without security ?
Checkopenssl version
ResponseThis should show: OpenSSL 0.9.6b 5 Apr 2001 or higher
Downloadplace: http://www.openssl.org/source/
file: openssl-0.9.6b.tar.gz
cd openssl-0.9.6a
./config --prefix=/usr/local
make
make test
make install
ldconfig
This software provides support for the Tag Image File Format (TIFF), a widely used format for storing image data.
PriorityA must have
Checkstrings /usr/lib/libtiff.so| grep LIBTIFF
ResponseThis should show: LIBTIFF, Version 3.4036 or higher. 3.4 is the major number of the library and the 036 is the beta version.
Downloadplace: http://www.libtiff.org/
file: tiff-v3.5.6-beta.tar.gz
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
This is the GNOME libxml library, which implements generic xml functions.
PriorityA must have
Checkxml2-config --version
or if xml2-config does not exist
xml-config --version
This should show: 2.2.3 or higher
Downloadplace: ftp.gnome.org/pub/GNOME/stable/sources/libxml/
file: libxml2-2.4.4.tar.gz
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.
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.
PriorityThis 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.
Checkdgs-config --version
ResponseThis should show: 0.5.10 or higher
Downloadplace: 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
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
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.
Downloadplace: ftp://ftp.gnustep.org/pub/daily-snapshots/
file: core.`date +%Y%m%d`.tar.bz2
file: dev-apps.`date +%Y%m%d`.tar.bz2
From now one you can use the above cvs commands to keep your sources up-to-date.
This package sets up the GNUstep directory tree, sets some environment variables and contains scripts for all other packages installed hereafter.
Buildcd core.cvs/make
./configure --prefix=/opt/GNUstep
make
make install
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
It provides functionality that aims to implement the non-graphical portion of the OpenStep standard (the Foundation library).
Buildcd core.cvs/base
./configure
make
make install
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.
PriorityNot an essential part.
Buildcd dev-libs.cvs/guile
./configure
make
make install
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 specificBSD: add ADDITIONAL_LIB_DIRS = /usr/local/lib to core/gui/Source/GNUmakefile.preamble
Buildcd core.cvs/gui
./configure
make
make install
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).
wmaker --version
ResponseThis should show: Window Maker 0.62.0 or higher
Downloadplace: http://windowmaker.org/pub/source/release/
file: libPropList-0.10.1.tar.gz
file: WindowMaker-0.65.1.tar.bz2
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
This is the Display Ghostscript Backend.
Buildcd core.cvs/xdps
./configure
make
make install
This is the generic X back-end for the GNUstep project.
Buildcd core.cvs/xgps
./configure
make
make install
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.
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.
ScriptCreate a boot script (dependend on your system) and put in it:
GNUSTEP_SYSTEM_ROOT=/opt/GNUstep/Systemgdnc 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.
ScriptIf 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
source /opt/GNUstep/System/Makefiles/GNUstep.sh
if [ `gdomap -L GDNCServer | grep -c Found` == '0' ]; then
echo "Starting GNUstep services..."
gdnc
gpbs
fi
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-zoneThe 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
To set your language do the following:
defaults write NSGlobalDomain NSLanguages "English"
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
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.
Run for every user wmaker.inst
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.
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.
Buildcd dev-libs.cvs/extensions
./configure
make
make install
The GNUstep Workspace Manager.
Downloadplace: http://www.gnustep.it/enrico/gworkspace/
file: gworkspace-0.2.0.tar.gz
cd GWorkspace
make install
cd Apps_wrappers
cp -a * $GNUSTEP_SYSTEM_ROOT/Apps
gdb patched to play nicely with Objective-C and to install within the GNUstep tree.
Downloadplace: ftp://ftp.gnu.org/gnu/gdb/
file: gdb-5.0.tar.gz
Link: configure.gdb-5.0
Link: gdb-5.0-objc-unoff.20010211.patch
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
ProjectCenter should become the GNUstep counterpart to NeXT's ProjectBuilder.
Buildcd dev-apps.cvs/ProjectCenter
make GNUSTEP_INSTALLATION_DIR="$GNUSTEP_SYSTEM_ROOT" install
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.
Buildcd dev-apps.cvs/Gorm
make GNUSTEP_INSTALLATION_DIR="$GNUSTEP_SYSTEM_ROOT" install