eprintsug / EPrintsArchivematica

Digital Preservation through EPrints-Archivematica Integration - An EPrints export plugin to Archivematica
6 stars 1 forks source link

3.4+ JSON perl module #29

Closed geo-mac closed 3 years ago

geo-mac commented 3 years ago

I am in the process of replicating our work with this excellent plugin (undertaken within 3.3.13) in 3.4.2, following a recent upgrade. Installation is fine but, when running process_transfers, it is clear that the Perl module JSON doesn't exist in 3.4+ -- or at least PP does not exist as a .pm file in 3.4+. As it is referenced in EPrint.pm, this causes the job to fail as per...

/opt/eprints3/archives/test/bin/process_transfers test --verbose
[...]
Problem loading plugin EPrints::Plugin::Export::Archivematica::EPrint [/opt/eprints3/lib/plugins/EPrints/Plugin/Export/Archivematica/EPrint.pm]:
Can't locate JSON/PP.pm in @INC (@INC contains: /opt/eprints3/ingredients/xapian_facets/plugins /opt/eprints3/ingredients/irstats2.5/plugins /opt/eprints3/ingredients/strath/plugins /opt/eprints3/ingredients/bazaar/plugins /opt/eprints3/ /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /opt/eprints3/lib/plugins/EPrints/Plugin/Export/Archivematica/EPrint.pm line 14.
BEGIN failed--compilation aborted at /opt/eprints3/lib/plugins/EPrints/Plugin/Export/Archivematica/EPrint.pm line 14.
Compilation failed in require at (eval 503) line 1.
BEGIN failed--compilation aborted at (eval 503) line 1.

There has been some re-engineering within perl_lib for 3.4+ -- and I'm still getting to know what is where!! -- so it isn't immediately obvious to me what or where the 3.4 cognate of PP.pm is. Will update this issue if I find it but wondering if anyone watching the repo might know...?

geo-mac commented 3 years ago

I can confirm that this problem has been solved. It was an issue with perl JSON, which had erroneously installed to /root/perl5 (which seems to be a common installation issue according to fora and @jb4.) We created a symlink of the files to the correct location being called by process_transfers and this seemed to solve the issue.

photomedia commented 3 years ago

I am not closing this yet, because I want to make sure that the need for a symlink is not caused by the plugin code?

jb4 commented 3 years ago

This was unrelated to the plugin, it relates to the odd way in which cpan sets itself up on CentOS7 (and likely other places).

photomedia commented 3 years ago

Thank you! Closing this now.