Revision of Building GST Guides from Wed, 08/05/2009 - 20:59
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
- Download GST.
- 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
The best 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.
Windows: MinGW/MSYS
MinGW and MSYS provide a lightweight Unix shell environment to compile native Window programs.
Requirements
- MingW32: You can download from Here: http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24...
- 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...
- InfoZIP: Download from ftp://tug.ctan.org/tex-archive/tools/zip/info-zip/WIN32/zip232xN.zip
- TCL and TK sources: http://prdownloads.sourceforge.net/tcl/tcl8419-src.zip and http://prdownloads.sourceforge.net/tcl/tk8419-src.zip
- GST, of course: http://smalltalk.gnu.org/download
First Steps
I will take default paths installations, and glpunzi as the username.
- Install Mingw32 with g++ compiler
- Install MSYS. In postinstall, tell the path for MingW32. C:/MinGW/
- Extract zip.exe from InfoZip on C:\Msys\1.0\bin
- 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
- From Msys, go to your home an enter on tcl8.4.19/win folder (cd /home/glpunzi/tcl8.4.19/win).
- Type: ./configure; make; make install
- Repeat step 2.6 on tk folder (cd /home/glpunzi/tk8.4.19/win)
- 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 steps are:
- configure GNU Smalltalk with the following command line:
./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- prepare the installation as follows:
make install DESTDIR=`pwd`/destdir
- prepare a ZIP file that you can move to a Windows machine:
mv root/nonexistent GNU\ Smalltalk zip -9r gst.zip GNU\ Smalltalk
If you want, you can run gst directly from the 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:
- start a wine application if you never did so. This creates your C: drive in $HOME/.wine/drive_c
- make the Windows libraries provided by Fedora visible to Wine:
ln /usr/i686-pc-mingw32/sys-root/mingw/ "$HOME/dosdevices/c:/mingw"
- 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.
