[Debichem-devel] Bug#810017: pis4: FTBFS with perl 5.22

gregor herrmann gregoa at debian.org
Wed Jan 6 01:00:11 UTC 2016


Control: tag -1 + confirmed patch upstream
Control: severity -1 serious
# it's a FTBFS

On Tue, 05 Jan 2016 18:27:31 +0200, Graham Inggs wrote:

> Source: psi4
> Version: 1:0.3-4
> Severity: important
> 
> After upgrading to perl 5.22, psi4 FTBFS with the following message:
> 
> [100%] Autodoc options c-side
> cd /build/psi4-0.3/builddir/doc/sphinxman && /usr/bin/cmake -E
> make_directory source/autodir_options_c
> cd /build/psi4-0.3/builddir/doc/sphinxman && /usr/bin/perl
> /build/psi4-0.3/doc/sphinxman/document_options_c.pl
> /build/psi4-0.3/doc/sphinxman
> Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)
> at /build/psi4-0.3/doc/sphinxman/document_options_c.pl line 150.
> doc/sphinxman/CMakeFiles/sphinxman.dir/build.make:106: recipe for
> target 'doc/sphinxman/source/autodoc_abbr_options_c.rst' failed
> make[5]: *** [doc/sphinxman/source/autodoc_abbr_options_c.rst] Error 255
> make[5]: Leaving directory '/build/psi4-0.3/builddir'
> 
> 
> I know nothing about perl, so I tried the suggestion and omitted defined():
> 
> 
> --- a/doc/sphinxman/document_options_c.pl
> +++ b/doc/sphinxman/document_options_c.pl
> @@ -147,7 +147,7 @@
>            @OrderedSubsection = @{$ModuleSubsections{$Module}};
>       }
>       foreach my $Subsection (@OrderedSubsection) {
> -       if (defined(%{$hash{$Module}{$Subsection}})) {
> +       if (%{$hash{$Module}{$Subsection}}) {
>           if($Subsection){
>               if ($print_description) {
>                   my $Secdivider = "_" x (length($Subsection)-1);
> 

That's usually ok.
 
> This resulted in a slightly different failure:
> 
> 
> [ 98%] Autodoc options c-side
> cd /«PKGBUILDDIR»/builddir/doc/sphinxman && /usr/bin/cmake -E
> make_directory source/autodir_options_c
> cd /«PKGBUILDDIR»/builddir/doc/sphinxman && /usr/bin/perl
> /«PKGBUILDDIR»/doc/sphinxman/document_options_c.pl
> /«PKGBUILDDIR»/doc/sphinxman
> Can't use an undefined value as a HASH reference at
> /«PKGBUILDDIR»/doc/sphinxman/document_options_c.pl line 150.

But apparently not in this case :)

/*
While I try to build the package, a quick note from IRC for upstream:

  I'd say https://bugs.debian.org/810017 was just asking for it: 
  https://sources.debian.net/src/psi4/1:0.3-4/doc/sphinxman/document_options_c.pl/#L6
*/

Ok, after some debugging (and guessing what the code tries to do,
which is not very obviuous to me):

The second error arises when
$Module = 'SCF' and $Subsection = 'Parallel Runtime', and indeed,
Data::Dumper'ing %hash shows:

$VAR35 = 'SCF';
$VAR36 = {
           'DFSCF Algorithm ' => {

and all kind of other "subsections" but no "Parallel Runtime".


What works (as in: the build finishes and there are no errors or
warnings in this part) and is maybe not completely off and against
the author's intentions is to test for the existence of the specific
"subsection" hash key with:

-       if (defined(%{$hash{$Module}{$Subsection}})) {
+       if (exists($hash{$Module}{$Subsection})) {

(Discussing this with upstream to make sure it does what it's
supposed to might be a good idea. And to fix this for everybody not
just for Debian of course. But for now it might be better than a
failing build.)


Cheers,
gregor

-- 
 .''`.  Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Leonard Cohen: Love Itself
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/debichem-devel/attachments/20160106/39651ffc/attachment.sig>


More information about the Debichem-devel mailing list