bugGNU nano - Bugs: bug #63372, compilation of 7.0 fails when...

 
 

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

bug #63372: compilation of 7.0 fails when configured with --disable-comment

Submitter:  Hannu Nyman <hnyman>
Submitted:  Wed 16 Nov 2022 07:31:55 AM UTC
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Open

Fri 18 Nov 2022 03:54:44 PM UTC, comment #3: 

Thanks for confirming that the patch fixes the issue.

Fixed in git, commit 4b4b20f8.

(I will update the regression script on the server, to check also the newer build options.)

Benno Schulenberg <bens>
Project Administrator
Thu 17 Nov 2022 04:44:30 PM UTC, comment #2: 

Thanks. The patch seems to fix our builds.

> Interesting config, by the way.


Regarding the context: with OpenWrt, an OS for small router devices, the main use of nano is editing small config files. We need to adjust for really small flash spaces, so we have

  • a really tiny by build for routers with only 4 or 8 MB of flash (for OS and all apps)
  • medium-sized variant with some add-on features enabled
  • full variant with almost all nano functionality.

The bug hit just the medium-sized variant with an untypical feature selection.

Hannu Nyman <hnyman>
Wed 16 Nov 2022 09:42:44 AM UTC, comment #1: 

Thanks for reporting.  Attached patch should fix the issue.  Can you confirm?

(Interesting config, by the way.  Personally I use commenting, histories, spelling, and word completion far more often than justifying.)

(file #53963)

Benno Schulenberg <bens>
Project Administrator
Wed 16 Nov 2022 07:31:55 AM UTC, original submission:  

Compilation of nano 7.0 fails with the same config option that succeed with 6.0.
Likely a regression regarding do_comment and ENABLE_COMMENT.

nano.c: In function 'changes_something':
nano.c:1398:68: error: 'do_comment' undeclared (first use in this function)
 1398 |                         f == do_indent || f == do_unindent || f == do_comment ||
      |                                                                    ^~~~~~~~~~
nano.c:1398:68: note: each undeclared identifier is reported only once for each function it appears in

Looking at the nano.c source code, the do_comment is guarded only by NANO_TINY, but not with a separate ifdef ENABLE_COMMENT (like JUSTIFY etc. features below).

https://git.savannah.gnu.org/cgit/nano.git/tree/src/nano.c#n1395

However, the function do_comment in text.c is inside an ENABLE_COMMENT ifdef, which should be reflected in nano.c.

https://git.savannah.gnu.org/cgit/nano.git/tree/src/text.c#n305
https://git.savannah.gnu.org/cgit/nano.git/tree/src/text.c#n369

We explicitly disable commenting feature in our build config of a "medium-feature" nano variant:
  CONFIGURE_ARGS += \
--enable-help \
--enable-justify \
--enable-linenumbers \
--enable-multibuffer \
--enable-nanorc \
--enable-utf8 \
--disable-browser \
--disable-color \
--disable-comment \
--disable-extra \
--disable-histories \
--disable-libmagic \
--disable-mouse \
--disable-operatingdir \
--disable-speller \
--disable-tabcomp \
--disable-wordcomp

Like said, the same config works ok with 6.0, so this is a regression.

(note: compiling a really minimal feature tiny version works ok, and so does a full version of nano 7.0)

Hannu Nyman <hnyman>

 

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

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Updated the item)
  • -email is unavailable- added by hnyman (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-18 bens Severity3 - Normal 2 - Minor
        StatusNeed Info Fixed
    2022-11-17 bens StatusIn Progress Need Info
        Summarycompilation fails when configured with --disable-comment compilation of 7.0 fails when configured with --disable-comment
    2022-11-16 bens Attached File- Added guard-do_comment-separately.patch, #53963
        StatusNone In Progress
        Assigned toNone bens
        Summarydo_comment in nano.c not guarded by ifdef ENABLE_COMMENT compilation fails when configured with --disable-comment

    Back to the top


    Powered by Savane 3.9