WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Ncursesw  (Read 2998 times)

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Ncursesw
« on: June 25, 2019, 06:31:05 PM »
Ncursesw (on 64-bit, I haven't looked on 32-bit yet) is missing libtic.so and libtinfo.so, so it means that ncurses has to be loaded for extensions that require these. Would it be possible to get ncursesw to have these, and to have the include files NOT in a ncursesw subdirectory as this makes building mariadb 10.4 impossible and many other extensions very difficult? If the goal is to use ncursesw as the default then it should be easy to use and normal ncurses should be harder. To build a mariadb 10.4 extension I had to make my own ncursesw extension.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Ncursesw
« Reply #1 on: June 25, 2019, 11:21:24 PM »
The libtic and libtinfo functions are contained in ncursesw and it seems that most recent source code looks for them there, whereas old source code looks for them in the separate libraries.

Usually you can disable the the tests for libtic/libinfo, add LIBS="-lncursesw" and the source will compile.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Ncursesw
« Reply #2 on: June 26, 2019, 02:06:28 PM »
Mariadb is always hard to compile, but what worked for 10.3 isn't working for 10.4. I've tried it lots of ways with lots of hacks. If there is a way to get it to compile with ncursesw includes in /usr/local/include/ncursesw I haven't found it yet. Cmake finds ncursesw with the path I give it, but it isn't being set in the Makefiles no matter which variables I set.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Ncursesw
« Reply #3 on: July 08, 2019, 12:42:02 AM »
I pointed out the bug in detecting ncursesw with cmake to a developer and apparently they are working on it?

The location of the headers is not important to the final product, so if /usr/local/include/ncursesw is not found, you can symlink it to where the app is looking for the headers.

As for the location of ncursesw in the Makefiles, I guess the only option is to hack them at the moment.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Ncursesw
« Reply #4 on: July 08, 2019, 04:40:51 AM »
The location of the headers is not important to the final product, so if /usr/local/include/ncursesw is not found, you can symlink it to where the app is looking for the headers.
I have to do this sometimes (net-snmp).

As for the location of ncursesw in the Makefiles, I guess the only option is to hack them at the moment.
I have to do this too (iftop, php). Mariadb requires that I hack the locations in the source to make it compile.

It's hard to deny these have broken curses implementations when some like vim and rxvt work just fine and prove it can be done. <rant>My point being that I don't have to do this with any other library, just ncursesw. Why is this the one that I keep having to spend so much time on finding the hacks to make it work?</rant>

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Ncursesw
« Reply #5 on: July 08, 2019, 05:37:33 AM »
I think the problem with ncurses (and to an extent readline), is that it was one of the very first apps/libraries and came out before various standards became the norm.

Leaving aside, the issue of /usr or /usr/local, there is:

* headers in include or include/ncurses or include/ncursesw
* headers named curses.h or ncurses.h
* no *la files
* pkg-config files in share/pkgconfig rather than lib/pkgconfig or missing entirely
* all functions in one library or split between ncurses(w), tinfo(w) and another lib I've forgotten the name of

As you say, some packages find tinycore's ncursesw as-is without problems, but many do not.

For me, the most obvious solution is to use the pkg-config files, but strangely, many of the apps that use pkg-config to find everything else, do not use it for ncurses(w) - cmake being the most obvious offender.