You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucy.apache.org by we...@ctosonline.org on 2013/07/18 07:42:28 UTC

[lucy-dev] Compiling with perl’s -DNO_MATHOMS

I had to apply the attached patch to compile Lucy 0.3.2 with perl 5.18.0 compiled with -DNO_MATHOMS.  I see in the repository that CaseFolder.c no longer uses perl’s case-folding functions.  I don’t know what the policy is for patches on maintenance branches, but you might want to consider this.

Father Chrysostomos


Re: [lucy-dev] Compiling with perl’s -DNO_MATHOMS

Posted by Marvin Humphrey <ma...@rectangular.com>.
On Fri, Jul 19, 2013 at 8:19 AM,  <we...@ctosonline.org> wrote:

> Yes, that works.  Thank you.

Thank you for taking the time to verify.

On Fri, Jul 19, 2013 at 3:08 AM, Nick Wellnhofer <we...@aevum.de> wrote:

> I researched this issue and it seems that `to_utf8_lower` was broken by this
> commit:
>
> http://perl5.git.perl.org/perl.git/commitdiff/051a06d4bf2bf1ff5da602fa4088227becfa244f
>
> Which was fixed about a month later by this commit:
>
> http://perl5.git.perl.org/perl.git/commitdiff/0c9b04389335c3a662232102a5a5a570e4e7c403
>
> So only Perl 5.15.6 (a development version) is affected. I think it's safe
> to revert the fix from LUCY-206.

Awesome.  Nothing makes me happier than achieving the same goal with less
code!  I'll follow that recommendation instead of committing my much more
involved patch from the newly opened issue.

Marvin Humphrey

Re: [lucy-dev] Compiling with perl’s -DNO_MATHOMS

Posted by Nick Wellnhofer <we...@aevum.de>.
On 19/07/2013 01:20, Marvin Humphrey wrote:
> Obviously we put those version tests there for a reason.
>
>      https://issues.apache.org/jira/browse/LUCY-206
>
> We're not just going to up and remove the previous fixes to fix one particular
> config of Perl (5.18.0 with -DNO_MATHOMS) when it's going to break others.
> This isn't a working patch, it's a bug report.
>
> It seems we made a good call removing `to_utf8_lower`, since it appears
> and disappears seemingly at random from the Perl C API.  How many different
> Perls are we going to have to test this on?  Ugh.

I researched this issue and it seems that `to_utf8_lower` was broken by 
this commit:

http://perl5.git.perl.org/perl.git/commitdiff/051a06d4bf2bf1ff5da602fa4088227becfa244f

Which was fixed about a month later by this commit:

http://perl5.git.perl.org/perl.git/commitdiff/0c9b04389335c3a662232102a5a5a570e4e7c403

So only Perl 5.15.6 (a development version) is affected. I think it's 
safe to revert the fix from LUCY-206.

Nick


Re: [lucy-dev] Compiling with perl’s -DNO_MATHOMS

Posted by we...@ctosonline.org.
On Jul 18, 2013, at 6:44 PM, Marvin Humphrey <ma...@rectangular.com> wrote:

> On Thu, Jul 18, 2013 at 4:20 PM, Marvin Humphrey <ma...@rectangular.com> wrote:
> 
>> Maybe we need to make Charmonizer work with the Perl headers and probe to see
>> which of these is actually available?
>> 
>>  to_utf8_lower
>>  Perl_to_utf8_lower
>>  Perl__to_utf8_lower_flags
> 
> Patch available here:
> 
> https://issues.apache.org/jira/browse/LUCY-259
> 
> Father, can you please give it a try and verify that it works for you?
> 
> Marvin Humphrey

Yes, that works.  Thank you.

Re: [lucy-dev] Compiling with perl’s -DNO_MATHOMS

Posted by Marvin Humphrey <ma...@rectangular.com>.
On Thu, Jul 18, 2013 at 4:20 PM, Marvin Humphrey <ma...@rectangular.com> wrote:

> Maybe we need to make Charmonizer work with the Perl headers and probe to see
> which of these is actually available?
>
>     to_utf8_lower
>     Perl_to_utf8_lower
>     Perl__to_utf8_lower_flags

Patch available here:

  https://issues.apache.org/jira/browse/LUCY-259

Father, can you please give it a try and verify that it works for you?

