User Tools

Site Tools


en:user_advanced:installation_312

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
en:user_advanced:installation_312 [2025/07/18 05:05] anupamaen:user_advanced:installation_312 [2025/07/18 05:36] (current) anupama
Line 63: Line 63:
   - ** Ant ** - Ant is bundled in the binary release   - ** Ant ** - Ant is bundled in the binary release
   - ** Perl ** - Perl is also bundled in the binary release.   - ** Perl ** - Perl is also bundled in the binary release.
-  - In the greenstone3 folder, run ''gs3-devel.bat'' - this will set up all the necessary environment variables needed for compiling +  - In the greenstone3 folder, run ''gs3-devel.bat'' - this will set up all the necessary environment variables needed for compiling   
-   +
   - The Java Runtime (JRE) included with Greenstone 3 binaries is a 32 bit Java 8 runtime. This means that //if the Windows machine that you're recompiling the binary with the source component on is not 32 bit Java 8 too//, then you will need to do the following before compiling \\   - The Java Runtime (JRE) included with Greenstone 3 binaries is a 32 bit Java 8 runtime. This means that //if the Windows machine that you're recompiling the binary with the source component on is not 32 bit Java 8 too//, then you will need to do the following before compiling \\
-     <!--rename ''packages\jre'' to something else, so that when Greenstone runs after compiling, it uses your system Java rather than the old 32 bit JRE v7.--> +        * <!--rename ''packages\jre'' to something else, so that when Greenstone runs after compiling, it uses your system Java rather than the old 32 bit JRE v7.--> run ''ant distclean'' from the toplevel Greenstone installation folder, to clear all the older compile products created by compiling with 32 bit Java 7.\\ If you see a failure message about being unable to delete a file called 'cp.jar', run the following from the greenstone3 folder: ''del cp.jar admin\cp.jar lib\java\cp.jar lib\jni\cp.jar web\lib\cp.jar''. Running ''ant clean-classpath-jars'' will tell you if there are any cp.jar left that are unable to be deleted. manually from the command line for the exact file path listed. Then re-run ''ant distclean''. There are several cp.jar files in different locations of the GS3 installation, any or all of which can cause this failure message. So keep repeating the cycle of re-running ''ant distclean'' then manually running ''del'' on any cp.jar file listed in any failure message, until the ''ant distclean'' step finally succeeds (so without failure messages). This issue may be due to Windows having filelocks on the ''cp.jar'' files.         
-     run ''ant distclean'' from the toplevel Greenstone installation folder, to clear all the older compile products created by compiling with 32 bit Java 7.\\ If you see the following error message <code>     [exec] Could Not Find GS3\gs2build\common-src\src\gdbmedit\gdbmdel\*.obj +
-     [exec] Could Not Find GS3\gs2build\common-src\src\gdbmedit\gdbmdel\gdbmdel.exe +
-     [exec]     cd "GS3\gs2build\common-src" +
-     [exec]     cd src\gdbmedit\gdbmdel +
-     [exec]     "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503\bin\HostX64\x6 +
-4\nmake.exe" /f win32.mak GSDLHOME="GS3\gs2build" clean +
-     [exec]     del *.obj +
-     [exec]     del gdbmdel.exe +
-     [exec]     cd "GS3\gs2build\common-src" +
-     [exec]     cd indexers +
-     [exec]     set DEBUG=0 +
-     [exec]     set VISUAL_STUDIO_MAJORVERSION= +
-     [exec]     set ENABLE_MG=1 +
-     [exec]     set ENABLE_MGPP=1 +
-     [exec]     set ENABLE_LUCENE=1 +
-     [exec]     call winMake.bat clean +
-     [exec] GS3\gs2build\common-src\indexers\bin\*, Are you sure (Y/N)? +
->>>>     [exec] 14 was unexpected at this time. <<<<<<<<<<<<<<<<<<<< +
-     [exec] NMAKE : fatal error U1077: 'call' : return code '0xff' +
-     [exec] Stop. +
- +
-BUILD FAILED +
-GS3\build.xml:4104: exec returned: 2</code>Edit your GS3\gs2build\common-src\indexers\winMake.bat script by commenting out the following line in it<code>::if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip</code>\\ If you see a failure message about being unable to delete a file called 'cp.jar', run the following from the greenstone3 folder: ''del cp.jar admin\cp.jar lib\java\cp.jar lib\jni\cp.jar web\lib\cp.jar''. Running ''ant clean-classpath-jars'' will tell you if there are any cp.jar left that are unable to be deleted. manually from the command line for the exact file path listed. Then re-run ''ant distclean''. There are several cp.jar files in different locations of the GS3 installation, any or all of which can cause this failure message. So keep repeating the cycle of re-running ''ant distclean'' then manually running ''del'' on any cp.jar file listed in any failure message, until the ''ant distclean'' step finally succeeds (so without failure messages). This issue may be due to Windows having filelocks on the ''cp.jar'' files. +
-         +
   - Finally, you can compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.   - Finally, you can compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.
   - Grab the strawberry perl-with-cpan for Windows from https://trac.greenstone.org/browser/gs2-extensions/perl-with-cpan/trunk/strawberry-perl-5.32.1.1-MSWin32-x86-multi-thread.zip\\ and unzip it into ''gs2build/bin/windows''. Rename the unzipped folder to ''strawberry-perl'', and make sure it doesn't contain a further subfolder starting ''strawberry-perl'' (if it does, the strawberry-perl subfolder should be the one directly under ''gs2build/bin/windows'').   - Grab the strawberry perl-with-cpan for Windows from https://trac.greenstone.org/browser/gs2-extensions/perl-with-cpan/trunk/strawberry-perl-5.32.1.1-MSWin32-x86-multi-thread.zip\\ and unzip it into ''gs2build/bin/windows''. Rename the unzipped folder to ''strawberry-perl'', and make sure it doesn't contain a further subfolder starting ''strawberry-perl'' (if it does, the strawberry-perl subfolder should be the one directly under ''gs2build/bin/windows'').
