Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-1576

Perl modules should work in a Perl API job



    • Fix
    • Status: Known Issue (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • None


      Current Situation

      • The JobScheduler setup for Linux contains a libsosperlscript.5.18.2.so which is required for Perl api jobs.
      • This library is compiled with threaded Perl 5.18.2
      • The JobScheduler api works but other Perl modules raise errors.
      • The following behavior results with different Perl versions. 5.18.2, 5.18.4, 5.22.1 and 5.23.6 are used for testing.
        • If you use the Perl Encode module then you get
          [Can't load '/.../x86_64-linux-5.18.2-thread-multi/auto/Encode.so' for module Encode: /.../x86_64-linux-5.18.2-thread-multi/auto/Encode.so: undefined symbol: PL_thr_key at /.../XSLoader.pm line 68.

          The PL_thr_key error comes from a module compiled against threaded Perl while the Perl installation is not threaded but in this case the Perl installation was threaded too.

        • If you use the Perl Cwd module then you get
          symbol lookup error: /.../5.18.2/x86_64-linux-thread-multi/auto/Cwd/Cwd.so: undefined symbol: Perl_xs_apiversion_bootcheck
        • The Perl Cwd module works astonishingly with a non threaded Perl.

      Desired Behavior

      • Perl modules should work at least in the version of libsosperlscript.so in Perl api jobs if they work on the shell. That means for example if the Perl script
        #! /usr/bin/perl
        use strict;
        require Cwd;
        require Encode;
        print "cwd: ".Cwd->getcwd."\n";
        my $str = Encode::encode("utf8", "abc");
        print "$str\n";

        works then the same should work in a job

        <job >
            <script  language="perlScript">
        use strict;
        sub spooler_process {
            my $rc = 0;	
            $spooler_log->info($spooler_job->name . " is running");
            require Cwd;
            $spooler_log->info("cwd : " . Cwd->getcwd);
            require Encode;
            my $str = Encode::encode("utf8", "abc");   
            $spooler_log->info("encode str : " . $str);
            return $rc;
            <run_time />

      Maintainer Notes

      • Users who want to run Perl jobs with access to the JobScheduler API and want to include individual Perl modules should compile libsosperlscript.so individually for their system in order to guarantee
        • compatibility of the library with the Perl version in use
        • use of the same JDK/JVM that are used at compile-time and at run-time.
      • Consider the build instructions from the article How to build the build the library libsosperlscript.so for Unix environments


        Issue Links



              oh Oliver Haufe
              oh Oliver Haufe
              0 Vote for this issue
              2 Start watching this issue



                Time Tracking

                  Original Estimate - 3 days
                  Remaining Estimate - 3 days
                  Time Spent - Not Specified
                  Not Specified