Marvin Humphrey

Re: [lucy-dev] Compiling with perl’s -DNO_MATHOMS

Posted by Marvin Humphrey <ma...@rectangular.com>.
On Wed, Jul 17, 2013 at 10:42 PM,  <we...@ctosonline.org> wrote:
> I had to apply the attached patch to compile Lucy 0.3.2 with perl 5.18.0
> compiled with -DNO_MATHOMS.  I see in the repository that CaseFolder.c no
> longer uses perl’s case-folding functions.  I don’t know what the policy is
> for patches on maintenance branches, but you might want to consider this.

Hey, wait a minute.

Here's the patch:

     while (source < end) {
         STRLEN buf_utf8_len;
-        #if (PERL_VERSION == 15 && PERL_SUBVERSION >= 6)
-        Perl__to_utf8_lower_flags(aTHX_ source, utf8_buf, &buf_utf8_len,
-                                  0, NULL);
-        #else
-        Perl_to_utf8_lower(aTHX_ source, utf8_buf, &buf_utf8_len);
-        #endif
+        to_utf8_lower(aTHX_ source, utf8_buf, &buf_utf8_len);


Obviously we put those version tests there for a reason.

    https://issues.apache.org/jira/browse/LUCY-206

We're not just going to up and remove the previous fixes to fix one particular
config of Perl (5.18.0 with -DNO_MATHOMS) when it's going to break others.
This isn't a working patch, it's a bug report.

It seems we made a good call removing `to_utf8_lower`, since it appears
and disappears seemingly at random from the Perl C API.  How many different
Perls are we going to have to test this on?  Ugh.

Maybe we need to make Charmonizer work with the Perl headers and probe to see
which of these is actually available?

    to_utf8_lower
    Perl_to_utf8_lower
    Perl__to_utf8_lower_flags

Marvin Humphrey

Re: [lucy-dev] Compiling with perl’s -DNO_MATHOMS

Posted by Marvin Humphrey <ma...@rectangular.com>.
On Thu, Jul 18, 2013 at 1:42 AM, Nick Wellnhofer <we...@aevum.de> wrote:
> On Jul 18, 2013, at 07:42 , webmasters@ctosonline.org wrote:
>
>> I had to apply the attached patch to compile Lucy 0.3.2 with perl 5.18.0
>> compiled with -DNO_MATHOMS.  I see in the repository that CaseFolder.c no
>> longer uses perl’s case-folding functions.  I don’t know what the policy is
>> for patches on maintenance branches, but you might want to consider this.
>
> +1 for fixing this in the 0.3 branch. If we're at it, we should also back
> port the following commit:
>
> https://git-wip-us.apache.org/repos/asf?p=lucy.git;a=commitdiff;h=ab0ca924d2718999065b866c436e3ce7da7049af

+1 for both.

These commits are already on 0.3 branch after 0.3.2, our last release:

    226b15d Update more repo URLs
    a987418 Update repo URLs in CONTRIBUTING
    44ba0e1 Make CONTRIBUTING Git-centric.
    d2e4ba8 LUCY-243 Warn when file deletion fails.
    da8fc69 LUCY-245 Safe Charmonizer file removal on Windows
    96894a5 LUCY-243 Check for remove failures and warn errno.
    11d657f Supply Carp so that a confess() call will work.
    48e6fd8 merge r1370657
    77381ce LUCY-239 Merge down from TRUNK

I'll make the bew commits, and then spin up an 0.3.3 release candidate,
updating the release_commands.pl script while I'm at it.

Marvin Humphrey

Re: [lucy-dev] Compiling with perl’s -DNO_MATHOMS

Posted by Nick Wellnhofer <we...@aevum.de>.
On Jul 18, 2013, at 07:42 , webmasters@ctosonline.org wrote:

> I had to apply the attached patch to compile Lucy 0.3.2 with perl 5.18.0 compiled with -DNO_MATHOMS.  I see in the repository that CaseFolder.c no longer uses perl’s case-folding functions.  I don’t know what the policy is for patches on maintenance branches, but you might want to consider this.

+1 for fixing this in the 0.3 branch. If we're at it, we should also back port the following commit:

https://git-wip-us.apache.org/repos/asf?p=lucy.git;a=commitdiff;h=ab0ca924d2718999065b866c436e3ce7da7049af

Nick