Installation Instructions

From GNUstepWiki

(Difference between revisions)
Revision as of 21:05, 7 September 2006
Stefanbidi (Talk | contribs)

← Previous diff
Revision as of 21:32, 7 September 2006
Stefanbidi (Talk | contribs)

Next diff →
Line 12: Line 12:
* GCC (Version 2.95 or greater, 3.0.4 or greater recommended); * GCC (Version 2.95 or greater, 3.0.4 or greater recommended);
-New versions of GCC (4.x and later) allow mixing of Objective-C and C++ code, useful for advanced frameworks.+** New versions of GCC (4.x and later) allow mixing of Objective-C and C++ code, useful for advanced frameworks.
* GNU make (Version 3.75 or greater); * GNU make (Version 3.75 or greater);
* GDB (Version 6.0 or greater recommended), if you plan to do any debugging. * GDB (Version 6.0 or greater recommended), if you plan to do any debugging.
Line 80: Line 80:
= Compiling and Installing the Packages = = Compiling and Installing the Packages =
 +Get the following individual packages:
 +* gnustep-make
 +* gnustep-base
 +* gnustep-gui
 +* gnustep-back
 +
 +Alternitively:
 +* gnustep-startup
 +
 +To obtain these packages go to [ftp://ftp.gnustep.org/pub/gnustep/core/ GNUstep FTP].
 +
 +Make sure you install (if necessary) all the previously mentioned libraries before configuring and building GNUstep.
 +
 +You should install these packages as root (read special note for the gnustep-base library, below, if you cannot do this).
 +
 +For installation on specific systems, read the machine specific instructions at the end of this document or appropriate README files in the gnustep-make Documentation directory (such as README.MingW for Windows).
 +
== Installing the Core Libraries == == Installing the Core Libraries ==
 +The GNUstep packages uses the Autoconf mechanism for configuration; it checks some host capabilties which are used by all GNUstep software. To configure just type:
 +
 + ./configure
 +
 +The GNUstep makefile package needs a root directory. If the GNUSTEP_SYSTEM_ROOT environment variable is set then configure will determine the root directory from its value (by removing the final /System path component from it). You can also specify the root directory when you run configure with the prefix paramater; the following command makes /usr/local/GNUstep the root directory:
 +
 + ./configure --prefix=/usr/local/GNUstep
 +
 +If you do not have the GNUSTEP_SYSTEM_ROOT environment variable set and you do not specify a root directory when running configure, then configure will use /usr/GNUstep as the default root directory.
 +
=== Alternate Library Setup === === Alternate Library Setup ===
 +Read the installation instructions in the Makefile package (make) for more installation options. Make sure you use the same configuration options when configuring each GNUstep library.
 +
=== Building the Package === === Building the Package ===
 +To build the individual packages, use this familiar set of commands for each pacakge (add any additional options you decide upon):
 +
 + ./configure
 + make
 + make install
 +
 +Start with the Makefile Pacakge (gnustep-make). After installing gnustep-make you need to execute GNUstep's shell configuration script, as follows:
 +
 + . /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
 +
 +before proceeding any further.
 +
 +NOTE for gcc 2.X or MinGW users: Now install gnustep-objc. Before building gnustep-objc, edit the `GNUmakefile' and set the THREADING variable to the thread library used on your system (usually its posix, but you can leave it at single if you don't need threads). At this point you should probably re-configure, make and install gnustep-make, so it can pick up on any threading information that gnustep-objc provides.
 +
 +Now install gnustep-base, gnustep-gui and finally gnustep-back.
 +
 +NOTE: If you are trying to install the packages without root permission, you may need to change one thing in the base library. Edit the file gnustep-base/Tools/gdomap.h to uncomment the last line and modify the specified port number to a port which you know is not in use on your network. You should only do this if absolutely necessary since making this change will break communications with any systems where an identical change has not been made. Also, the standard gdomap port is the one officially registered with IANA and is reserved for use by gdomap - it should only be changed if you can't get your system administrator to start the gdomap server using it.
 +
 +
= Aditional Installation = = Aditional Installation =
== Enviornment Setup == == Enviornment Setup ==
 +Add the shell script `GNUstep.sh' located in the Makefile package to your shell startup file (such as `.profile'). For instance, if your GNUSTEP_SYSTEM_ROOT is `/usr/GNUstep/System',
 +
 + . /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
 +
 +in your `.profile' file will work (Note the period at the beginning of the line, and the space between the period and the following path; if your GNUSTEP_SYSTEM_ROOT is different, you need to replace `/usr/GNUstep/System' with your GNUSTEP_SYSTEM_ROOT). It defines environment variables that are needed to find GNUstep files and executables. Users of csh need to use the `GNUstep.csh' script. Read the make package `README' for more info. Some systems, like GNU/Linux have an `/etc/profile.d' directory where scripts can be executed automatically. If you want to set up GNUstep for every user on your system, you can try copying/linking the `GNUstep.sh' there. For csh or tcsh, try
 +
 + source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh
 +
== GNUstep Home == == GNUstep Home ==
 +Your home GNUstep directory should be created automatically the first time you use a GNUstep tool or application. This is where user defaults are kept as well as other user configuration files. User installed apps, libraries, etc are also here (if the default user directory is used). By default this is the directory `GNUstep' under your home directory, but you can change this (see the gnustep-make installation documentation).
 +
