Job Composer: OodApp::SetupScriptFailed: cannot open shared object file

After upgrading from 3.1 to 4.0 I’m receiving this error when attempting to launch the job composer:

Exception: OodApp::SetupScriptFailed

LoadError: libffi.so.6: cannot open shared object file: No such file or directory - /opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/extensions/x86_64-linux/3.3.0/ffi-1.16.3/ffi_c.so (LoadError)
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/ffi-1.16.3/lib/ffi.rb:5:in `rescue in <top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/ffi-1.16.3/lib/ffi.rb:2:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/pbs-2.2.1/lib/pbs/torque.rb:1:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/pbs-2.2.1/lib/pbs.rb:3:in `require_relative'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/pbs-2.2.1/lib/pbs.rb:3:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/osc-machete-2.0.0/lib/osc/machete/torque_helper.rb:1:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/osc-machete-2.0.0/lib/osc/machete.rb:8:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/osc_machete_rails-2.1.2/lib/osc_machete_rails.rb:1:in `<top (required)>'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:55:in `each'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:55:in `block in require'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:44:in `each'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:44:in `require'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler.rb:212:in `require'
/var/www/ood/apps/sys/myjobs/config/application.rb:21:in `<top (required)>'
/var/www/ood/apps/sys/myjobs/Rakefile:4:in `<top (required)>'

Caused by:
LoadError: cannot load such file -- 3.3/ffi_c (LoadError)
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/ffi-1.16.3/lib/ffi.rb:3:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/pbs-2.2.1/lib/pbs/torque.rb:1:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/pbs-2.2.1/lib/pbs.rb:3:in `require_relative'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/pbs-2.2.1/lib/pbs.rb:3:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/osc-machete-2.0.0/lib/osc/machete/torque_helper.rb:1:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/osc-machete-2.0.0/lib/osc/machete.rb:8:in `<top (required)>'
/opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/gems/osc_machete_rails-2.1.2/lib/osc_machete_rails.rb:1:in `<top (required)>'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:37:in `require'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:55:in `each'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:55:in `block in require'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:44:in `each'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler/runtime.rb:44:in `require'
/usr/share/gems/gems/bundler-2.5.16/lib/bundler.rb:212:in `require'
/var/www/ood/apps/sys/myjobs/config/application.rb:21:in `<top (required)>'
/var/www/ood/apps/sys/myjobs/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
'RAILS_ENV=production bin/rake db:setup' failed with output: 

The error states ‘No such file or directory’, but I can see that the file does exist at that location:

[root@master ~]# ls -la /opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/extensions/x86_64-linux/3.3.0/ffi-1.16.3/ffi_c.so
-rwxr-xr-x 1 root root 245200 Dec 30 11:42 /opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/extensions/x86_64-linux/3.3.0/ffi-1.16.3/ffi_c.so

Any help getting past this error is appreciated. Thanks!

I’ve resolved the issue.

ldd /opt/ood/ondemand/root/usr/share/gems/3.3/ondemand/4.0.0-1/extensions/x86_64-linux/3.3.0/ffi-1.16.3/ffi_c.so

revealed that libffi.so.6 => not found. I’m running OOD on Rocky Linux 9, which had libffi 3.4 installed. Installing the package ‘libffi3.1’ installed the necessary library and ldd doesn’t report any ‘not found’ libraries.

The Job Composer is now loading without issue.

2 Likes