[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [outreachy] [profphd] Fwd: on Debian "profphd' upstream ChangeLog's entry



Hi Andreas,
I've committed recent changes in profphd package. The work still in progress, but I decided to do it now just in case (waiting for my flight at the airport).
I fixed patch because of following reason: $tmplen which is not initialized might be undefined, and this causes error.
Initialization
   $#tmpend=$#tmplen=1;
seems to eliminate the problem in correct way.
I took a small portion of perl code and wrote tiny and ugly script to see this problem:
This is it (with variables renamed):
""""
no warnings 'deprecated';

sub nnOutFilterSecHelix {
  $#somevar=$cte=0;
  print $#othervar."\n";
  $[=1;

  print $#othervar."\n";
  #++$othervar[$cte]; #this fails in recent perl, but doesn't fail in old versions of perl
  print $#othervar."\n";# this value becomes 1 or 0, depending on perl version
  #everything goes fine when this counter is set to 1.
  $somevar[$cte] = $othervar[$cte] if (! defined $somevar[$cte]);
  print "after ".$#othervar."\n";
  print $cte. " " .$somevar[0]."--\n".$]."\n";
}

&nnOutFilterSecHelix();
1;
"""
The problem seems to be in incorrect in counters - as I found out in perl books, $#a contains the last value of array named 'a', but if this counter variable was not set, $[ =1 ; line won't help. Error appears when it is not set for $tmplen array. And by default this $#tmplen=0

P.S. - Sorry if I wrote unclear, but my flight is postponed for the second time and it makes me little nervous. I described how I understand this problem for now. I've also fixed small warning (several from other package are left) and started to fix autopkgtest. For now basic tests should work (I used profphd's script with some tests - but it seems to be outdated, and I started to change it to separate autopkgtest instead).

2016-08-24 16:54 GMT+03:00 merlettaia <merlettaia@gmail.com>:
Hi Andreas,
I made patch to disable perlbrew and make profphd work with perl 5.22. Simple prof example calls from man page seem to work, I'm still checking if this actually works. These patches and tests are unfinished.
I'm still working on it, but probably I'll take a break for a day or two.

2016-08-21 13:21 GMT+03:00 merlettaia <merlettaia@gmail.com>:
Hi All,
I've asked author of profphd changelog entry for details why profphd relies on older version of perl and perlbrew. His answer is given below.
I'll try to fix profphd now - last time I tried to launch it with latest perl it there was no such error.


---------- Forwarded message ----------
From: Timothy Karl <karl@rostlab.org>
Date: 2016-07-18 16:18 GMT+03:00
Subject: Re: on Debian "profphd' upstream ChangeLog's entry
To: merlettaia <merlettaia@gmail.com>


Hi Tanya,

I checked back in my logs and found the following that I wrote on March 20, 2015, before the official release of Jessie:

It appears that at line 7739 in /usr/share/profphd/prof/scr/lib/lib-prof.pl:

   $tmpend[$cth]=$tmplen[$cth] if (! defined $tmpend[$cth]);

The command that is being run is:
   prof query.hsspPsiFil both fileRdb=query.profRdb numresMin=17 nresPerLineAli=60 riSubSec=4 riSubAcc=3 riSubSym=.

Both $tmpend[$cth] and $tmpend[$cth] are undefined at this point on the first iteration of the function. On the cluster node (using perl 5.14), the assignment works; however, on debian-unstable (using perl 5.20), prof fails with "Modification of non-creatable array value attempted, subscript -1 at /usr/share/profphd/prof/scr/lib/lib-prof.pl line 7739.”, although at this point on both servers the value of $cth is 0.

At the time, prof just failed using perl 5.20 installed on debian-unstable (now jessie), giving the aforementioned error message. Arybase wasn’t, at the time, implementing the ‘$[‘ assignment the same as in previous versions of Perl core. The developer or prof, who created it years ago, did not like counting from 0 on arrays, and therefore, used the ‘$[' to start array counting at 1 (instead of 0). Since I was preparing for the release of Jessie, and since there are literally thousands upon thousands of poorly documented perl code in that package, of which I’m not the maintainer nor contributor, I decided it was easiest and best to use perlbrew, including it as a requirement, and having it install an older version of perl with which prof could run against. 

Recently, a college had tried the previous version of prof, before the perlbrew became a requirement, on jessie. He said it didn’t produce an error any longer. Perhaps arybase has been changed, making it that perlbrew is no longer needed for prof to run correctly.

So basically, if you don’t get the error message, then prof ran as it should.  I hope this helps you :)
Cheers,
Tim

Email : karl@rostlab.org
Jabber: karlt@in.tum.de

>>Encrypted emails are preferred<< 




On 17 Jul 2016, at 19:51, merlettaia <merlettaia@gmail.com> wrote:

Hi Timothy,
I'm an intern in Debian Med Team, and I'm working on autopkgtest testsuites for various packages. I found your email in profphd upstream's ChangeLog.

"
profphd (1.0.42) unstable; urgency=low

  * Make prof work with Debian Jessie by requiring perlbrew package
    and have it install independent perl v5.10 instance. $[ has been
    moved from perl core >=5.16.0 into arybase, and does not produce
    the same side effects as in previous perl versions, therefore
    breaking prof when run using perl v5.20 in Jessie.

 -- Timothy Karl (Aerialis) <karl@rostlab.org>  Thu, 23 Jul 2015 16:44:30 +0200
"

Can you remember what exact error was produced? And what erratic behaviour did you noticed?
I've read arybase description here http://search.cpan.org/dist/perl-5.17.1/ext/arybase/arybase.pm#HISTORY, and for me it is unclear what specific side effect makes reprof break in latest versions of perl (and how exactly this breaks reprof?).

Unfortunately, I don't speak Perl fluently now and can't afford myself full source code investigation - my internship ends in August, and I wish to write tests for as many other packages as possible before it ends (and I've already spent 1 month while working on RostLab's packages). Also, I couldn't make perl 10.1 work in autopkgtest testsuite for now, even with perlbrew installed, so I'll try to make patch to update package to use latest Perl version if it is possible.
That's why any information would be helpful.

Thank you for any answer.

--
Regards,
Tanya.





--
Best wishes,
Tanya.



--
Best wishes,
Tanya.



--
Best wishes,
Tanya.

Reply to: