easybuilders / easybuild-easyconfigs

A collection of easyconfig files that describe which software to build using which build options with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
380 stars 701 forks source link

2 different version of Compress::Zlib in Perl/5.34.1-GCCcore-11.3.0 #19854

Open hajgato opened 8 months ago

hajgato commented 8 months ago

User got an error using Trinity/2.15.1

BEGIN failed--compilation aborted at /apps/gent/RHEL8/zen2-ib/software/Perl/5.34.1-GCCcore-11.3.0/lib/perl5/site_perl/5.34.1/IO/Uncompress/RawInflate.pm line 8.
Compilation failed in require at /apps/gent/RHEL8/zen2-ib/software/Perl/5.34.1-GCCcore-11.3.0/lib/perl5/site_perl/5.34.1/IO/Uncompress/Gunzip.pm line 12.
BEGIN failed--compilation aborted at /apps/gent/RHEL8/zen2-ib/software/Perl/5.34.1-GCCcore-11.3.0/lib/perl5/site_perl/5.34.1/IO/Uncompress/Gunzip.pm line 12.
Compilation failed in require at /kyukon/home/apps/RHEL8/zen2-ib/software/Trinity/2.15.1-foss-2022a/trinityrnaseq-v2.15.1/util/..//util/support_scripts//fastQ_to_fastA.pl line 9.
BEGIN failed--compilation aborted at /kyukon/home/apps/RHEL8/zen2-ib/software/Trinity/2.15.1-foss-2022a/trinityrnaseq-v2.15.1/util/..//util/support_scripts//fastQ_to_fastA.pl line 9.

Then I have checked, we do have 2 different version of Compress::Zip:

[vsc43020@gligar08 ~]$ echo $EBROOTPERL
/apps/gent/RHEL8/zen2-ib/software/Perl/5.34.1-GCCcore-11.3.0
[vsc43020@gligar08 ~]$ diff $EBROOTPERL/lib64/perl5/{,site_perl/}5.34.1/Compress/Zlib.pm
10,13c10,13
< use IO::Compress::Base::Common 2.101 ;
< use Compress::Raw::Zlib 2.101 ;
< use IO::Compress::Gzip 2.101 ;
< use IO::Uncompress::Gunzip 2.101 ;
---
> use IO::Compress::Base::Common 2.106 ;
> use Compress::Raw::Zlib 2.103 ;
> use IO::Compress::Gzip 2.106 ;
> use IO::Uncompress::Gunzip 2.106 ;
20c20
< $VERSION = '2.102';
---
> $VERSION = '2.106';
464c464
< use IO::Compress::Gzip::Constants 2.101 ;
---
> use IO::Compress::Gzip::Constants 2.106 ;
1487,1489c1487,1489
< L<http://www.faqs.org/rfcs/rfc1950.html>,
< L<http://www.faqs.org/rfcs/rfc1951.html> and
< L<http://www.faqs.org/rfcs/rfc1952.html>
---
> L<https://datatracker.ietf.org/doc/html/rfc1950>,
> L<https://datatracker.ietf.org/doc/html/rfc1951> and
> L<https://datatracker.ietf.org/doc/html/rfc1952>
1509c1509
< Copyright (c) 1995-2021 Paul Marquess. All rights reserved.
---
> Copyright (c) 1995-2022 Paul Marquess. All rights reserved.

We probably installed new modules in Perl, not sure if this and how caused the problem.

Micket commented 7 months ago

I don't have this duplicate, I only have $EBROOTPERL/lib64/perl5/5.34.1/Compress/Zlib.pm Do you still see this with a fresh build of Perl/5.34.1? If not, then I would assume some other easyconfig (or maybe a clumsy sysadmin) have installed it by mistake into the Perl installation dir. The read-only installdir could help protect against this, but after the fact like this it would be very hard to figure out what added this file. If you feel like investigating and suspect an easyconfig being behind this, I would suggest checking the timestamps on the files and trying to correlate with other installs, or grep through the easybuild logs for anything mentioning Zlib.pm or Compress/Zlib

mmterpstra commented 7 months ago

Same problem here also affects Compress::Zlib and thus depending modules (in my case PDF::API2).

ml purge ;(ml Perl/5.34.1-GCCcore-11.3.0  && ls $EBROOTPERL/lib64/perl5/{,site_perl/}5.34.1/Compress/Zlib.pm && perl -MCompress::Zlib -e 1 )
The following modules were not unloaded:
  (Use "module --force purge" to unload all):

  1) 2023.01   2) StdEnv