Line 111: Line 86:
   - Set up the environment for compiling Greenstone by running the setupenv.bat script described above: ''setupenv.bat''. (For 64-bit Windows, make sure the script sets JAVA_HOME to a 64-bit JDK7, and adds its ''bin'' folder to the PATH, and that the script then calls ''vsvarsall.bat amd64'' of your Visual Studio. VS Version 9 has been tested to work.)   - Set up the environment for compiling Greenstone by running the setupenv.bat script described above: ''setupenv.bat''. (For 64-bit Windows, make sure the script sets JAVA_HOME to a 64-bit JDK7, and adds its ''bin'' folder to the PATH, and that the script then calls ''vsvarsall.bat amd64'' of your Visual Studio. VS Version 9 has been tested to work.)
   - Go into your Greenstone 3 installation folder, ''cd C:\path\to\Greenstone3\'', and run ''gs3-setup.bat''.   - Go into your Greenstone 3 installation folder, ''cd C:\path\to\Greenstone3\'', and run ''gs3-setup.bat''.
-  - Edit your ''GS3\gs2build\common-src\indexers\winMake.bat'' script by commenting out the following line in it by prefixing 2 colon signs (''::'') to the line<code>if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip</code>So it looks as follows, then save the script file:<code>::if %VISUAL_STUDIO_MAJORVERSION% LSS 14 set ICONVZIP=iconv-PRE-VS14.zip</code> 
   - Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.   - Now you can finally compile Greenstone 3. Still in your Greenstone installation folder, run ''ant install''.
   - It can take several minutes to compile up.   - It can take several minutes to compile up.
Line 158: Line 132:
   * [[en:developer:install_svn|SVN]]. Only needed if installing from svn, not if compiling up source component/source distribution.   * [[en:developer:install_svn|SVN]]. Only needed if installing from svn, not if compiling up source component/source distribution.
   * ANT   * ANT
-  * Java JDK. JDK 8 is the minimum version required.  \\ **WARNING:** We recommend Oracle JDK 8 over Open JDK 8 as the latter does not have all the libraries required for Greenstone 3's webswing applications. But **do not use Oracle's JDK version 1.8.0_//161//** as it is problematic: failing to compile GS3 and also failing to successfully run the [[http://wiki.greenstone.org/doku.php?id=en:release:3.09_release_notes&s[]=191#troubleshooting|solr web servlet]] in GS3 binaries. We found that Oracle's JDK versions 1.8.0_144 and **1.8.0_//191// worked** for us. +  * Java JDK. JDK 8 is the minimum version required.  \\ **WARNINGS:** We recommend Oracle JDK 8 over Open JDK 8 as the latter does not have all the libraries required for Greenstone 3's webswing applications. But **do not use Oracle's JDK version 1.8.0_//161//** as it is problematic: failing to compile GS3 and also failing to successfully run the [[http://wiki.greenstone.org/doku.php?id=en:release:3.09_release_notes&s[]=191#troubleshooting|solr web servlet]] in GS3 binaries. We found that Oracle's JDK versions 1.8.0_144 and **1.8.0_//191// worked** for us. 
   * C/C++ compiler: XCode on Mac, gcc/g++ on Linux   * C/C++ compiler: XCode on Mac, gcc/g++ on Linux
  
