bugGNU nano - Bugs: bug #50705, the wordbounds configure test...

 
 

bug #50705: the wordbounds configure test fails when it already decided to use the internal regex

Submitted by:  avih <avih>
Submitted on:  Sun 02 Apr 2017 03:45:56 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Mike Frysinger <vapier>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 14 Apr 2017 08:54:15 AM UTC, comment #6:

Fix was released in 2.8.1. Thanks for reporting.

Benno Schulenberg <bens>
Project Administrator
Wed 12 Apr 2017 08:01:40 AM UTC, comment #5:

Thanks for confirming.

A release forecast: today. :)

Benno Schulenberg <bens>
Project Administrator
Tue 11 Apr 2017 11:22:43 PM UTC, comment #4:

Confirmed fixed. Tested with git-0b93fff8 ("docs: correct an answer to a question in the FAQ").

Thanks for quickly addressing the issue.

Slightly off topic, any forecast when a new minor-version/patch which includes this fix will be released?

avih <avih>
Tue 04 Apr 2017 09:14:07 AM UTC, comment #3:

Fixed in git, 8f2b5bbf. Please verify that it fixes your issue and report back.

Benno Schulenberg <bens>
Project Administrator
Mon 03 Apr 2017 08:05:28 PM UTC, comment #2:

Please try the attached patch and tell us if that fixes it.

(file #40246)

Benno Schulenberg <bens>
Project Administrator
Mon 03 Apr 2017 06:42:20 PM UTC, comment #1:

Hm. If I run ./configure --without-wordbounds, then the resulting nano also complains about invalid character classes (on a GNU/Linux system). Is there any system where the [[:<:]] and [[:>:]] classes are valid? Googling doesn't give any result.

Benno Schulenberg <bens>
Project Administrator
Sun 02 Apr 2017 03:45:56 PM UTC, original submission:

TL;DR: it seems that if configure decides to use the internal regex implementation, the following wordbounds conftest fails due to using the replacement symbols (rpl_regcomp etc) without including their implementation.

The long version:

With nano 2.8.0 on Alpine linux (which uses musl-libc), the user-visible symptom is a lot of errors similar to the following while nano tries to load color syntax files:

Error in /usr/share/nano/c.nanorc on line 7: Bad regex "[[:<:]][A-Z_][0-9A-Z_]+[[:>:]]": Invalid character class name

When building locally from nano-2.8.0.tar.gz (where the resulting nano has the same symptoms), configure shows:
"checking for GNU-style word boundary regex support... no"

And so decides to fallback to [[:<:]] boundary chars - which apparently are not recognized at runtime, and so those errors appear.

Checking the wordbounds conftest at config.log, it fails with the following:
<path>/nano-2.8.0/conftest.c:533: undefined reference to `rpl_regcomp'
<path>/nano-2.8.0/conftest.c:535: undefined reference to `rpl_regexec'

The replacements "#define regcomp rpl_regcomp" and similar ones are used at the wordbounds conftest file because previously configure determined that it needs to use its own regex implementation. Previously at config.log:

configure:24290: checking for working re_compile_pattern
...
configure:24510: result: no

Going back to the wordbounds conftest, it's invoked like so:

configure:34072: checking for GNU-style word boundary regex support
configure:34120: gcc -o conftest -g -O2 -Wall conftest.c -lncursesw >&5

Which, as far as I can tell, does not make use of the internal regex sources or obj files, and hence fails to find the implementation of rpl_regcomp etc.

I think the solution should be that if configure decides to use the internal regex implementation, then it should not test for GNU-style word boundary regex and instead answer "yes" automatically (assuming the internal implementation does support it, which is most probably "yes").

As a workaround until a fix arrives, on systems where configure decides to use the internal regex implementation, one could invoke "./configure --with-wordbounds" which tells configure it's supported without actually testing it, and the resulting binary indeed loads the syntax files correctly.

avih <avih>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by avih (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 14 Apr 2017 08:54:15 AM UTCbensStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Tue 04 Apr 2017 09:14:07 AM UTCbensStatusNone=>Ready For Test
      Assigned toNone=>vapier
    Mon 03 Apr 2017 08:05:28 PM UTCbensAttached File-=>Added 0001-configure-fix-up-word-boundary-regex-logic-now-that-.patch, #40246
    Mon 03 Apr 2017 06:42:20 PM UTCbensSummaryworbounds conftest fails if decided to use the internal regex=>the wordbounds configure test fails when it already decided to use the internal regex

    Back to the top


    Powered by Savane 3.1-cleanup1