Warning: This page is part of Greenstone's old deprecated wiki. Please visit the new wiki at wiki.greenstone.org/doku.php

Compiling Greenstone

From GreenstoneWiki

Jump to: navigation, search

Simple instructions for compiling Greenstone from source distribution or SVN checkout.

For more detailed instructions and platform specific notes, please see this page.

Contents

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).

  1. Download winbin from Greenstone's repository
  2. 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.)
  3. 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 vcvars32.bat script, found in the VC++ installation directory (for us this is in C:\Program Files\Microsoft Visual Studio\VC98\bin.)
  4. 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.

  5. 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)

  1. Download winbin from Greenstone's repository
  2. 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
    
  3. 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
    
  4. We compile Greenstone from the Windows command prompt. First, you must set up the VC++ environment. (For us, this requires running the vcvars32.bat script, found in the VC++ installation directory (for us this is in C:\Program Files\Microsoft Visual Studio\VC98\bin.)
  5. Then run the following:
    * nmake /f win32.mak
    * nmake /f win32.mak LOCAL_LIBRARY=1
    
  6. For Greenstone 2 versions older than GS2.81-rc2, you will need to edit gsdl\setup.bat 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 makegli.bat from the gsdl\gli directory.

Personal tools