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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  avih <avih>
Submitted:  Sun 02 Apr 2017 03:45:56 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  vapier Open/Closed:  Closed

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>
Group administrator
Wed 12 Apr 2017 08:01:40 AM UTC, comment #5: 

Thanks for confirming.

A release forecast: today.  :)

Benno Schulenberg <bens>
Group 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>
Group 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>
Group 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>
Group 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.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-14 bens StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2017-04-04 bens StatusNone Ready For Test
        Assigned toNone vapier
    2017-04-03 bens Attached File- Added 0001-configure-fix-up-word-boundary-regex-logic-now-that-.patch, #40246
    2017-04-03 bens Summaryworbounds 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.13-d3ae.
    Corresponding source code