Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Scope

  • The libsosperlscript.so library is included with the JobScheduler setup and acts as an interface to a local Perl installation should Perl API Jobs be used.

    • This library is used exclusively for job scripts of type <script language="perlscript">, i.e. for jobs that make use of the JobScheduler API. 
    • This library is not required for Perl scripts that can be executed from the command line independently of a JobScheduler instance.
    • The library in the JobScheduler setup only works if you use the JobScheduler API without additional Perl modules. See also
      Jira
      serverSOS JIRA
      serverId6dc67751-9d67-34cd-985b-194a8cdc9602
      keyJS-1576
  • This article explains how to build the libsosperlscript.so library for Unix environments.
    • Jira
      serverSOS JIRA
      columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
      serverId6dc67751-9d67-34cd-985b-194a8cdc9602
      keyJS-1614

Prerequisites

  • The JobScheduler
  • This documentation explains how to download and compile the sources for the JobScheduler Engine and all its components. 
    In case that you wanted to build exclusively YADE, see How to build YADE from the sources.
  • The sources have to be downloaded from the SOS Git repositories. JobScheduler is The sources are available from https://github.com/sos-berlin
  • Additional tools will be referenced in this documentation if required to compile the sources.

Prerequisites

As mentioned above, additional tools have
  • tools have to be downloaded and configured following the below
order:
  • sequence of steps.

Git

  • You can find the Git download and documentation here.
  • SOS uses Git 1.87.41. You can download the latest release from here.

Anchor
java
java
Java

  • To compile individual JobScheduler releases, different Java versions are required:
    • SOS uses the 1.7.0.76 build of the Java JDK to build JobScheduler releases before 1.9.0.
    • SOS uses the 1.8.0.31 build of the Java JDK to build JobScheduler release 1.9.0 and above.
  • To compile for different target platforms (64-bit or 32-bit systems), the corresponding JDK versions are required:
    • To build the engine for a 64-bit system, the corresponding 64-bit version of JDK has to be used for compiling. Analogously for 32-bit compilation. 
    • The JDK version in use will define the correct C++ compiler properties. For example, if you are using a 64-bit JDK, even using Visual Studio Express (32-bit), a 64-bit JobScheduler version would be compiled.
  • To compile the scheduler-engine for the correct target platform:
    • check if the system variable %JAVA_HOME% is set to the installation path of you JDK installation.
    • check if %JAVA_HOME%\bin is in your %PATH% global variable.

Maven

  • You can find the Maven documentation here.
  • SOS uses Maven 3.2.1. You can download the latest Release from here.
  • Maven's /bin folder has to be added to the global variable "PATH" in order to take effect.
  • No further configuration is required for Maven in order to compile. If further configuration is wanted, for example to receive certain 3rd Party libraries from an official Maven2 repository, e.g. http://repo1.maven.org/maven2, then you have to configure the settings.xml file.

Perl (for Linux platforms)

JDK

  • The path to your Java JDK is required for the compilation
  • SOS uses the path /usr/java/jdk1.8.0_31

Perl
  • Version: Perl 5.10 or abovePerl 5.10 or above (SOS uses Perl 5.18).
  • You can find the downloads here.
  • No further configuration is required for Perl. 

