Can link to libncurses rather than libtinfo.so.5

Linux specific questions.
Post Reply
greenink
Posts: 200
Joined: Jan 28, 2016 15:45

Can link to libncurses rather than libtinfo.so.5

Post by greenink »

I found this information that saved me from having to download libtinfo.so.5 on the internet to set up FB.

"Some time ago ncurses was split in two libraries, libtinfo.so. and libncurses.so. some software will only try to use libtinfo.so. without trying libncurses.so.

Symlinking libtinfo.so. to libncurses.so. should solve the problem:

Code:
cd /lib
sudo ln -s libncurses.so.5.7 libtinfo.so.5"

Maybe FB should link in libncurses rather than libtinfo.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Can link to libncurses rather than libtinfo.so.5

Post by caseih »

What distro are you running on? I'm have ncurses 5.9 on my machine and it provides both libtinfo.so.5 and libncurses.so.5. I'm guessing you are using a much older distro? Looking at the oldest machine I can find, I can see that indeed they used to be in one library.

I believe the choice to link against libtinfo instead of ncurses was a deliberate one. FB programs don't use ncurses, but they do use the terminal information part of ncurses. So on machines with the split-out version of ncurses, this reduces the programs' footprint.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: Can link to libncurses rather than libtinfo.so.5

Post by D.J.Peters »

@greenink you are right this are the right solution.

Joshy
greenink
Posts: 200
Joined: Jan 28, 2016 15:45

Re: Can link to libncurses rather than libtinfo.so.5

Post by greenink »

I use derivatives of puppy linux, Slacko and Fatdog. They have libncurses but not libtinfo. I was thinking of going back to java but oracle is starting to do money gathering legal exploits. I'll look around and see what my options are, but I guess FB again with a change of style using pointers and namespaces more.
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Can link to libncurses rather than libtinfo.so.5

Post by dkl »

Hi,

the GNU/Linux systems I used for building the last fbc release binaries had both libncurses and libtinfo (here it's not possible to link only against libncurses because it itself pulls in the libtinfo dependency). As a result, the fbc binaries won't work on systems that don't have libtinfo.

The problem could be solved by building an fbc binary in a special reproducible system/environment that only provides ncurses (and hoping that it will work on all other systems), or static linking...
greenink
Posts: 200
Joined: Jan 28, 2016 15:45

Re: Can link to libncurses rather than libtinfo.so.5

Post by greenink »

I think 1 dependency is okay (and only on some versions of Linux), other than that FB is very self contained.
Post Reply