== Time Zone == == Time Zone ==
 +In most cases, GNUstep should be able to determine your time zone, if you have already set it up correctly when setting up your computer. However, in some cases this might fail or the correct information may not be available. You can set it manually using the GNUstep defaults utility to set Local Time Zone to your local time zone. Type something like defaults write NSGlobalDomain "Local Time Zone" GB. Where GB is a time zone abbreviation.
 +
 +See '$GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-bsae/NSTimeZones/zones' for typical time zones.
 +
== GNUstep daemons == == GNUstep daemons ==
 +Set up your system to execute some GNUstep deamons. If you don't do this, they will be started automatically when you run your first GNUstep app:
 +
 +* gdomap - Put this in a system startup file, like `/etc/rc.local' or `/etc/rc.d/rc.local' (customize for your system)
 +
 + GNUSTEP_SYSTEM_ROOT=/usr/GNUstep/System
 + if [ -f $GNUSTEP_SYSTEM_ROOT/Tools/gdomap ]; then
 + $GNUSTEP_SYSTEM_ROOT/Tools/gdomap
 + fi
 +
 +* gdnc - Start after sourcing `GNUstep.sh' (e.g. in .profile)
 +* gpbs - Same as with gdnc, make sure X-Windows is running.
 +* make_services - Not a deamon, but a tool that needs to be run everytime you install a new Application or service. This is NOT run automatically.
 +
 + if [ `gdomap -L GDNCServer | grep -c Unable` == 1 ]; then
 + echo "Starting GNUstep services..."
 + gdnc
 + gpbs
 + fi
 + make_services
 +
 +
= Test Tools and Applications = = Test Tools and Applications =
 +Example applications are located in the gstep-examples package. To make these, just uncompress and untar this package, cd to the appropriate directory, and type make. You will need to install the GNUstep core libraries first before doing this.
 +
 +To run the examples. Use the openapp utility that is part of the GNUstep makefile package (and stored in `$GNUSTEP_SYSTEM_ROOT/Tools'). Usage is:
 +
 + openapp application [additional arguments to app]
 +
 +Good Luck!
 +
 +
= Machine Specific Instructions = = Machine Specific Instructions =
 +'''Please populate with OS and Architecture specific intructions. Please keep in alphabetical order!'''
 +
 +== BSD ==
 +
 +== Darwin ==
 +
 +== GNU/Linux ==
 +=== Debian (x86) ===
 +==== Version 4.0 (Etch) ====
 +Packages are available from Debian's package repositories but are significantly outdated.
 +
 +=== Slackware (x86) ===
 +==== Version 10.2 ====
 +Libraries and accompanying applications will build with no modifications. Slackware 10.2 ships with GCC 3.3.6, so mixed Objective-C and C++ code is not supported, meaning additional frameworks/libraries may not be supported.
 +
 +== Solaris ==
