bugGNU nano - Bugs: bug #58997, wide version of locally installed...

 
 

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

bug #58997: wide version of locally installed ncurses is not detected

Submitter:  Randall S. Becker <rsbecker>
Submitted:  Sat 22 Aug 2020 07:26:09 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Thu 08 Oct 2020 08:54:30 AM UTC, comment #16: 

Released in version 5.3.

Benno Schulenberg <bens>
Group administrator
Thu 03 Sep 2020 05:53:50 PM UTC, comment #15: 

Thanks for testing and for confirming.

Fixed in git, commit 98a24fc8:

  https://git.savannah.gnu.org/cgit/nano.git/commit/?id=98a24fc8

Benno Schulenberg <bens>
Group administrator
Thu 03 Sep 2020 03:54:59 PM UTC, comment #14: 


comment #11:

> If you change the two occurrences of "get_wch" in configure.ac to "wget_wch", does ./configure then find the wide curses?


Yes, that does fix the situation and I can build a wide version of Nano with this change.

checking for wget_wch in -lncursesw... yes
  The curses library to be used is: ncursesw

Randall S. Becker <rsbecker>
Thu 03 Sep 2020 12:58:46 PM UTC, comment #13: 


comment #12:

> Ping?  Any feedback on this?


Sorry, I didn't get the notification on #11. Will try it today.

Randall S. Becker <rsbecker>
Thu 03 Sep 2020 12:02:28 PM UTC, comment #12: 

Ping?  Any feedback on this?

Benno Schulenberg <bens>
Group administrator
Mon 31 Aug 2020 08:09:18 AM UTC, comment #11: 

If you change the two occurrences of "get_wch" in configure.ac to "wget_wch", does ./configure then find the wide curses?

Benno Schulenberg <bens>
Group administrator
Sun 30 Aug 2020 11:13:50 PM UTC, comment #10: 

I replaced all of the NCURSES defines with NCURSESW_CONFIG=ncursesw6-config, which should have been sufficient to use the wide char variant. I'm not sure why ncurses isn't being found given that ncursesw6-config does report correct information.

The ncursesw6-config does report correct data, but get_wch is declared in /usr/local/include/ncursesw/ncurses.h as
extern NCURSES_EXPORT(int) get_wch (wint_t *);

but redirected in the same file to wget_wch
#define get_wch(c)                      wget_wch(stdscr,(c))

so there can be no get_wch in the DLL. Configure seems to be reporting consistently based on the lack of get_wch even with wget_wch being an exported symbol.

checking for get_wch in -lncursesw... no
checking for initscr in -lncurses... yes
  The curses library to be used is: ncurses
checking for use_default_colors in -lncurses... yes
checking for set_escdelay in -lncurses... yes
checking for key_defined in -lncurses... yes

Randall S. Becker <rsbecker>
Sun 30 Aug 2020 04:41:14 PM UTC, comment #9: 


comment #8:

> [...]
> configure:36286: checking for get_wch in -lncursesw
> [...]
> **** ERROR **** [1210]:
>    conftest.o: In function `main':
>    conftest.o(.text._147479616+0x12): unresolved reference to get_wch.
> [...]
> configure:36320: result: no
> [...]
> configure:36481: result:   The curses library to be used is: ncurses


> Apparently the ncurses you built does not contain full support for wide characters.  To verify:
>
>   objdump -t /usr/local/lib/libncursesw.so | grep get_wch
>
> The first thing I would try is: drop the XOPEN_SOURCE_EXTENDED=1 when building nano.  That thing may be needed when building ncurses, it ought not to be needed when configuring nano -- nano will determine itself whether it needs to be added.


I have wget_wch, wgetch but no get_wch in the DLL. I can going to add _XOPEN_SOURCE_EXTENDED to the ncurses build.

Randall S. Becker <rsbecker>
Sun 30 Aug 2020 03:34:07 PM UTC, comment #8: 


[...]
configure:36286: checking for get_wch in -lncursesw
[...]
**** ERROR **** [1210]:
   conftest.o: In function `main':
   conftest.o(.text._147479616+0x12): unresolved reference to get_wch.
[...]
configure:36320: result: no
[...]
configure:36481: result:   The curses library to be used is: ncurses

Apparently the ncurses you built does not contain full support for wide characters.  To verify:

  objdump -t /usr/local/lib/libncursesw.so | grep get_wch

The first thing I would try is: drop the XOPEN_SOURCE_EXTENDED=1 when building nano.  That thing may be needed when building ncurses, it ought not to be needed when configuring nano -- nano will determine itself whether it needs to be added.

