Table of Contents
This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.
Compiling Greenstone
Simple instructions for compiling Greenstone from source distribution or SVN checkout.
For more detailed instructions and platform specific notes, please see this page.
Unix
The "standard" commands of
$ ./configure $ make $ make install
should (hopefully) be all that is required.
If you get complaints about not finding gdbm, use the –with-gdbm=/full/path/to/your/gdbm/directory option to configure
You will probably need to use GNU make.
The Greenstone Librarian Interface (GLI) code is written in Java, and compiling it requires a suitable version of the Java Software Development Kit (version 1.4.0 or newer). To compile this source code, run makegli.sh from the gsdl/gli directory.
A detailed walkthrough for installing from source on Linux is available here.
Mac OS X
All compilation is currently done through a terminal.
Same basic instructions as for Unix. GDBM is not installed by default, so you will need to install it, then use the –with-gdbm=/full/path/to/your/gdbm/directory option to configure
Windows
We have tested compilation of Greenstone 2 with Visual C++ versions 6.0 and 7.0 (Visual Studio.NET 2003). Our distribution includes a cut-down port of the gdbm library for windows.
You can use either use the automated compile script to compile up Greenstone 2.81rc2 and subsequent releases, or compile manually.
Automated compiling
Automated compiling by using the makegs2.bat script is possible for Greenstone 2 versions after 2.81rc.
- You will need to have downloaded winbin from Greenstone's repository.
- Run the makegs2.bat file that's located in your Greenstone 2 installation folder:
makegs2.bat
And it should compile up Greenstone 2 for you.
Compiling manually (for versions 2.83 and after)
You will need Visual C++ of Visual Studio and, if compiling the Apache web server, Microsoft's SDK (in order to have access to windows.h).
- Download winbin from Greenstone's repository
- Compile Greenstone from the Windows command prompt. If you're going to compile the Apache web server included with Greenstone, you will first need to run the script "setenv.cmd" that sets the environment for Microsoft's SDK. (In our case, we found this in C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd.)
- Regardless of whether the Apache web server is meant to be compiled up or not, the next step is to set up the VC++ environment. (For us, this requires running the <tt>vcvars32.bat</tt> script, found in the VC++ installation directory (for us this is in C:\Program Files\Microsoft Visual Studio\VC98\bin.)
- Then run the following, one after the other:
* nmake /f win32.mak * nmake /f win32.mak LOCAL_LIBRARY=1
The above will compile up Greenstone followed by what's needed for the local library.
- If compiling the Apache web server, you will next need to run:
nmake /f win32.mak APACHE_HTTPD=1
And finally, if at any stage you want to compile it with debugging turned on, run the compile command with the flag DEBUG=1.
Compiling manually (for versions 2.81rc and prior)
- Download winbin from Greenstone's repository
- Manually unzip the zip files that are located in the directories:
* gsdl\common-src\packages\windows\crypt * gsdl\common-src\packages\windows\expat * gsdl\common-src\packages\windows\gdbm * gsdl\common-src\indexers\packages\windows\iconv
- Unzip the tarred zip file (*.tar.gz) located in gsdl\common-src\packages\sqlite.
You can use the included gzip.exe and tar.exe in the gsdl\bin\windows folder to decompress and untar it. First run setup.bat from your Greenstone 2 installation folder:
> cd gsdl > setup.bat
Now move into the gsdl\common-src\packages\sqlite and unzip the sqlite-amalgamation-3.5.9.tar.gz file, and then untar the resulting file:
> cd common-src\packages\sqlite > gzip --decompress sqlite-amalgamation-3.5.9.tar.gz > tar -xf sqlite-amalgamation-3.5.9.tar
And finally delete the intermediate tar file:
> del sqlite-amalgamation-3.5.9.tar
- We compile Greenstone from the Windows command prompt. First, you must set up the VC++ environment. (For us, this requires running the <tt>vcvars32.bat</tt> script, found in the VC++ installation directory (for us this is in <tt>C:\Program Files\Microsoft Visual Studio\VC98\bin</tt>.)
- Then run the following:
* nmake /f win32.mak * nmake /f win32.mak LOCAL_LIBRARY=1
- For Greenstone 2 versions older than GS2.81-rc2, you will need to edit <tt>gsdl\setup.bat</tt> and replace the two instances of **GSDLHOME** with the path to the gsdl directory.
The Greenstone Librarian Interface (GLI) code is written in Java, and compiling it requires a suitable version of the Java Software Development Kit (version 1.4.0 or newer). To compile this source code, run <tt>makegli.bat</tt> from the <tt>gsdl\gli</tt> directory.