= Getting Libraries via SVN = = Getting Libraries via SVN =
 +If you didn't get one of the snapshots, or if you want to be sure to stay on the bleading edge, then you should get the libraries via SVN. Go to http://www.gnustep.org/resources/sources.html for information on how to get the sourcecode.
 +
 +If you haven't already done so, change to the directory, where you want the source to reside. To get a list of potential modules to check out, type
 +
 + cvs -z3 checkout -c
 +
 +For instance, to check our `core', which contains all the GNUstep code libraries:
 +
 + cvs -z3 checkout core
 +
 +After you have checked out the source you can compile it as usual. To update the source, go into the directory of the source tree you want to update, for example, go into 'base', and type:
 +
 + cvs -z3 update -Pd
 +
 +You don't have to re-checkout after you have the source, just update!

Revision as of 21:32, 7 September 2006

Contents

Introduction

This document explains how to build the GNUstep core libraries. The core libraries, along with associated tools and other files provide everything necessary for a working GNUstep system.

In order to easily compile and debug GNUstep projects, you will need the GNU Objective-C compiler `GCC' as well as various other GNU packages.

You will need at least 80Mb of hard disk space (150Mb prefered) in order to compile the GNUstep core libraries.


Summary

In order to compile the libraries, you need to compile and install the following packages first (if you don't already have them):

  • GCC (Version 2.95 or greater, 3.0.4 or greater recommended);
    • New versions of GCC (4.x and later) allow mixing of Objective-C and C++ code, useful for advanced frameworks.
  • GNU make (Version 3.75 or greater);
  • GDB (Version 6.0 or greater recommended), if you plan to do any debugging.

You may also need to install some of the following libraries and packages described below. Most of these packages are optional, but some are required.

'ffcall libraries (HIGHLY RECOMMENDED)'

This is a library that provides stack-frame handling for NSInvocation and NSConnection. This library is highly recommended. The previous builtin method for stack frame handling is no longer supported and may be removed in the future. ffcall is under GNU GPL. As a special exception, if used in GNUstep or in derivate works of GNUstep, the included parts of ffcall are under GNU LGPL.

'libffi library (ALTERNATIVE RECOMMENDATION)'

This is a library that provides stack frame handling for NSInvocation and NSConnection similar to ffcall. Use this instead of ffcall. You don't need both.

'libxml2 (RECOMMENDED)'

The libxml library (Version 2) is used to translate some of the documentation for GNUstep and to provide suport for MacOS-X compatible XML-based property-lists. It is not required, but you have to explicitly disable use of XML when compiling GNUstep base if you do not have it.

'libxslt (OPTIONAL)'

Stylesheet support for use with XML.

'openssl (OPTIONAL)'

The openssl library is used to provide support for https connections by the NSURL and HSURLHandle classes. This functionality is compiled as a separate bundle since the OpenSSL license is not compatible with GPL, and in the hopes that if someone writes an openssl replacement, it can quickly be used by creating another bundle.

'libiconv (OPTIONAL)'

Note: Do not install this library unless you are sure you need it. You probably don't need it except perhaps on MinGW. Unicode support functions (iconv) come with glibc version 2.1 or greater. If you don't have glibc (try iconv --version), you can get the separate libiconv library from http://clisp.cons.org/~haible/packages-libiconv.html. However, neither one is required to use GNUstep.

'The TIFF library (libtiff) (Version 3.4beta36 or greater) (REQUIRED)'

The GUI library uses this to handle loading and saving TIFF images.

'The JPEG library (libjpeg) (RECOMMENDED)'

The GUI library uses this to handle loading JPEG images.

'The PNG library (libpng) (RECOMMENDED)'

The GUI library uses this to handle loading PNG images.

'gif or ungif (OPTIONAL)'

The GUI library uses either one of these libraries to load GIF images.

'aspell (OPTIONAL)'

The GUI library uses this to handle spell checking.

'cups (OPTIONAL)'

The GUI library uses this to handle interface to the CUPS print servers.

'audiofile (OPTIONAL)'

The GUI library uses this for playing sound files.

'portaudio (OPTIONAL)'

The GUI library uses this for the sound server. Use v19, which has several API changes since the previous version. v19 hasn't actually been formally released, but several distributions (SuSE, etc) use it anyway.

'freetype2 (RECOMMENDED, REQUIRED for art backend)'

This is used for font information. Freetype2 cache API is in flux. GNUstep tries to account for this, but if you get errors about undefined FTC_ symbols, you might be using an unsupported version of freetype.

'libart_lgpl2 (REQUIRED for art backend only)'

Drawing library for the art backend.

'WindowMaker (Version >= 0.62) (OPTIONAL)'

GNUstep and WindowMaker work together to provide a consistant interface. Although it is not required, GNUstep will work much better if you use it with the WindowMaker window manager. Get WindowMaker from http://www.windowmaker.info.

'gnustep-objc package (for gcc version < 3.0 ONLY or MINGW/Cygwin) (RECOMMENDED)'

Note: Do not install this library unless you are sure you need it. You probably don't need it except on MinGW and Cygwin (regardless of the gcc version you have). This is a special version of the Objective-C runtime that include several bug fixes and features that were not in gcc versions previous to 3.0. It is available at ftp://ftp.gnustep.org/pub/gnustep/libs which compiles using the GNUstep Makefile package (so you don't have to get the entire gcc dist). Make sure to set the THREADING variable in the GNUmakefile. It's possible to compile the library static (make shared=no) and just copy to the place where the gcc libobjc library is (type gcc -v to get this location). Note you have to install gnustep-make (below) before installing this library.

