Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: lovelypp on April 02, 2023, 09:44:10 PM

Title: compile nload failed, no curses library
Post by: lovelypp on April 02, 2023, 09:44:10 PM
I want to compile nload (http://www.roland-riegel.de/nload/) but when configure, it says:
configure: error: ncurses library or development files not found. ncurses is required for nload.

there is only ncursesw in the tcz library.  I don't know whether curses and cuesesw is compatible and how to resolve this problem.

thanks!
Title: Re: compile nload failed, no curses library
Post by: aus9 on April 02, 2023, 09:52:25 PM
ncursesw-dev has a header for ncurses.h

the info file for ncursesw-dev mentions this is the correct package to compile against from now on.

Juanito has posted about the change and I found this post that sums it up
http://forum.tinycorelinux.net/index.php/topic,22708.msg142147.html#msg142147
Title: Re: compile nload failed, no curses library
Post by: lovelypp on April 03, 2023, 03:38:05 AM
I create link from ncursesw to ncurses, but still can not configure
Title: Re: compile nload failed, no curses library
Post by: Juanito on April 03, 2023, 04:40:02 AM
You need to check how the configure script is checking for ncurses and modify it accordingly.

Usually it looks in the wrong place for the headers, which can be corrected using $CFLAGS.
Title: Re: compile nload failed, no curses library
Post by: Juanito on April 03, 2023, 06:03:06 AM
This works:
Code: [Select]
sudo ln -s /tmp/tcloop/ncursesw-dev/usr/local/include/ncursesw/* /usr/include
Make the following edits to the configure script:

4973 LIBS="-lncursesw  $LIBS"
5008 LIBS="-lncursesw $LIBS"
5018 LIBS="-lformw  $LIBS"
5053 LIBS="-lformw $LIBS"

Then:
Code: [Select]
CFLAGS="-I/usr/local/include/ncursesw" CC="gcc -flto -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -flto -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti"  ./configure --prefix=/usr/local --localstatedir=/var
find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;
make
sudo make install