en:developer:compiling_greenstone
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:developer:compiling_greenstone [2016/02/15 01:23] – kjdon | en:developer:compiling_greenstone [2023/03/19 20:55] (current) – removed kjdon | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Compiling Greenstone ====== | ||
- | |||
- | |||
- | <TABAREA tabs=" | ||
- | < | ||
- | ==== Ubuntu ==== | ||
- | <!-- mv:3 --> | ||
- | Note: You need java from the [[http:// | ||
- | |||
- | Download a jdk binary installer from the sun website to a location like < | ||
- | < | ||
- | chmod +x ~/ | ||
- | cd /usr/local | ||
- | sudo ~/ | ||
- | export JAVA_HOME=/ | ||
- | export PATH=$JAVA_HOME/ | ||
- | </ | ||
- | |||
- | Install some required packages | ||
- | < | ||
- | sudo apt-get update | ||
- | sudo apt-get install build-essential subversion ant autoconf | ||
- | sudo apt-get upgrade | ||
- | </ | ||
- | |||
- | Checkout and install Greenstone3 | ||
- | < | ||
- | svn co http:// | ||
- | cd greenstone3 | ||
- | ant | ||
- | gedit build.properties | ||
- | (edit as needed, changing port number for tomcat, etc) | ||
- | ant prepare install | ||
- | </ | ||
- | <!-- /mv:3 --> | ||
- | </ | ||
- | < | ||
- | |||
- | The " | ||
- | $ ./configure | ||
- | $ make | ||
- | $ make install | ||
- | should (hopefully) be all that is required. | ||
- | |||
- | If you get complaints about not finding gdbm, use the | ||
- | // | ||
- | |||
- | You will probably need to use GNU make. | ||
- | |||
- | If you get an error about CPPFunction not declared in client.c, edit runtime-src/ | ||
- | < | ||
- | to | ||
- | < | ||
- | |||
- | 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 [[en: | ||
- | |||
- | ==== Ubuntu ==== | ||
- | <!-- mv:2 --> | ||
- | You need to set JAVA_HOME to the actual root of the jdk, eg "/ | ||
- | |||
- | Install some required packages | ||
- | < | ||
- | sudo apt-get update | ||
- | sudo apt-get upgrade | ||
- | sudo apt-get install build-essential subversion gettext | ||
- | </ | ||
- | |||
- | Checkout and install Greenstone. Installing to /usr/local in this example. | ||
- | |||
- | < | ||
- | cd /usr/local | ||
- | svn co http:// | ||
- | |||
- | cd gsdl | ||
- | ./configure | ||
- | make | ||
- | make install | ||
- | </ | ||
- | <!-- /mv:2 --> | ||
- | |||
- | |||
- | ===== 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 // | ||
- | |||
- | =====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 [[http:// | ||
- | * Run the makegs2.bat file that's located in your Greenstone 2 installation folder: | ||
- | < | ||
- | 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' | ||
- | |||
- | * Download [[http:// | ||
- | * 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 " | ||
- | * 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 // | ||
- | * Then run the following, one after the other: | ||
- | < | ||
- | * 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: | ||
- | < | ||
- | </ | ||
- | |||
- | |||
- | 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 [[http:// | ||
- | * 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: | ||
- | < | ||
- | > 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: | ||
- | < | ||
- | > gzip --decompress sqlite-amalgamation-3.5.9.tar.gz | ||
- | > tar -xf sqlite-amalgamation-3.5.9.tar | ||
- | </ | ||
- | And finally delete the intermediate tar file: | ||
- | < | ||
- | </ | ||
- | |||
- | |||
- | * We compile Greenstone from the Windows command prompt. First, you must set up the VC++ environment. (For us, this requires running the // | ||
- | |||
- | * Then run the following: | ||
- | < | ||
- | * nmake /f win32.mak LOCAL_LIBRARY=1 | ||
- | </ | ||
- | |||
- | * For Greenstone 2 versions older than GS2.81-rc2, you will need to edit // | ||
- | |||
- | 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 // | ||
- | |||
- | |||
- | ====== Advanced Compiling ====== | ||
- | |||
- | This page contains detailed notes and platform specific instructions for compiling Greenstone. Simple compilation instructions may be found [[Compiling_Greenstone | here]]. | ||
- | |||
- | ===== Platforms===== | ||
- | |||
- | We have tested Greenstone on the following platforms: | ||
- | * GNU/Linux: | ||
- | * Debian 3.0 (potato) (i386), gcc 2.95.4 | ||
- | * Debian sid/ | ||
- | * Debian 2.2 (potato) (i386 and ppc rs/6000) (gsdl 2.38) | ||
- | * Red Hat 7.3 (i386), gcc 2.96 | ||
- | * Slackware 8.0.0 (i386), gcc 2.95.3 | ||
- | * Slackware 7.1.0 (i386) (gsdl 2.38) | ||
- | * Solaris 2.8 (sparc), gcc 2.95.2 and gmake. | ||
- | * Solaris 2.6 (sparc) using gcc and gmake. (gsdl 2.38) | ||
- | * FreeBSD 4.2 (i386) (gsdl 2.38) | ||
- | * Cygwin (minor fiddling needed) | ||
- | * Darwin / Mac OS X (G4/ | ||
- | * Microsoft Visual C++ 4.2 and 6.0 | ||
- | If you would like to add other platforms to this list, or inform us of any portability changes required, send mail to the Greenstone mailing list. | ||
- | |||
- | =====Unix Compilation notes===== | ||
- | (we include cygwin here). The " | ||
- | $ ./configure | ||
- | $ make all | ||
- | $ make install | ||
- | should (hopefully) be all that is required. Currently, Greenstone does not honour the `--prefix' | ||
- | |||
- | You will probably need to use GNU make. | ||
- | |||
- | Version 2.38 of Greenstone compiles with gcc version 3.0 (as well as earlier versions of gcc). Earlier versions of Greenstone will require earlier versions of the compiler -- we have successfully used versions egcs-2.91.66 and gcc-2.95. | ||
- | |||
- | 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. | ||
- | |||
- | : | ||
- | |||
- | **Note**! - version 2.41 of Greenstone (released in December 2003) requires slight modification to compile cleanly with gcc version 3.x. The " | ||
- | isis-gdl/ | ||
- | isis-gdl/ | ||
- | isis-gdl/ | ||
- | : | ||
- | |||
- | If you copy these over the 3 files with the same name in gsdl/ | ||
- | |||
- | The GDBM library and headers are needed - Linux distributions typically come with the library, but may or may not come standard with the header file. Darwin does not come with either. If it is not installed in /usr or /usr/local then you will have to specify where it is by using the configure flag --with-gdbm=/ | ||
- | The GDBM library can be downloaded from ftp:// | ||
- | |||
- | The following configure flags add extra functionality to Greenstone: | ||
- | |||
- | |||
- | // | ||
- | < | ||
- | // | ||
- | // | ||
- | |||
- | Once you have the correct compiler, there' | ||
- | |||
- | =====Platform-Specific Issues===== | ||
- | ====Cygwin==== | ||
- | Greenstone does not currently compile under cygwin " | ||
- | |||
- | Also some of the third-party packages required some manual attention. | ||
- | |||
- | Make sure you have the gdbm package installed. | ||
- | |||
- | ====Darwin/ | ||
- | All compilation is currently done through a terminal. | ||
- | |||
- | Note that the default filesystem is case-insensitive. | ||
- | |||
- | Mac OS X uses a compiler based on gcc version 3, so read the above section on Unix Compilation Notes for changes required to the source code for greenstone version 2.41. | ||
- | |||
- | darwin doesn' | ||
- | # Download the gdbm source code from ftp.gnu.org into your home folder, as mentioned previously. | ||
- | # Unpack it using the command "tar -zxf gdbm-1.8.3.tar.gz" | ||
- | # If you used the older gdbm-1.8.0 (instead of 1.8.3), you will need to update some files that can't figure out what the system type is. Eg: "cp / | ||
- | # Make (and install) the library: | ||
- | |||
- | //cd gdbm-1.8.3 & | ||
- | |||
- | If the "make install" | ||
- | # Remove the dynamic libraries, so that the Greenstone files are only linked using the " | ||
- | |||
- | //"rm ~/ | ||
- | # when you configure Greenstone you should add // | ||
- | |||
- | Also see the [[http:// | ||
- | |||
- | ===Issues=== | ||
- | * Due to " | ||
- | * If the make fails when compiling a file called " | ||
- | * "There is a known bug in the version of gcc shipped with MacOS X 10.2." Version 2.38 of greenstone fails to build the pdftohtml converter, with the error message | ||
- | |||
- | // | ||
- | |||
- | The work-around is to remove all lines with "# | ||
- | |||
- | ====GNU/ | ||
- | As mentioned above, version 2.38 of Greenstone compiles with gcc3. If you are using an earlier version of Greenstone, you will need to make sure you are using an older version of gcc, and not gcc2.96 or gcc3. Red Hat >= 7.0 comes with the newer versions of gcc by default. | ||
- | |||
- | You will need the gdbm.h header file. If you don't already have it, it is in the libgdbmg1-dev (debian) or gdbm-devel-1.8.0 (rpm) package. | ||
- | |||
- | We have had a couple of reports from SuSE users that one of our third-party packages (wget) fails to configure as it uses GNU msgfmt for translation catalogues - this is resolved by installing the gettext package. This seems to be already installed on other distributions. | ||
- | |||
- | **Alpha architectures: | ||
- | Well, the good news is that it compiles OK (for versions of gsdl >= 2.37 - earlier versions need updated config.sub files), the bad news is that it fails to build collections. One possibility is that mg (the backend code) doesn' | ||
- | |||
- | ====FreeBSD==== | ||
- | Everything should go smoothly... you might need to install lib gdbm if it is not already installed. | ||
- | |||
- | ====Solaris==== | ||
- | We no longer have solaris machines running in our department. However, Greenstone built and ran the last time I could log on (about version 2.33?), and we have reports of people getting current versions working, with minor changes. | ||
- | |||
- | Greenstone includes a perl module from CPAN, XML::Parser (+Expat), which has caused problems on some machines during the make. This is because perl uses it's own config file to get compiler settings, etc. We think we have worked around this. If you get compilation problems, you can do one of the following: | ||
- | #After doing the toplevel ./ | ||
- | #You could install the perl XML::Parser module manually, and comment out or remove any mention of the cpan/ | ||
- | |||
- | You might need to manually install the gdbm library. In which case, add the // | ||
- | |||
- | You probably need to use gcc: | ||
- | < | ||
- | $ setenv CC gcc | ||
- | $ setenv LD gcc | ||
- | </ | ||
- | You probably need to use GNU's make. Try setting the MAKE variable when you run the configure script, such as: | ||
- | < | ||
- | $ MAKE=gmake ./configure [options] | ||
- | or | ||
- | $ ./configure [options] | ||
- | ... | ||
- | $ gmake all | ||
- | </ | ||
- | |||
- | ====Windows (Visual C++)==== | ||
- | |||
- | The third-party packages (pdftohtml, wvWare, rtftohtml, xlhtml, etc) were compiled using cygwin.</ | ||
- | |||
en/developer/compiling_greenstone.1455499401.txt.gz · Last modified: 2016/02/15 01:23 by kjdon