[lucy-user] Sort Spec problem on Debian Jessie

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[lucy-user] Sort Spec problem on Debian Jessie

Noe Fernandez
Hi All,

I got an error running Lucy::Search::SortSpec when I am working on a Debian jessie.

The same code work fine on Debian Wheezy and OSX El Capitan.

It is just a very simple script to search and sort the output from an index created from a 3 columns tab delimited file. I do not think there is any problem in the code since it is working on my mac computer (El Capitan) and in several Debian Wheezy VM and servers.


The error only says:

Invalid parameter: 'sort_spec'
        cfish_XSBind_locate_args at xs/XSBind.c line 382



Is there anything I could do to fix it?

Lucy::Simple is up to date. (0.005001)
Lucy::Search::SortSpec is up to date. (0.005001)

Thank you very much for your help.

Noe Fernandez
Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Sort Spec problem on Debian Jessie

Marvin Humphrey
On Wed, Jul 27, 2016 at 1:42 PM, Noe Fernandez <[hidden email]> wrote:

> Hi All,
>
> I got an error running Lucy::Search::SortSpec when I am working on a Debian jessie.
>
> The same code work fine on Debian Wheezy and OSX El Capitan.
>
> It is just a very simple script to search and sort the output from an index created from a 3 columns tab delimited file. I do not think there is any problem in the code since it is working on my mac computer (El Capitan) and in several Debian Wheezy VM and servers.
>
>
> The error only says:
>
> Invalid parameter: 'sort_spec'
>         cfish_XSBind_locate_args at xs/XSBind.c line 382
>
>
>
> Is there anything I could do to fix it?

This error indicates that a subroutine which does not take a parameter
called `sort_spec` is receiving it nonetheless.

The next step is identifying the location in the code where the
problem is occurring.  I suggest searching through your code for the
string `sort_spec`, or just using debug printing to hunt it down.

