(L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Linux specific questions.
systemctl
Posts: 182
Joined: Mar 27, 2020 5:15

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by systemctl »

Do we have something to do with this?

viewtopic.php?f=5&t=28337
Landeel
Posts: 776
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by Landeel »

systemctl wrote:Do we have something to do with this?

viewtopic.php?f=5&t=28337
Yes, same problem!
kinrpg
Posts: 1
Joined: Dec 02, 2007 2:25
Location: Estiva Gerbi - SP - Brazil
Contact:

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by kinrpg »

Hello. This worked for me:

Code: Select all

sudo apt install libtinfo5
thebigh
Posts: 40
Joined: Dec 14, 2018 11:11

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by thebigh »

I have tried all of these fixes and I still get "fbc: /lib/libtinfo.so.5: version `NCURSES_TINFO_5.0.19991023' not found (required by fbc)" no matter what I do.

Is there an ETA for a fix for this bug?
hhr
Posts: 74
Joined: Nov 29, 2019 10:41

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by hhr »

Look at FreeBASIC/readme.txt...

Linux Mint, lubuntu, xubuntu:

readme.txt:
sudo apt install gcc libncurses5-dev libffi-dev libgl1-mesa-dev
sudo apt install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxpm-dev
Furthermore:
sudo apt install libncurses5

readme.txt:
sudo apt install gcc-multilib lib32ncurses5-dev libx11-dev:i386 libxext-dev:i386
sudo apt install libxrender-dev:i386 libxrandr-dev:i386 libxpm-dev:i386
Furthermore:
sudo apt install libncurses5:i386
thebigh
Posts: 40
Joined: Dec 14, 2018 11:11

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by thebigh »

Yes, I did all that. All these things are at their latest versions, but I am still getting the same error.
caseih
Posts: 2049
Joined: Feb 26, 2007 5:32

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by caseih »

The README is missing a package from that list. You need the libtinfo5 package, or if you're using the 32-bit compiler, libtinfo5:i386
Landeel
Posts: 776
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by Landeel »

The distributed compiler itself needs 'libtinfo.so.5', so "sudo apt-get install libtinfo5".
If you want to prevent this from happening with your compiled programs, copy "libtinfo.a" to "/usr/local/lib/freebasic/linux-x86_64", and it will be statically linked.
If you're using the 32-bit version of the compiler, it's "sudo apt-get install libtinfo5:i386" and "/usr/local/lib/freebasic/linux-x86".
Landeel
Posts: 776
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by Landeel »

Landeel wrote: Apr 10, 2020 19:04 And finally, it works.
The problem was all about libm, not libc.
Here's what I did:

1) Copied the following files from my 18.04 installation to '/usr/local/lib/freebasic/linux-x86_64' :

Code: Select all

-rw-r--r-- 1 root root 3570098 abr 10 15:40 libm-2.27.a
-rw-r--r-- 1 root root     249 abr 10 15:42 libm.a
-rw-r--r-- 1 root root     377 abr 10 15:45 libm.so
-rw-r--r-- 1 root root 1700792 abr 10 15:46 libm.so.6
-rw-r--r-- 1 root root  344348 abr 10 15:41 libmvec.a
-rw-r--r-- 1 root root    5974 abr 10 15:43 libmvec_nonshared.a
-rw-r--r-- 1 root root  170360 abr 10 15:47 libmvec.so.1
-rw-r--r-- 1 root root  279586 abr 10 10:30 libtinfo.a
2) The files 'libm.a' and 'libm.so' are not actual libraries, but scripts with hardcoded paths. I had to edit them and change the paths as follow:

libm.a:

Code: Select all

/* GNU ld script
*/
OUTPUT_FORMAT(elf64-x86-64)

 GROUP ( /usr/local/lib/freebasic/linux-x86_64/libm-2.27.a /usr/local/lib/freebasic/linux-x86_64/libmvec.a )
libm.so:

Code: Select all

/* GNU ld script
*/
OUTPUT_FORMAT(elf64-x86-64)

 GROUP ( /usr/local/lib/freebasic/linux-x86_64/libm.so.6  AS_NEEDED ( /usr/local/lib/freebasic/linux-x86_64/libmvec_nonshared.a /usr/local/lib/freebasic/linux-x86_64/libmvec.so.1 ) )
Now the programs I compile on 20.04 can also run on 18.04.

No more "version `GLIBC_2.29' not found".

No more "/usr/lib/x86_64-linux-gnu/libtinfo.so.6: version `NCURSES6_TINFO_5.0.19991023' not found".
I've tried to repeat this without success.

The best solution so far is install an older version of Ubuntu on another partition, install FreeBASIC there, and chroot to it when you need to compile for older GLIBC.
caseih
Posts: 2049
Joined: Feb 26, 2007 5:32

Re: (L)Ubuntu Focal Fossa (20.04) and libtinfo.so.5

Post by caseih »

Did the libtinfo5 package not work for you? EDIT: I see you're trying to target 18.04. Yes you must use an older distro chroot if you need to have compatibility. I guess this is one of the things that snap and flatpack try to address for distributing software.
Post Reply