'GDB (OPTIONAL)'

GDB can be obtained from ftp://ftp.gnu.org/gnu/gdb. As of release 6.0, gdb has special support for debugging Objective-C programs.

'TeX (OPTIONAL)'

You need a TeX implementation, like tetex, to compile some of the documentation (although most of that is available on the web).


Compiling and Installing the Packages

Get the following individual packages:

  • gnustep-make
  • gnustep-base
  • gnustep-gui
  • gnustep-back

Alternitively:

  • gnustep-startup

To obtain these packages go to GNUstep FTP.

Make sure you install (if necessary) all the previously mentioned libraries before configuring and building GNUstep.

You should install these packages as root (read special note for the gnustep-base library, below, if you cannot do this).

For installation on specific systems, read the machine specific instructions at the end of this document or appropriate README files in the gnustep-make Documentation directory (such as README.MingW for Windows).

Installing the Core Libraries

The GNUstep packages uses the Autoconf mechanism for configuration; it checks some host capabilties which are used by all GNUstep software. To configure just type:

./configure

The GNUstep makefile package needs a root directory. If the GNUSTEP_SYSTEM_ROOT environment variable is set then configure will determine the root directory from its value (by removing the final /System path component from it). You can also specify the root directory when you run configure with the prefix paramater; the following command makes /usr/local/GNUstep the root directory:

./configure --prefix=/usr/local/GNUstep

If you do not have the GNUSTEP_SYSTEM_ROOT environment variable set and you do not specify a root directory when running configure, then configure will use /usr/GNUstep as the default root directory.

Alternate Library Setup

Read the installation instructions in the Makefile package (make) for more installation options. Make sure you use the same configuration options when configuring each GNUstep library.

Building the Package

To build the individual packages, use this familiar set of commands for each pacakge (add any additional options you decide upon):

./configure
make
make install

Start with the Makefile Pacakge (gnustep-make). After installing gnustep-make you need to execute GNUstep's shell configuration script, as follows:

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh

before proceeding any further.