Benno Schulenberg <bens>
Group administrator
Sat 29 Aug 2020 01:13:04 PM UTC, comment #7: 

Please attach the config.log file from nano.

Benno Schulenberg <bens>
Group administrator
Thu 27 Aug 2020 05:01:38 PM UTC, comment #6: 


comment #5:

> I had it configured with:


> ./configure -C --enable-widec --with-shared --prefix=/usr/local --without-manpages --without-debug


> I think the '--prefix=/usr/local' is needed to get it to do the right thing.


I configured ncurses the same way, with no luck. Nano configuration is:

NCURSESW_CFLAGS="-I\"/usr/local/include/ncursesw\"" NCURSESW="-lncursesw -L/usr/local/lib" CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -I/usr/local/include/ncursesw -lncursesw" ./configure --prefix=/usr/local --enable-utf8

Randall S. Becker <rsbecker>
Thu 27 Aug 2020 07:13:29 AM UTC, comment #5: 

I had it configured with:

./configure -C --enable-widec --with-shared --prefix=/usr/local --without-manpages --without-debug

I think the '--prefix=/usr/local' is needed to get it to do the right thing.

Benno Schulenberg <bens>
Group administrator
Wed 26 Aug 2020 06:10:38 PM UTC, comment #4: 


comment #3:

> What if you also do:


> export NCURSESW_CFLAGS="-I\"/usr/local/include/ncursesw\""


> before running nano's configure?
>
> If that doesn't help, how did you configure your ncurses build?


Did not help. Ncurses was configured with:

./configure --with-shared --enable-widec

Randall S. Becker <rsbecker>
Wed 26 Aug 2020 08:16:55 AM UTC, comment #3: 

What if you also do:

export NCURSESW_CFLAGS="-I\"/usr/local/include/ncursesw\""

before running nano's configure?

If that doesn't help, how did you configure your ncurses build?

Benno Schulenberg <bens>
Group administrator
Sun 23 Aug 2020 08:34:47 PM UTC, comment #2: 

comment #1:

> Nano use pkg-config to locate ncurses.  If you've installed ncurses without using your package manager, you have to give nano more directions.  Try this:


> export NCURSESW_LIBS="-l:libncursesw.so -L/usr/local/lib"


> Then rerun nano's ./configure.


Reran nano's ./configure with:
NCURSESW_LIBS="-l:libncursesw.so -L/usr/local/lib" CPPFLAGS="-D_XOPEN_SOURCE_EXTENDED=1 -I/usr/local/include/ncurses" \
configure --prefix=/usr/local --enable-utf8

Got the same result, including:
checking for NCURSESW... no

Also checked that /usr/local/lib/libncursesw.so, /usr/local/lib/libncurses++w.a, /usr/local/lib/libncursesw_g.a, and /usr/local/lib/libncurses++w_g.a all exist.


Randall S. Becker <rsbecker>
Sun 23 Aug 2020 06:07:17 AM UTC, comment #1: 

Nano use pkg-config to locate ncurses.  If you've installed ncurses without using your package manager, you have to give nano more directions.  Try this:

export NCURSESW_LIBS="-l:libncursesw.so -L/usr/local/lib"

Then rerun nano's ./configure.

Benno Schulenberg <bens>
Group administrator
Sat 22 Aug 2020 07:26:09 PM UTC, original submission:  

I am trying to build nano with UTF8 support. We have ncurses 6.2 build with --widec-utf8, but configure is reporting:

configure: error:
  * UTF-8 support was requested, but insufficient UTF-8 support was
  * detected in your curses and/or C libraries.  Please verify that
  * your Slang was built with UTF-8 support or your curses was built
  * with wide-character support, and that your C library was built
  * with wide-character support.

We do not have curses on the box, just ncurses in /usr/local/lib. What can we do to diagnose this?

Randall S. Becker <rsbecker>

 

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

Attached Files
file #49723:  config.log added by rsbecker (860KiB - application/octet-stream - config.log as requested)

 

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 rsbecker (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
    2020-10-08 bens Open/ClosedOpen Closed
    2020-09-03 bens StatusNone Fixed
    2020-09-03 bens Summarylocally installed ncurses is not detected wide version of locally installed ncurses is not detected
    2020-09-03 bens Assigned toNone bens
    2020-08-29 rsbecker Attached File- Added config.log, #49723
    2020-08-26 bens SummaryWide Character Support not Configuring locally installed ncurses is not detected

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code