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 07:44] – [Uptodate source code from SVN] anupamaen:user_advanced:installation [2018/09/26 04:30] anupama
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 394: Line 395:
 ant  ant 
 </code>\\ Now, if necessary, you can customise the port/hostname fields in the newly generated toplevel file ''build.properties''. </code>\\ Now, if necessary, you can customise the port/hostname fields in the newly generated toplevel file ''build.properties''.
-  - Most Linux systems and probably all the newer Mac systems require //gnome-lib// for successful compilation. Uncomment the following to activate it <code>+  - Most Linux systems and probably all the newer Mac systems require //gnome-lib// for successful compilation. If you wish to //compile gnome-lib// along with GS3, uncomment the following line in ''build.properties'' to activate it <code>
 checkout.gnomelib.ext=true checkout.gnomelib.ext=true
-</code>\\ Alternatively, if you don't want to compile the gnome-lib extension along with GS3 but wish to use a precompiled ''gnome-lib'' to speed up compiling, then proceed with these instructions up to step 8's ''ant prepare''. After doing ''ant prepare'', grab the precompiled ''gnome-lib'' for your operating system by visiting http://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk and there clicking on the link for the ''gnome-lib-**minimal**-'' the zip/tarball for your operating systemthen following the download link. Download the ''gnome-lib'' zip/tar file into your ''gs2build/ext'' folder and unzip/untar it there. Then proceed with the ''ant install'part of step 8 of these instructions.+</code>\\ Skip this step if you don't want to //compile// the gnome-lib extension when compiling GS3but prefer to use a pre-compiled ''gnome-lib'' to speed up the processin which case you'll carry out step 9 later.
   - 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 also need to add -fPIC to the CFLAGS and CXXFLAGS environment variables: \\ <code>export CFLAGS="-fPIC $CFLAGS
-  - Finally, you can start the steps for compiling: <code> +export CXXFLAGS="-fPIC $CXXFLAGS"</code> 
-ant prepare +  - Finally, you can start the steps for building GS3 from SVN: <code> 
-</code><!--<code>+ant prepare</code> 
 +  - This step is only applicable if you had decided on using a //pre-compiled// ''gnome-lib'' in step 5. In that case, visit http://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk and there click on the link for the ''gnome-lib-**minimal**-'' zip/tarball for your operating system. On the next page, click on the download link to download the zip/tarball file, then move this downloaded file into ''gs2build/ext''. After that, unpack and set up your gnome-lib-minimal for compiling as follows: \\ <code>cd gs2build/ext 
 +tar -xvzf gnome-lib-minimal-<your-OS-version>.tar.gz 
 +cd gnome-lib-minimal 
 +source ./devel.bash 
 +cd ../../.. 
 +</code> 
 +  - You can now run the compile step: <!--<code>
 cd ext  cd ext 
 source devel.bash source devel.bash
Line 414: 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