Building GST Guides

GNU Smalltalk is mainly aimed at POSIX operating systems, like the many flavors of GNU/Linux distributions or even Mac OS X. However, GNU Smalltalk's build system will also allow it to run on operating systems like Windows.

Please report errors or complete if possible.

GNU/Linux


  1. Download GST.
  2. Compile it from a shell:

   ./configure
   make
   sudo make install

The executable will be in /usr/local/bin/gst.

If you're having trouble running gst-blox should compile with tcl/tk, you must first find where are the configuration files tclConfig.sh and tkConfig.sh for tell it to the script configure:

   ./configure --with-tcl=/usr/share/tcltk/tcl8.4 --with-tk=/usr/share/tcltk/tk8.4
   make
   sudo make install

This however would be a bug, so please report it to the mailing list.

If you are not familiar with compiling source code packages, remember that you need the development packages of all the libraries you need, in particular GTK+, Cairo, readline, sqlite.

Mac OS X

Using MacPorts


The easiest way to install GNU Smalltalk is using the MacPorts project (see www.macports.org). MacPorts is an open-source community initiative which provides access to thousands of ports that greatly simplify the task of compiling and installing open-source software on your Mac.

Before installing GNU Smalltalk ensure that MacPorts is updated to the latest version. To Update MacPorts, simply open a Terminal and type:

 sudo port -v selfupdate

Once MacPorts has updated itself, type the following to start the GNU Smalltalk installation:

 sudo port install gst (or gst-dev for development branch)

The installation process will download, build and install all components required by GNU Smalltalk. The whole installation process may take some time to complete and will install your GNU Smalltalk in /opt/local/bin/gst.

Unfortunately, there is a problem with MacPorts that breaks the GTK+ bindings of GNU Smalltalk. The fink packages do not have this problem. If you use fink, you can follow more or less the same steps as for GNU/Linux.

From Source

The main motivation for building GNU Smalltalk from source on Mac OS X is to be able to use the native (Quartz) GTK+ bindings. The following instructions were tested on Snow Leopard (10.6.1). You must have the Apple Developer Tools installed (the version included with Snow Leopard is the one tested here) and should be somewhat familiar with the Terminal and building GNU autoconf-bundled software.

Steps marked with (GTK) can be omitted if you are not attempting to build the gtk bindings (which are necessary to be able to use VisualGST but not necessary to use the command line utilities or to embed GNU smalltalk as a library in your application).

  1. (GTK) Download and install GTK+ for OS X
  2. Download and install gawk
    • make sure gawk is in your PATH
  3. (GTK) Download and install pkg-config.
    • make sure pkg-config is in your PATH
    • add the Gtk/GLib/Cairo pkg-config files to your PKG_CONFIG_PATH:
      • bourne shell: export PKG_CONFIG_PATH=/Library/Frameworks/Cairo.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/Gtk.framework/Resources/dev/lib/pkgconfig:/Library/Frameworks/GLib.framework/Resources/dev/lib/pkgconfig
  4. Download the latest GNU smalltalk sources
    • The version of autoconf provided with Snow Leopard is 2.61 whereas GNU Smalltalk requires 2.63. It is possible to build without installing newer autoconf tools simply by changing the AC_PREREQ line at the top of configure.ac and most of the tests pass but extensive testing has not been done.
    • autoreconf -vi
    • CFLAGS='-m32' LDFLAGS='-arch i386' ./configure --prefix=/usr/local/gst
    • sudo make install

This will build and install gst in /usr/local/gst. It can easily be relocated and could even be placed in the user's home directory, which would not require sudo or any root access.

Windows: MinGW/MSYS

MinGW and MSYS provide a lightweight Unix shell environment to compile native Window programs.

Requirements


  1. MingW32: You can download from Here: http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24...
  2. MSYS: Until now (30/05/2008) the easy way for install MSYS is installing 1.0.10 version. http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24...
  3. InfoZIP: Download from ftp://ftp.info-zip.org/pub/infozip/win32/zip232xn.zip
  4. TCL and TK sources: http://prdownloads.sourceforge.net/tcl/tcl8419-src.zip and http://prdownloads.sourceforge.net/tcl/tk8419-src.zip
  5. GST, of course: http://smalltalk.gnu.org/download

First Steps


I will take default paths installations, and glpunzi as the username.
  1. Install Mingw32 with g++ compiler
  2. Install MSYS. In postinstall, tell the path for MingW32. C:/MinGW/
  3. Extract zip.exe from InfoZip on C:\Msys\1.0\bin
  4. Open Msys to create your user, and extract TCL, TK, and GST zip files to your MSYS home irectory for example. C:\Msys\home\glpunzi
  5. From Msys, go to your home an enter on tcl8.4.19/win folder (cd /home/glpunzi/tcl8.4.19/win).
  6. Type: ./configure; make; make install
  7. Repeat step 2.6 on tk folder (cd /home/glpunzi/tk8.4.19/win)
  8. Go where you extracted GST (cd /home/glpunzi/smalltalk-3.0b) and type:

   ./configure --with-tcl=/home/glpunzi/tcl8.4.19/win --with-tk=/home/glpunzi/tk8.4.19/win
   make
   make install

Now, you have a pretty GST running on Windows. From a Windows shell, go to C:\Msys\1.0\local\bin an execute gst to get the GST shell or gst-blox to open the GUI.

Cross compilation with Wine

GNU Smalltalk can be cross-compiled from Linux to Windows. However, since GNU Smalltalk runs itself as part of the build process, you need to use Wine.

This is tested using Fedora 11's packages.

The compilation is similar to a normal compilation, however some extra options are needed to work around bugs in Fedora's packages and to ensure the resulting executable is relocatable:

./configure --disable-glibtest --disable-gtktest \
    --host=i686-pc-mingw32 --prefix=/nonexistent \
    --bindir=/nonexistent --libdir=/nonexistent \
    LDFLAGS=-L/usr/i686-pc-mingw32/sys-root/mingw/lib \
    PKG_CONFIG=/usr/bin/mingw32-pkg-config
make

Taking advantage of the relocatability, you can then prepare a ZIP file that you can move to a Windows machine:

make install DESTDIR=`pwd`/destdir
mv destdir/nonexistent GNU\ Smalltalk
zip -9r gst.zip GNU\ Smalltalk

If you want, you can run gst directly from this GNU Smalltalk directory using Wine (from Wine's command prompt, or alternatively using wineconsole ./gst.exe). However, for this to work you need three additional steps:

  1. start a wine application if you never did so. This creates your C: drive in $HOME/.wine/drive_c
  2. make the Windows libraries provided by Fedora visible to Wine:
    ln /usr/i686-pc-mingw32/sys-root/mingw/ "$HOME/dosdevices/c:/mingw"
  3. open the Wine regedit and prepend "C:\mingw\bin" to the key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment.

If the above compilation recipe does not work, try doing these three steps anyway.

Syndicate content

User login