Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:user_advanced:installation [2018/06/26 21:44]
anupama [Uptodate source code from SVN]
en:user_advanced:installation [2018/09/13 13:34] (current)
anupama [Uptodate source code from SVN]
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 400: Line 401:
   - 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, 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>​
   - 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>​