Strawberry Perl (for Windows platforms)

  • Find the download here.
  • Strawberry Perls'

     

    /bin folder has to be added to the global variable "PATH" in order to take effect.
  • Consider the comprehensive guide for Strawberry Perl in http://wiht.link/perl-resources
  • AnchorcygwincygwinCygwin (for Windows platforms)
    • Find the download here.
    • Cygwins' /bin folder has to be added to the global variable "PATH" in order to take effect.
    • No further configuration is required for Cygwin. As well as for the JDK, to build the engine for a 64-bit system, the corresponding 64-bit version of Cygwin has to be used. Analogously for 32-bit compilation.

     

    Anchor
    cpp-compiler
    cpp-compiler
    C++ Compiler

    • Set up a development environment for Linux and Windows.
    • For Windows it is recomended to use Visual Studio, which brings a C++ compiler. Find the download here.
    • For Linux you need the following packagesUnix. The following packages are required:
      • gcc - GNU Compiler, starting with version 4.1.3
      • zlib-devel
      • binutils (version corresponding to gcc)
    • SOS uses Visual Studio Express 2010 for Windows platforms gcc 4.4.6

    Download from the

    Source

    Repositories

    Prepare a folder in your file system where you can to clone the repositories to.

    Repository for the JobScheduler Engine

    Documentation

    Execute the following command in your Git your Git Shell:

    Code Block
    languagebash
    git clone git@githubhttps://github.com:/sos-berlin/scheduler-engine-doc.git

    to download the project "scheduler-engine-doc" into the folder or use a tool like, e.g. GitExtensions (for Windows).

    Repository for

    Compile the

    JobScheduler Engine

    Library

    Execute the following command in your Git Shell:

    Code Block
    languagebash
    git clone git@github.com:sos-berlin/scheduler-engine.git

    to download the project "scheduler-engine".

    Repositories for the JobScheduler Components (JID, JOE, JITL, YADE)

    Execute the following command in your Git ShellOnce the folder scheduler-engine is created (from cloning the repositories), change the working directory to scheduler-engine/engine-kernelcpp and create a folder LINKS:

    Code Block
    languagebash
    gitcd clone scheduler--recursive git@github.com:sos-berlin/all.git

    to download the aggregator project "all" and its submodules.

    Info
    titleHint
    After you download the project "all" and all its submodules, the submodules are in a state called "detached Head", which means that references to the submodules point to a commit, which is not the latest in the current branch. To make sure to point to the latest commit of the current branch execute the following commands in your Git Shell
    engine/engine-kernelcpp
    mkdir LINKS

    Switch to the folder LINKS and create a symbolic link to your Perl installation as follows:

    Code Block
    languagebash
    git
    cd 
    checkout
    LINKS
    ln -
    B master
    s 
    origin/master git submodule foreach "git checkout -B master origin/master"

    in which master is the name of the local branch and origin/master is the name of the remote branch with the latest development version of the components. Other available branches are e.g. release/1.9release/1.8release/1.7.

    Tip
    titleDownloading a released version

    To be able to build an already released version, like the maintainance release 1.9.2, you have to check out the tag like that:

    Code Block
    languagebash
    git checkout --branch v1.9.2
    git submodule foreach "git checkout --branch v1.9.2"

     

    Building the Projects

    Preparation

    Before you can start to build the projects you have to make sure that some required libraries are available for the build, which are not available from official public Maven repositories.

    You can download the jar files and have to publish them to your local Maven repository in order to make these libraries available for the build.

    The libraries to download are:

    To publish these libraries to your local Maven repository ( %USERPROFILE%\.m2\ or $HOME/.m2/) use the goal install-file from the maven-install-plugin.

    Command for ojdbc6:

    Code Block
    languagetext
    mvn org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.1.0.7.0-Production -Dpackaging=jar -Dfile=<path-to-the-downloaded-library>/ojdbc6.jar -DlocalRepositoryPath=<path-to-your-local-maven-repository>

    Command for webdavclient4j-core:

    Code Block
    languagetext
    mvn org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file -DgroupId=webdavclient4j -DartifactId=webdavclient4j-core -Dversion=0.92 -Dpackaging=jar -Dfile=<path-to-the-downloaded-library>/webdavclient4j-core-0.92.jar -DlocalRepositoryPath=<path-to-your-local-maven-repository>

    Command for hostware:

    Code Block
    languagetext
    mvn org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file -DgroupId=sos -DartifactId=hostware -Dversion=1.0.0 -Dpackaging=jar -Dfile=<path-to-the-downloaded-library>/hostware-1.0.0.jar -DlocalRepositoryPath=<path-to-your-local-maven-repository>

    The values for groupId, artifactId and version parameters in the above examples are those that are already defined in the build configuration. When publishing the libraries with these values, the libraries will be found in your local Maven repository and can be used without modifying the configuration.

    Build order

    Since the projects depend on each other, you have to make sure that the projects are built in the proper order:

    1. scheduler-engine-doc
    2. scheduler-engine
    3. all

    Compile the JobScheduler Engine Documentation

    Switch to the folder you have downloaded the scheduler-engine-doc project into, which might look like C:\MY_GIT_REPOS\scheduler-engine-doc\ or /home/MY_ACCOUNT/MY_GIT_REPOS/scheduler-engine-doc/

    Type mvn clean install on the command line for building the project including all internal tests - these are tests developed by SOS that check the functionalities of the compiled sources. If these tests are not relevant for you, compile it the following way: mvn clean install -DskipTests.

    Decide the platform to build for

    For the two compilations below it is required to indicate a profile to build the sources for the desired platform:

    • Windows
      • For x64 versions, add the following profile to the Maven commands below: -Pwindows-x64
      • For x86 versions, add the following profile to the Maven commands below: -Pwindows-x86
    • Unix
      • For x64 versions, add the following profile to the Maven commands below: -Plinux-x64
      • For x86 versions, add the following profile to the Maven commands below: -Plinux-x86

    Compile the JobScheduler Engine

    Switch to the folder you have downloaded the scheduler-engine project to, which might look like C:\MY_GIT_REPOS\scheduler-engine\ or /home/MY_ACCOUNT/MY_GIT_REPOS/scheduler-engine/

    Type mvn clean install on the command line for building the project including all internal tests - these are tests developed by SOS that check the functionalities of the compiled sources. If these tests are not relevant for you, compile it the following way: mvn clean install -DskipTests.

    Compile all JobScheduler Components (JID, JOE, JITL, YADE)

    Switch to the folder you downloaded the all project to, which might look like C:\MY_GIT_REPOS\all\ or /home/MY_ACCOUNT/MY_GIT_REPOS/all/

    Type mvn clean install on the command line for building the project including all internal tests - these are tests developed by SOS that check the functionalities of the compiled sources. If these tests are not relevant for you, compile it the following way: mvn clean install -DskipTests.

    Anchor
    /usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi perl
    Note

    If you are not using multithreading for Perl (or the multithreading links to another folder) you might have to use a shorter path, something like /usr/lib64/perl5

    In order to compile the last step is to call the makefile make-libsosperlscript:

    Code Block
    languagebash
    JAVA_HOME=<path_to_java_jdk> make/make-libsosperlscript
    compile-jadecompile-jade
    Tip
    titleCompile YADE

    In case you just wanted to compile YADE but not JobScheduler, then switch to the folder that you downloaded the all/jade project to, which might look like C:\MY_GIT_REPOS\all\jade or /home/MY_ACCOUNT/MY_GIT_REPOS/all/jade

    Type mvn clean install on the command line for building the project including all internal tests - these are tests developed by SOS that check the functionalities of the compiled sources. If these tests are not relevant for you, compile it the following way: mvn clean install -DskipTests.

    Note

    You have to compile all three projects at least once before you can compile YADE on its own. This is required for the YADE build to be able to resolve its dependencies from your local maven repository.

    Generated libraries location

    After the build has completed you find all created .jar files in

    1. the target folder under each project and subproject.
    2. the local ./m2 repository in your home folder (%USERPROFILE%\.m2\repository\com\sos-berlin or $HOME/.m2/repository/com/sos-berlin)

    At this point you already have all the library files to update an exisiting JobScheduler installation in your system.

    You can find the specific libraries for the different platform in the target folder of the engine-setup:

    1. Windows-x64 in .\scheduler-engine\engine-setup\target\setup\scheduler.windows-x64\bin
        • jobscheduler-engine.dll
        • scheduler.exe
    2. Windows-x86 in .\scheduler-engine\engine-setup\target\setup\scheduler.windows-x86\bin
        • spidermonkey.dll
        • scheduler.exe
    3. Linux-x64 in 
      1. ./scheduler-engine/engine-setup/target/setup/scheduler.linux-x64/bin
        • scheduler
        • setuid
      2. ./scheduler-engine/engine-setup/target/setup/scheduler.linux-x64/lib
    4. Linux-x86 in 
      1. ./scheduler-engine/engine-setup/target/setup/scheduler.linux-x86/bin
        • javavscript
        • scheduler
        • setuid
      2. ./scheduler-engine/engine-setup/target/setup/scheduler.linux-x86/lib

    Support 

    Commercial License

    If you purchased a Commercial License with the Service Request Support Option, then the build process will be supported assisted by our Support Team should you face any problems. The applicable service level is the same as for severity level "minor", see Product Maintenance.

    Open Source License

    If you use the Open Source License then the build process will be supported by using our Community Resources. A forum for build issues is available at SourceForge, see https://sourceforge.net/p/jobscheduler/discussion/bp/Buiild Process Forum

    Note
    Note: no service levels are guaranteed including response times and resolution times.

    Troubleshooting

    Error: "

    cannot run program bash

    z_com.h:10:17: error: jni.h: No such file or directory"

    Expand

    This error occurs when building on a Windows system where Cygwin is not available. The error log states "cannot run program bash" which is a Linux shell command and has to be executed by Cygwin when running on a Windows system. Please see cygwin explanations for resolving this problem.

    Error: "MSB4019: Das importierte Projekt "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Default.props" was not found

    the path in the variable JAVA_HOME used for the compilation of the library does not match the path to your Java JDK. SOS uses the path:

    usr/java/jdk1.8.0_31

    Error: "make: *** No rule to make target '.../LINKS/perl/CORE/EXTERN.h', needed by `perl.o'.  Stop."

    Expand

    This error occurs when a the symbolic link in the folder LINKS is not set correctly. If you are not using multithreading for Perl (or the multithreading links to a different folder) you might have to use a shorter path, something like /usr/lib64/perl5

     

    Installation

     

    Warning

    The Perl and the Java JDK 32-bit is installed on a 64-bit system, or when the global variable "JAVA_HOME" is either not set or not properly set. Please see Java explanations for resolving this problem.

    Error: "File zlib-xxx was not found"

    Expand

    This error occurs when zlib-devel is not installed (Linux machine). Please see C++ compiler explanations for resolving this problem.

     

    version at run-time have to be the same as used at compile-time of libsosperlscript.so.

    Please note that you get a segmentation fault in the Perl API job if you use ...

    • a different Perl version at run-time as at compile-time.
    • openJDK at run-time and an Oracle JDK at compile-time.
    • Oracle JRE at run-time and an openSDK at compile-time.

     

    • Copy the libsosperlscript.so into the ./lib directory of the JobScheduler installation.
    • Create a symlink in the ./lib directory which points to the libperl.so of the Perl installation

      Code Block
      ln -s /usr/lib64/perl5/<Perl version>/x86_64-linux-thread-multi/CORE/libperl.so libperl.so

      See also How to program the JobScheduler API in Perl

    • Set the PERL5LIB environment variable if you get the following error in the Perl API job

      Code Block
      COM-80020009  DISP_E_EXCEPTION [begin] [] [PERL-2   [[perl_parse()  Can't locate strict.pm in @INC (you may need to install the strict module)

      The article How to program the JobScheduler API in Perl describes how to set the PERL5LIB environment variable. A JobScheduler restart is required.

    • Please delete the files
      • ./lib/libstdc++.so.6.0.8
      • ./lib/libstdc++.so.6
      • ./lib/libgcc_s.so.1
      • ./lib/libgcc_s.so

      in the JobScheduler installation if you get the following error in the Perl API job

      Code Block
      dlopen("libsosperlscript.so"): /opt/sos-berlin.com/jobscheduler/jobscheduler.1.10_4110/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found

      A JobScheduler restart is required.
      See also

      Jira
      serverSOS JIRA
      serverId6dc67751-9d67-34cd-985b-194a8cdc9602
      keyJS-980