Tiny Core Extensions > TCE Corepure64

trouble with ncursesw-dev when compiling for Pure64 11.0-beta

(1/3) > >>

GNUser:
I'm trying to compile lftp 4.9.1 for Pure64 11.x
The source code is here: https://lftp.tech/get.html

All the build dependencies (and then some) are already in the 11.x repository, but I can't make it work:


--- Code: ---$ tce-load -wi compiletc readline-dev gettext-dev openssl-1.1.1-dev ncursesw-dev libidn2-dev pkg-config zlib_base-dev libtool-dev expat2-dev autoconf automake
$ export CFLAGS="-mtune=generic -Os -pipe -I/usr/local/include/ncursesw"
$ export CXXFLAGS="-mtune=generic -Os -pipe -I/usr/local/include/ncursesw"
$ export CPPFLAGS="-I/usr/local/include/ncursesw"
$ export LDFLAGS="-Wl,-O1"
$ cd lftp-4.9.1
$ ./configure --prefix=/usr/local --without-gnutls --with-openssl=/usr/local/include/openssl
---snip---
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking term.h usability... yes
checking term.h presence... yes
checking for term.h... yes
checking ncurses/curses.h usability... no
checking ncurses/curses.h presence... no
checking for ncurses/curses.h... no
checking ncurses/term.h usability... no
checking ncurses/term.h presence... no
checking for ncurses/term.h... no
checking termcap.h usability... yes
checking termcap.h presence... yes
checking for termcap.h... yes
checking for library containing tigetstr... no
checking for library containing tgetstr... no
configure: error: No terminfo, termcap or curses library found. Install ncurses-devel.
--- End code ---
It seems that ncursesw provides the tigetstr and tgetstr functions, so I'm not sure why configure is giving this error.

I'm stuck and going around in circles. Please help if you know what's going on.

jazzbiker:
Hi, GNUser!

Sometimes configure don't know, that ncursesw have its own directory "ncursesw" inside /usr/local/include. Making search in "configure" of lftp on the keyword "ncurses" shows, that it expects, that headers are located in "ncurses" directory.
I've not tried, but I think You can  make soft link ncurses->ncursesw in Your /usr/local/include.

If this will not help, please tell.

Good luck!

GNUser:
That's a good idea, jazzbiker, so I gave it a shot.
I tried # ln -s /usr/local/include/ncursesw /usr/local/include/ncurses before the above steps. Alas, configure quits with the same exact error.

jazzbiker:
Hi, GNUser!

I've achieved configure to accept ncursesw library by manual editing of configure file. If this way is acceptable for You edit the following string in configure:


--- Code: ---for ac_lib in '' tinfo curses ncurses; do

--- End code ---

to make it


--- Code: ---for ac_lib in '' tinfo curses ncursesw; do

--- End code ---

configure can't find ncurses library itself, because it is named ncursesw.

I don't made the whole build, I only achieved configure to accept ncursesw. TC10.1 x86, but I think it will work the same for TC11.

GNUser:
jazzbiker, THANK YOU! Yes, that edit allows the configure step to complete. Nice!

Now I can get as far as make, but it errors out with this:


--- Code: ---$ make
---snip---
lftp_tinfo.cc:40:3: error: #error No header file for tigetstr or tgetstr found. Install ncurses-dev or termcap-dev.
   40 | # error No header file for tigetstr or tgetstr found. Install ncurses-dev or termcap-dev.
      |   ^~~~~
lftp_tinfo.cc: In function ‘void init_terminfo()’:
lftp_tinfo.cc:55:7: error: ‘setupterm’ was not declared in this scope
   55 |    if(setupterm(NULL, 1, &errret) == ERR)
      |       ^~~~~~~~~
lftp_tinfo.cc:55:38: error: ‘ERR’ was not declared in this scope
   55 |    if(setupterm(NULL, 1, &errret) == ERR)
      |                                      ^~~
lftp_tinfo.cc: In function ‘const char* get_string_term_cap(const char*, const char*)’:
lftp_tinfo.cc:73:22: error: ‘tigetstr’ was not declared in this scope
   73 |    const char *ret = tigetstr(const_cast<char *>(terminfo_cap));
      |                      ^~~~~~~~
make[2]: *** [Makefile:2332: lftp_tinfo.lo] Error 1
make[2]: Leaving directory '/home/bruno/Downloads/lftp-4.9.1/src'
make[1]: *** [Makefile:1740: all-recursive] Error 1
make[1]: Leaving directory '/home/bruno/Downloads/lftp-4.9.1'
make: *** [Makefile:1685: all] Error 2

--- End code ---

In addition to your suggestion, I changed this line in configure:

--- Code: ---for ac_header in curses.h term.h ncurses/curses.h ncurses/term.h termcap.h

--- End code ---
to this:

--- Code: ---for ac_header in curses.h term.h ncursesw/curses.h ncursesw/term.h termcap.h

--- End code ---
and these lines in src/lftp_tinfo.cc

--- Code: ---#  include <ncurses/term.h>
# include <ncurses/curses.h>
#  include <ncurses/term.h>
--- End code ---

to this:

--- Code: ---#  include <ncursesw/term.h>
# include <ncursesw/curses.h>
#  include <ncursesw/term.h>

--- End code ---

But the pesky make error does not go away.

Navigation

[0] Message Index

[#] Next page

Go to full version