User Tools

Site Tools


en:user_advanced:installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:user_advanced:installation [2018/06/26 09:20] – [Uptodate source code from SVN] anupamaen:user_advanced:installation [2018/11/13 06:06] – [Windows] anupama
Line 24: Line 24:
 Prerequisites for compiling the source component and source distribution on Windows: Prerequisites for compiling the source component and source distribution on Windows:
   * Java JDK 6.x or later. For compiling on Windows 64 bit, need the 64 bit version of JDK. For compiling Greenstone 3.06 and onwards, need JDK 7.x or later.   * Java JDK 6.x or later. For compiling on Windows 64 bit, need the 64 bit version of JDK. For compiling Greenstone 3.06 and onwards, need JDK 7.x or later.
-  * PERL: if you're using GS3.07 or earlier, get ActivePerl for Windows. From GS3.08 onwards, binaries and source distributions come with a Strawberry Perl located in the GS3's ''gs2build\bin\windows\perl'' folder.+  * PERL: if you're using GS3.07 or earlier, get ActivePerl for Windows. From GS3.08 onwards, binaries and source distributions come with a [[http://trac.greenstone.org/browser/main/trunk/release-kits/shared/windows/perl.zip|Strawberry Perl]] located in the GS3's ''gs2build\bin\windows\perl'' folder.
   * Visual Studio 8 or later (Visual Studio 12 on 64 bit Windows 10 worked too.)   * Visual Studio 8 or later (Visual Studio 12 on 64 bit Windows 10 worked too.)
   * (If you want to compile GS2 or GS3 with debugging on, you will need Microsoft SDK)   * (If you want to compile GS2 or GS3 with debugging on, you will need Microsoft SDK)