Once you find the call site where the problem is occurring, if it's
not obvious how to fix it, please send a snippet to this list
(stripped of any information you don't want published publicly) and
we'll take a look.

Marvin Humphrey
Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Sort Spec problem on Debian Jessie

Noe Fernandez
Hi Marvin,

I attach a link to a zip file with an example of an index folder and the script I am using. It worked on OSX El Capitan and Debian Wheezy

It crashed on Debian Jessie

perl search_corr_index.pl Manes.10G119800 example_index/

It should return

Manes.10G119800 Manes.01G265300 0.96
Manes.10G119800 Manes.11G147600 0.94
Manes.10G119800 Manes.01G109500 0.93
Manes.10G119800 Manes.07G142200 0.93
Manes.10G119800 Manes.11G133300 0.93
Manes.10G119800 Manes.01G217000 0.92
Manes.10G119800 Manes.04G147400 0.92
Manes.10G119800 Manes.05G157800 0.92
Manes.10G119800 Manes.06G083900 0.92
Manes.10G119800 Manes.08G121000 0.92
Manes.10G119800 Manes.09G050100 0.92
Manes.10G119800 Manes.13G128100 0.92
Manes.10G119800 Manes.02G100800 0.91
Manes.10G119800 Manes.02G119400 0.91
Manes.10G119800 Manes.03G016000 0.91
Manes.10G119800 Manes.04G043900 0.91
Manes.10G119800 Manes.06G141000 0.91
Manes.10G119800 Manes.09G120900 0.91
Manes.10G119800 Manes.10G031600 0.91
Manes.10G119800 Manes.11G131000 0.91



Thank you,
Noe

https://drive.google.com/open?id=0B5naznfIBi9peU5ZVzU4eDVNUDA




On Jul 27, 2016, at 4:57 PM, Marvin Humphrey <[hidden email]> wrote:

On Wed, Jul 27, 2016 at 1:42 PM, Noe Fernandez <[hidden email]<mailto:[hidden email]>> wrote:
Hi All,

I got an error running Lucy::Search::SortSpec when I am working on a Debian jessie.

The same code work fine on Debian Wheezy and OSX El Capitan.

It is just a very simple script to search and sort the output from an index created from a 3 columns tab delimited file. I do not think there is any problem in the code since it is working on my mac computer (El Capitan) and in several Debian Wheezy VM and servers.


The error only says:

Invalid parameter: 'sort_spec'
       cfish_XSBind_locate_args at xs/XSBind.c line 382



Is there anything I could do to fix it?

This error indicates that a subroutine which does not take a parameter
called `sort_spec` is receiving it nonetheless.

The next step is identifying the location in the code where the
problem is occurring.  I suggest searching through your code for the
string `sort_spec`, or just using debug printing to hunt it down.

Once you find the call site where the problem is occurring, if it's
not obvious how to fix it, please send a snippet to this list
(stripped of any information you don't want published publicly) and
we'll take a look.

Marvin Humphrey

Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Sort Spec problem on Debian Jessie

Marvin Humphrey
On Wed, Jul 27, 2016 at 2:35 PM, Noe Fernandez <[hidden email]> wrote:
> Hi Marvin,
>
> I attach a link to a zip file with an example of an index folder and the
> script I am using. It worked on OSX El Capitan and Debian Wheezy
>
> It crashed on Debian Jessie

This problem arises due to a regression in Lucy 5.0.0.  Lucy::Simple prior to
5.x was written in Perl; when it was ported to C, the `search` function ceased
to support `sort_spec`.

I've filed https://issues.apache.org/jira/browse/LUCY-307 to track this issue.

The workaround for now would be to rewrite your code using
Lucy::Search::IndexSearcher instead of Lucy::Simple.  Something like this:

    my $searcher = Lucy::Search::IndexSearcher->new(index => $path_to_index);
    my $sort_spec = Lucy::Search::SortSpec->new(
         rules => [
            Lucy::Search::SortRule->new(field => 'correlation', reverse => 1),
            Lucy::Search::SortRule->new(field => 'gene2', reverse => 0),
            Lucy::Search::SortRule->new(field => 'gene1'),
         ],
    );
    my $hits = $searcher->hits(
        query     => $query,
        sort_spec => $sort_spec,
        num_wanted => 20,
    );

Marvin Humphrey
Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Sort Spec problem on Debian Jessie

Nick Wellnhofer
On 28/07/2016 00:22, Marvin Humphrey wrote:
> This problem arises due to a regression in Lucy 5.0.0.  Lucy::Simple prior to
> 5.x was written in Perl; when it was ported to C, the `search` function ceased
> to support `sort_spec`.

I just fixed this in the master branch. I also decided to push the fix to the
0.5 branch, although this breaks the C and Go APIs.

Nick

Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Sort Spec problem on Debian Jessie

Noe Fernandez
Thank you Nick and Marvin,

I am trying to install the version from the branch 0.5 and I am not able to do it.

I got the next error:

Parcel 'Clownfish' required by 'TestLucy' not found at /usr/local/lib/x86_64-linux-gnu/perl/5.20.2/Clownfish/CFC/Perl/Build.pm line 248.


I really appreciate your help. Please, could you tell me how to install a version that works using SortSpec?



I tried many things. I tried to install versions 0.4.4 for Lucy and Clownfish but I was not able to install them either. They always return some error.



No class found for type 'VArray' at /home/vagrant/local-lib/lib/perl5/x86_64-linux-gnu-thread-multi/Clownfish/CFC/Perl/Build.pm line 249.

Fetching http://backpan.perl.org/authors/id/N/NW/NWELLNHOF/Lucy-0.4.4.tar.gz
-> OK
Unpacking Lucy-0.4.4.tar.gz
Entering Lucy-0.4.4
Checking configure dependencies from META.json
Checking if you have ExtUtils::Install 1.46 ... Yes (1.67)
Checking if you have Clownfish 0.004004 ... Yes (0.005001)
Checking if you have Module::Build 0.38 ... Yes (0.4218)
Checking if you have Clownfish::CFC::Perl::Build 0.004004 ... Yes (0.004004)
Configuring Lucy-v0.4.4
Running Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Lucy' version '0.4.4'
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Module::Build 0.280801 ... Yes (0.4218)
Checking if you have ExtUtils::CBuilder 0.21 ... Yes (0.280217)
Checking if you have Devel::PPPort 3.14 ... Yes (3.21)
Checking if you have ExtUtils::ParseXS 2.18 ... Yes (3.24)
Checking if you have Clownfish::CFC 0.004004 ... Yes (0.004004)
Checking if you have Clownfish 0.004004 ... Yes (0.005001)
Building and testing Lucy-v0.4.4
No class found for type 'VArray' at /home/vagrant/local-lib/lib/perl5/x86_64-linux-gnu-thread-multi/Clownfish/CFC/Perl/Build.pm line 249.
Building Lucy
Parsing Clownfish files...
-> FAIL Installing Lucy::Simple failed. See /home/vagrant/.cpanm/work/1469716527.30414/build.log for details. Retry with --force to force install it.


--> Working on Lucy::Simple
Fetching http://backpan.perl.org/authors/id/N/NW/NWELLNHOF/Lucy-0.4.4.tar.gz
-> OK
Unpacking Lucy-0.4.4.tar.gz
Entering Lucy-0.4.4
Checking configure dependencies from META.json
Checking if you have Clownfish::CFC::Perl::Build 0.004004 ... Yes (0.005001)
Checking if you have Module::Build 0.38 ... Yes (0.4218)
Checking if you have ExtUtils::Install 1.46 ... Yes (1.67)
Checking if you have Clownfish 0.004004 ... Yes (0.005001)
Configuring Lucy-v0.4.4
Running Build.PL
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Lucy' version '0.4.4'
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Module::Build 0.280801 ... Yes (0.4218)
Checking if you have ExtUtils::CBuilder 0.21 ... Yes (0.280217)
Checking if you have Clownfish 0.004004 ... Yes (0.005001)
Checking if you have Clownfish::CFC 0.004004 ... Yes (0.005001)
Checking if you have Devel::PPPort 3.14 ... Yes (3.21)
Checking if you have ExtUtils::ParseXS 2.18 ... Yes (3.24)
Building and testing Lucy-v0.4.4
No class found for type 'VArray' at /home/vagrant/local-lib/lib/perl5/x86_64-linux-gnu-thread-multi/Clownfish/CFC/Perl/Build.pm line 248.
Building Lucy
Parsing Clownfish files...
-> FAIL Installing Lucy::Simple failed. See /home/vagrant/.cpanm/work/1469716408.29809/build.log for details. Retry with --force to force install it.

Best,
Noe



> On Jul 28, 2016, at 9:18 AM, Nick Wellnhofer <[hidden email]> wrote:
>
> On 28/07/2016 00:22, Marvin Humphrey wrote:
>> This problem arises due to a regression in Lucy 5.0.0.  Lucy::Simple prior to
>> 5.x was written in Perl; when it was ported to C, the `search` function ceased
>> to support `sort_spec`.
>
> I just fixed this in the master branch. I also decided to push the fix to the 0.5 branch, although this breaks the C and Go APIs.
>
> Nick
>

Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Sort Spec problem on Debian Jessie

Nick Wellnhofer
On 28/07/2016 16:52, Noe Fernandez wrote:
> Thank you Nick and Marvin,
>
> I am trying to install the version from the branch 0.5 and I am not able to do it.
>
> I got the next error:
>
> Parcel 'Clownfish' required by 'TestLucy' not found at /usr/local/lib/x86_64-linux-gnu/perl/5.20.2/Clownfish/CFC/Perl/Build.pm line 248.

This error indicates that Clownfish 0.5 wasn't installed or the installation
wasn't found for some reason. You also seem to have a Clownfish::CFC
installation in /usr/local/lib.

> I tried many things. I tried to install versions 0.4.4 for Lucy and Clownfish but I was not able to install them either. They always return some error.
>
> No class found for type 'VArray' at /home/vagrant/local-lib/lib/perl5/x86_64-linux-gnu-thread-multi/Clownfish/CFC/Perl/Build.pm line 249.
>
> Fetching http://backpan.perl.org/authors/id/N/NW/NWELLNHOF/Lucy-0.4.4.tar.gz
> -> OK
> Unpacking Lucy-0.4.4.tar.gz
> Entering Lucy-0.4.4
> Checking configure dependencies from META.json
> Checking if you have ExtUtils::Install 1.46 ... Yes (1.67)
> Checking if you have Clownfish 0.004004 ... Yes (0.005001)

Lucy 0.4 doesn't work with Clownfish 0.5. Also note that this time,
Clownfish::CFC is run from /home/vagrant/local-lib.

You should try to remove all Clownfish::CFC, Clownfish and Lucy files from
/usr/local, /home/vagrant/local-lib, and other locations. Then install either

- Clownfish::CFC 0.4.4, Clownfish 0.4.4 and Lucy 0.4.4 from CPAN, or
- Clownfish::CFC 0.5.1, Clownfish 0.5.1 from CPAN and Lucy from the 0.5
   Git branch.

Nick

Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Sort Spec problem on Debian Jessie

Noe Fernandez
Thank you,

I finally was able to make work the git branch 0.5 installing Clownfish 0.5

Best regards,
Noe

> On Jul 28, 2016, at 11:08 AM, Nick Wellnhofer <[hidden email]> wrote:
>
> On 28/07/2016 16:52, Noe Fernandez wrote:
>> Thank you Nick and Marvin,
>>
>> I am trying to install the version from the branch 0.5 and I am not able to do it.
>>
>> I got the next error:
>>
>> Parcel 'Clownfish' required by 'TestLucy' not found at /usr/local/lib/x86_64-linux-gnu/perl/5.20.2/Clownfish/CFC/Perl/Build.pm line 248.
>
> This error indicates that Clownfish 0.5 wasn't installed or the installation wasn't found for some reason. You also seem to have a Clownfish::CFC installation in /usr/local/lib.
>
>> I tried many things. I tried to install versions 0.4.4 for Lucy and Clownfish but I was not able to install them either. They always return some error.
>>
>> No class found for type 'VArray' at /home/vagrant/local-lib/lib/perl5/x86_64-linux-gnu-thread-multi/Clownfish/CFC/Perl/Build.pm line 249.
>>
>> Fetching http://backpan.perl.org/authors/id/N/NW/NWELLNHOF/Lucy-0.4.4.tar.gz
>> -> OK
>> Unpacking Lucy-0.4.4.tar.gz
>> Entering Lucy-0.4.4
>> Checking configure dependencies from META.json
>> Checking if you have ExtUtils::Install 1.46 ... Yes (1.67)
>> Checking if you have Clownfish 0.004004 ... Yes (0.005001)
>
> Lucy 0.4 doesn't work with Clownfish 0.5. Also note that this time, Clownfish::CFC is run from /home/vagrant/local-lib.
>
> You should try to remove all Clownfish::CFC, Clownfish and Lucy files from /usr/local, /home/vagrant/local-lib, and other locations. Then install either
>
> - Clownfish::CFC 0.4.4, Clownfish 0.4.4 and Lucy 0.4.4 from CPAN, or
> - Clownfish::CFC 0.5.1, Clownfish 0.5.1 from CPAN and Lucy from the 0.5
>  Git branch.
>
> Nick
>