/path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/5.34.1/Compress/Zlib.pm  /path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/site_perl/5.34.1/Compress/Zlib.pm
Compress::Raw::Zlib version 2.103 required--this is only version 2.101 at /path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib/perl5/site_perl/5.34.1/Compress/Zlib.pm line 11.
BEGIN failed--compilation aborted at /path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib/perl5/site_perl/5.34.1/Compress/Zlib.pm line 11.
Compilation failed in require.
BEGIN failed--compilation aborted.
Micket commented 7 months ago

Again, I can not reproduce this. I only see

/path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/5.34.1/Compress/Zlib.pm

and not the "site_perl/5.34.1" variant.

My earlier comment stands regarding the questions I posed there + my comments on read-only install dirs and something potentially having installed this extra (maybe detectable via datestamps on the respective files).

branfosj commented 7 months ago

@hajgato and @mmterpstra has your Perl-5.34.1-GCCcore-11.3.0.eb been rebuilt since #18789?

I'm seeing this in an old build but not in a new one. The most likely looking change between the two builds is the removal of

    ('IO::Compress::Bzip2', '2.106', {
        'source_tmpl': 'IO-Compress-%(version)s.tar.gz',
        'source_urls': ['https://cpan.metacpan.org/authors/id/P/PM/PMQS'],
        'checksums': ['cb9a26ec7d86afb3081b6369620f1f67eaa45b7c41c4eb800e1da5e700a3e3f5'],
    }),
mmterpstra commented 7 months ago

I'm working on it for installing miRDeep2 it can be fixed with patching the depending perl executable files to prefer the site path (I need this for now because I'm not a main eb admin so cursed code incoming ):

install_cmd += "sed -i 's@#!/usr/bin/env perl@#!/usr/bin/env perl\\nBEGIN {unshift \@INC, \"'$EBROOTPERL'/lib64/perl5/5.34.1/\";}\\n@' %(installdir)s/bin/*.pl && "

for the IO::Compress::Bzip2 could be it (seems like it although no expert) :

(ml Perl/5.34.1-GCCcore-11.3.0 && ls $EBROOTPERL/lib64/perl5/{,site_perl/}5.34.1/Compress/Zlib.pm -alh && grep ^\$VERSION\ \=\ \'  $EBROOTPERL/lib64/perl5/{,site_perl/}5.34.1/Compress/Zlib.pm&&  ls -alh   $EBROOTPERL/lib64/perl5/{,site_perl/}5.34.1/IO/Compress/Bzip2.pm; grep ^\$VERSION\ \=\ \'  $EBROOTPERL/lib64/perl5/{,site_perl/}5.34.1/IO/Compress/Bzip2.pm) 
-r--r--r--. 1 cvmfs cvmfs 43K Jan 25  2023 /path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/5.34.1/Compress/Zlib.pm
-r--r--r--. 1 cvmfs cvmfs 43K Apr 12  2022 /path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/site_perl/5.34.1/Compress/Zlib.pm
/path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/5.34.1/Compress/Zlib.pm:$VERSION = '2.102';
/path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/site_perl/5.34.1/Compress/Zlib.pm:$VERSION = '2.106';
-r--r--r--. 1 cvmfs cvmfs 21K Jan 25  2023 /path/to/software/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/5.34.1/IO/Compress/Bzip2.pm
-r--r--r--. 1 cvmfs cvmfs 21K Apr 12  2022 /path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/site_perl/5.34.1/IO/Compress/Bzip2.pm
/path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/5.34.1/IO/Compress/Bzip2.pm:$VERSION = '2.102';
/path/to/software/Perl/5.34.1-GCCcore-11.3.0/lib64/perl5/site_perl/5.34.1/IO/Compress/Bzip2.pm:$VERSION = '2.106';

Edit: Thanks for finding the solution @branfosj

Neves-P commented 7 months ago

Just chiming in to echo what @mmterpstra's says and confirm that your solution, @branfosj, fixed the issue. I'm with the HPC team at the same site and I can confirm that the Perl versions we have installed and had this issue were installed before #18789 was merged. I rebuilt Perl with the updated easyconfigs and redeployed them to our software stack and the issue was solved.

Thank you all for looking into it!