Tiny Core Extensions > TCE Corepure64
trouble with ncursesw-dev when compiling for Pure64 11.0-beta
GNUser:
Thank you, jazzbiker. Thanks to you I was also able to figure it out using a different approach:
In configure I changed these lines:
--- Code: ---for ac_lib in '' tinfo curses ncurses; do
...
for ac_header in curses.h term.h ncurses/curses.h ncurses/term.h termcap.h
--- End code ---
to this:
--- Code: ---for ac_lib in '' tinfo curses ncursesw; do
...
for ac_header in curses.h term.h ncursesw/curses.h ncursesw/term.h ncursesw/termcap.h
--- End code ---
In src/lftp_tinfo.cc I changed these lines:
--- Code: ---#else
# error No header file for tigetstr or tgetstr found. Install ncurses-dev or termcap-dev.
#endif
...
if(setupterm(NULL, 1, &errret) == ERR)
--- End code ---
To this:
--- Code: ---#else
# include <ncursesw/term.h>
#endif
...
if(setupterm(NULL, 1, &errret) == -1)
--- End code ---
The change to the else clause was key because it's where the logic was going and because the infamous tigetstr function header is in ncursesw/term.h only. ERR is not defined in term.h but is defined elsewhere as -1.
After those changes to the source code (to configure and src/lftp_tinfo.cc), things were straight-forward:
--- Code: ---$ tce-load -i compiletc gettext-dev libidn2-dev ncursesw-dev readline-dev pkg-config openssl-1.1.1-dev
$ export CFLAGS="-mtune=generic -Os -pipe"
$ export CXXFLAGS="-mtune=generic -Os -pipe"
$ export LDFLAGS="-Wl,-O1"
$ ./configure --prefix=/usr/local --without-gnutls --with-openssl
$ make
--- End code ---
There's no way I would have been able to crack this without your help. THANK YOU! :D
jazzbiker:
Oh, no thanks, I'm glad to help a little bit when I'm able to. Its pleasant when the job is done, but its double pleasant if something was taught along the way. Thank You for giving such a possibility )))
GNUser:
--- Quote from: jazzbiker on January 17, 2020, 06:38:50 PM ---But all non-wide functions are present in wide library, so there is no reason not to be able to link non-wide software with wide-char library.
--- End quote ---
This was key. Before you found it and shared it, I wasn't even sure I was on the right track.
Thanks again :)
I'm rocking lftp 4.9.1 now, and will contribute it as an extension in the near future.
andyj:
I feel your pain. PHP, net-snmp, and iftop also require hacks in their build scripts to compile with ncursesw. Finding those hacks takes a while, and can change with versions.
Navigation
[0] Message Index
[*] Previous page
Go to full version