Line 170: Line 144:
 </code> </code>
   - The Java Runtime (JRE) included in binaries from Greenstone 3.07 onward is version 7 and version 8 for Greenstone 3.11 onward. 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 and version 8 for Greenstone 3.11 onward. 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.-->run ''ant distclean'' from the toplevel Greenstone installation folder, to clear all the older compile products that were compiled with Java 7.<!--* you may also want to want to delete ''gli/jar'' and ''gli/classes/org'', if they exist, to clear up GLI before recompiling.-->
-     run ''ant distclean'' from the toplevel Greenstone installation folder, to clear all the older compile products that were compiled with Java 7. +
-     <!--* you may also want to want to delete ''gli/jar'' and ''gli/classes/org'', if they exist, to clear up GLI before recompiling.-->+
   - Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compilation fails with an error message about ''wvware'', then it means you need the gnome-lib extension. \\ Rename or move away any existing gnome-lib or gnome-lib minimal in your Greenstone 3 installed folder's ''gs2build/ext'' folder. \\ Next can grab a fresh gnome-lib-minimal package by visiting http://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk, selecting the link to the ''gnome-lib-minimal'' version for your operating system and architecture, then click on the download link on the subsequent page. Download it into your Greenstone 3's ''gs2build/ext'' folder.   - Most of the linux and mac machines we tested require the gnome-lib extension. Without it, if compilation fails with an error message about ''wvware'', then it means you need the gnome-lib extension. \\ Rename or move away any existing gnome-lib or gnome-lib minimal in your Greenstone 3 installed folder's ''gs2build/ext'' folder. \\ Next can grab a fresh gnome-lib-minimal package by visiting http://trac.greenstone.org/browser/gs2-extensions/gnome-lib/trunk, selecting the link to the ''gnome-lib-minimal'' version for your operating system and architecture, then click on the download link on the subsequent page. Download it into your Greenstone 3's ''gs2build/ext'' folder.
   - Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ <code>   - Use the terminal to extract the downloaded gnome-lib-minimal extension and set up the gnome-lib environment for compiling as follows:\\ <code>
Line 196: Line 168:
  
 ==== Source Distribution ==== ==== Source Distribution ====
 +You need a JDK8. We recommend Oracle's JDK 8 over Open JDK8 as the latter lacks libraries used by Greenstone's webswing applications. But **do not use Oracle's JDK version 1.8.0_//161//** as it causes compile issues. 
 +  * Furthermore, if you're on a 64 bit machine you need a JDK for 64 bit machines, if you're on a 32 bit machine, you will need a JDK for 32 bit machines. 
  
 In the terminal: In the terminal:
-  * Make sure JAVA_HOME is set (to JDK 7 for Greenstone 3.06, JDK 8 from Greenstone 3.11 onwards) and that its ''bin'' folder is added to the PATH. If you're on a 64 bit machine you need a JDK for 64 bit machines, if you're on a 32 bit machine, you will need a JDK for 32 bit machines. \\ Also set ANT_HOME to an ant installation and add its ''bin'' folder to the PATH. \\ To set these, you can find out where java is installed on your Unix system by first running ''where java''. Doing so should display a system location. Then run ''ls -la <java-location>'' using that location value. If the result of this ''ls'' operation shows that the location is a symlink, run ''ls -la <symlink>'' on the symlink, until all symlinks are exhausted and you get to an actual location on the file system. Having found the actual location of java, you don't want the ''bin'' directory, but its containing folder. Set this as JAVA_HOME. Locate and set ANT_HOME in similar manner. \\ On a Mac, you may have to run ''/usr/libexec/java_home'' in a terminal. The result will be JAVA_HOME. +  * You can find out where java is installed on your Unix system by first running ''where java''. Doing so should display a system location. Then run ''ls -la <java-location>'' using that location value. If the result of this ''ls'' operation shows that the location is a symlink, run ''ls -la <symlink>'' on the symlink, until all symlinks are exhausted and you get to an actual location on the file system. Having found the actual location of java, you don't want the ''bin'' directory, but its containing folder. Set this as JAVA_HOME. Locate and set ANT_HOME in similar manner. \\ On a **Mac**, you may have to run ''/usr/libexec/java_home'' in a terminal. The result will be JAVA_HOME. 
   * Add svn/bin to PATH   * Add svn/bin to PATH
   * Add JAVA_HOME/bin to PATH   * Add JAVA_HOME/bin to PATH
en/user_advanced/installation_312.1752815122.txt.gz · Last modified: 2025/07/18 05:05 by anupama