Line 168: Line 168:
  
 In addition to the Prerequisites for compiling Greenstone on Windows listed above, to install Greenstone from SVN source on Windows, you need to [[en:developer:install_svn|install svn]]. In addition to the Prerequisites for compiling Greenstone on Windows listed above, to install Greenstone from SVN source on Windows, you need to [[en:developer:install_svn|install svn]].
 +
 +(**NOTE:** Some of the prerequisite packages are available from greenstone's svn and are put into a subfolder called ''local''. For instructions on compiling up from source using the ''local'' folder, refer to the [[en:developer:windows_source_install|Windows source installation]] page\\ Otherwise, proceed with the following.)
  
 SVN, ANT, and JAVA must be put on PATH and Visual Studio must be set up for compiling the C/C++ code, SVN, ANT, and JAVA must be put on PATH and Visual Studio must be set up for compiling the C/C++ code,
-which can be accomplished using this file+which can be accomplished using the file ''vcvars<number>.bat'', or ''vcvarsall.bat'' passing in ''amd64'' for 64 bit windows.
-<code> +
- vcvars<number>.bat file +
-</code>+
  
 <TABAREA tabs="Greenstone3,Greenstone2"> <TABAREA tabs="Greenstone3,Greenstone2">
Line 216: Line 215:
 </code>If you're on Mac OS version 10.11/El Capitan, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin" </code>If you're on Mac OS version 10.11/El Capitan, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
 export CXXFLAGS="$CXXFLAGS $CFLAGS" export CXXFLAGS="$CXXFLAGS $CFLAGS"
-export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> Since GS3.08, if you're on 64 bit linux, you will also need to add -fPIC to the CFLAGS environment variable: \\ <code>export CFLAGS="-fPIC $CFLAGS"</code>If at any point you run ''source ./gs3-setup.sh'' before compiling, you will have to set up the Java JDK environment again, because the ''gs3-setup'' script will make the included JRE the default Java.+export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> Since GS3.08, if you're on 64 bit linux, you will also need to add -fPIC to the CFLAGS and CXXFLAGS environment variables: \\ <code>export CFLAGS="-fPIC $CFLAGS
 +export CXXFLAGS="-fPIC $CXXFLAGS"</code>If at any point you run ''source ./gs3-setup.sh'' before compiling, you will have to set up the Java JDK environment again, because the ''gs3-setup'' script will make the included JRE the default Java.
   - The Java Runtime (JRE) included in binaries from Greenstone 3.07 onward is version 7. For 32 bit linux binaries, the included JRE is 32 bit and for 64 bit linux binaries the JRE is 64 bit. //If you have set up a system Java of a version different from the JRE included//, then \\   - The Java Runtime (JRE) included in binaries from Greenstone 3.07 onward is version 7. For 32 bit linux binaries, the included JRE is 32 bit and for 64 bit linux binaries the JRE is 64 bit. //If you have set up a system Java of a version different from the JRE included//, then \\
      * rename the ''packages\jre'' folder to something else, so that when Greenstone runs after compiling, it uses your system Java rather than the old 32 bit JRE v7.      * rename the ''packages\jre'' folder to something else, so that when Greenstone runs after compiling, it uses your system Java rather than the old 32 bit JRE v7.
Line 350: Line 350:
   - If you're on Mac OS version 10.11/El Capitan, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"   - If you're on Mac OS version 10.11/El Capitan, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
 export CXXFLAGS="$CXXFLAGS $CFLAGS" export CXXFLAGS="$CXXFLAGS $CFLAGS"
-export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> Since GS3.08, if you're on 64 bit linux, you will also need to add -fPIC to the CFLAGS environment variable: \\ <code>export CFLAGS="-fPIC $CFLAGS"</code>+export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> Since GS3.08, if you're on 64 bit linux, you will also need to add -fPIC to the CFLAGS and CXXFLAGS environment variables: \\ <code>export CFLAGS="-fPIC $CFLAGS
 +export CXXFLAGS="-fPIC $CXXFLAGS"</code>
   - In the terminal, you can now finally run ''ant install'' from //the toplevel folder// of your extracted Greenstone 3 installation to start compilation. It can take several minutes. \\ **Note:** If at this stage, compilation fails at Perl's XMLParser with [[http://gentoo.2317880.n4.nabble.com/PREFIX-revolutions-in-the-bootstrapping-world-td181438.html|the error message]] "Only one of PREFIX or INSTALL_BASE can be given. Not both.", then in the same terminal check if the INSTALL_BASE environment variable is set, and if it is, unset it (and PERL_MM_OPT if it was set to this) and re-run ''ant install'':\\ <code>   - In the terminal, you can now finally run ''ant install'' from //the toplevel folder// of your extracted Greenstone 3 installation to start compilation. It can take several minutes. \\ **Note:** If at this stage, compilation fails at Perl's XMLParser with [[http://gentoo.2317880.n4.nabble.com/PREFIX-revolutions-in-the-bootstrapping-world-td181438.html|the error message]] "Only one of PREFIX or INSTALL_BASE can be given. Not both.", then in the same terminal check if the INSTALL_BASE environment variable is set, and if it is, unset it (and PERL_MM_OPT if it was set to this) and re-run ''ant install'':\\ <code>
 > env | grep INSTALL > env | grep INSTALL
Line 386: Line 387:
 export JAVA_HOME=/path/to/your/jdk7 export JAVA_HOME=/path/to/your/jdk7
 export ANT_HOME=/path/to/your/ant export ANT_HOME=/path/to/your/ant
-export PATH=$JAVA_HOME/bin: +export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
-$ANT_HOME/bin:$PATH+
 </code> </code>
   - Checkout the code: <code>   - Checkout the code: <code>
Line 400: Line 400:
   - If you want to compile imagemagick from source on Unix systems (though for Mac you can also use the precompiled imagemagick binary*), <code>   - If you want to compile imagemagick from source on Unix systems (though for Mac you can also use the precompiled imagemagick binary*), <code>
 checkout.imagemagick.ext=true checkout.imagemagick.ext=true
-</code> +</code>\\ **Not compiling at present on MacOS High Sierra (10.13.4).** So use the precompiled imagemagick binary* for that instead. 
-  - If you're on Mac OS version 10.11/El Capitan, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"+  - **If you're on Mac OS version 10.11/El Capitan or later**, set CFLAGS, CXXFLAGS and JNIFLAGS as follows: \\ <code>export CFLAGS="$CFLAGS -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin"
 export CXXFLAGS="$CXXFLAGS $CFLAGS" export CXXFLAGS="$CXXFLAGS $CFLAGS"
-export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> Since GS3.08, if you're on 64 bit linux, you will also need to add -fPIC to the CFLAGS environment variable: \\ <code>export CFLAGS="-fPIC $CFLAGS"</code>+export JNICFLAGS="$JNICFLAGS $CFLAGS"</code> Since GS3.08, **if you're on 64 bit linux**, you will need to add -fPIC to the CFLAGS and CXXFLAGS environment variables: \\ <code>export CFLAGS="-fPIC $CFLAGS
 +export CXXFLAGS="-fPIC $CXXFLAGS"</code>
   - Finally, you can start the steps for building GS3 from SVN: <code>   - Finally, you can start the steps for building GS3 from SVN: <code>
 ant prepare</code> ant prepare</code>
Line 421: Line 422:
 </code> </code>
  
-* If you want imagemagick and ghostscript on a mac, check out the precompiled binaries from svn+* If you want imagemagick and ghostscript on a mac, check out the precompiled binaries from svn **after** the ''ant prepare'' step
  
 <code> <code>
 +cd gs2build
 svn co http://svn.greenstone.org/main/trunk/binaries/mac/intel/imagemagick bin/darwin/imagemagick svn co http://svn.greenstone.org/main/trunk/binaries/mac/intel/imagemagick bin/darwin/imagemagick
 svn co http://svn.greenstone.org/main/trunk/binaries/mac/intel/ghostscript bin/darwin/ghostscript svn co http://svn.greenstone.org/main/trunk/binaries/mac/intel/ghostscript bin/darwin/ghostscript
en/user_advanced/installation.txt · Last modified: 2023/08/03 03:07 by anupama