Details
-
Fix
-
Status: Known Issue (View Workflow)
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
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.
- If you use the Perl Encode module then you get
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"> <![CDATA[ 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; } ]]> </script> <run_time /> </job>
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