NOTE for gcc 2.X or MinGW users: Now install gnustep-objc. Before building gnustep-objc, edit the `GNUmakefile' and set the THREADING variable to the thread library used on your system (usually its posix, but you can leave it at single if you don't need threads). At this point you should probably re-configure, make and install gnustep-make, so it can pick up on any threading information that gnustep-objc provides.

Now install gnustep-base, gnustep-gui and finally gnustep-back.

NOTE: If you are trying to install the packages without root permission, you may need to change one thing in the base library. Edit the file gnustep-base/Tools/gdomap.h to uncomment the last line and modify the specified port number to a port which you know is not in use on your network. You should only do this if absolutely necessary since making this change will break communications with any systems where an identical change has not been made. Also, the standard gdomap port is the one officially registered with IANA and is reserved for use by gdomap - it should only be changed if you can't get your system administrator to start the gdomap server using it.


Aditional Installation

Enviornment Setup

Add the shell script `GNUstep.sh' located in the Makefile package to your shell startup file (such as `.profile'). For instance, if your GNUSTEP_SYSTEM_ROOT is `/usr/GNUstep/System',

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh

in your `.profile' file will work (Note the period at the beginning of the line, and the space between the period and the following path; if your GNUSTEP_SYSTEM_ROOT is different, you need to replace `/usr/GNUstep/System' with your GNUSTEP_SYSTEM_ROOT). It defines environment variables that are needed to find GNUstep files and executables. Users of csh need to use the `GNUstep.csh' script. Read the make package `README' for more info. Some systems, like GNU/Linux have an `/etc/profile.d' directory where scripts can be executed automatically. If you want to set up GNUstep for every user on your system, you can try copying/linking the `GNUstep.sh' there. For csh or tcsh, try

source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh

GNUstep Home

Your home GNUstep directory should be created automatically the first time you use a GNUstep tool or application. This is where user defaults are kept as well as other user configuration files. User installed apps, libraries, etc are also here (if the default user directory is used). By default this is the directory `GNUstep' under your home directory, but you can change this (see the gnustep-make installation documentation).

Time Zone

In most cases, GNUstep should be able to determine your time zone, if you have already set it up correctly when setting up your computer. However, in some cases this might fail or the correct information may not be available. You can set it manually using the GNUstep defaults utility to set Local Time Zone to your local time zone. Type something like defaults write NSGlobalDomain "Local Time Zone" GB. Where GB is a time zone abbreviation.

See '$GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-bsae/NSTimeZones/zones' for typical time zones.

GNUstep daemons

Set up your system to execute some GNUstep deamons. If you don't do this, they will be started automatically when you run your first GNUstep app:

  • gdomap - Put this in a system startup file, like `/etc/rc.local' or `/etc/rc.d/rc.local' (customize for your system)
GNUSTEP_SYSTEM_ROOT=/usr/GNUstep/System
if [ -f $GNUSTEP_SYSTEM_ROOT/Tools/gdomap ]; then
  $GNUSTEP_SYSTEM_ROOT/Tools/gdomap
fi
  • gdnc - Start after sourcing `GNUstep.sh' (e.g. in .profile)
  • gpbs - Same as with gdnc, make sure X-Windows is running.
  • make_services - Not a deamon, but a tool that needs to be run everytime you install a new Application or service. This is NOT run automatically.
if [ `gdomap -L GDNCServer | grep -c Unable` == 1 ]; then
  echo "Starting GNUstep services..."
  gdnc
  gpbs
fi
make_services


Test Tools and Applications

Example applications are located in the gstep-examples package. To make these, just uncompress and untar this package, cd to the appropriate directory, and type make. You will need to install the GNUstep core libraries first before doing this.

To run the examples. Use the openapp utility that is part of the GNUstep makefile package (and stored in `$GNUSTEP_SYSTEM_ROOT/Tools'). Usage is:

openapp application [additional arguments to app]

Good Luck!


Machine Specific Instructions

Please populate with OS and Architecture specific intructions. Please keep in alphabetical order!

BSD

Darwin

GNU/Linux

Debian (x86)

Version 4.0 (Etch)

Packages are available from Debian's package repositories but are significantly outdated.

Slackware (x86)

Version 10.2

Libraries and accompanying applications will build with no modifications. Slackware 10.2 ships with GCC 3.3.6, so mixed Objective-C and C++ code is not supported, meaning additional frameworks/libraries may not be supported.

Solaris

Getting Libraries via SVN

If you didn't get one of the snapshots, or if you want to be sure to stay on the bleading edge, then you should get the libraries via SVN. Go to http://www.gnustep.org/resources/sources.html for information on how to get the sourcecode.

If you haven't already done so, change to the directory, where you want the source to reside. To get a list of potential modules to check out, type

cvs -z3 checkout -c

For instance, to check our `core', which contains all the GNUstep code libraries:

cvs -z3 checkout core

After you have checked out the source you can compile it as usual. To update the source, go into the directory of the source tree you want to update, for example, go into 'base', and type:

cvs -z3 update -Pd

You don't have to re-checkout after you have the source, just update!