You are not logged in.

#1 2021-03-20 09:37:01

Polarity
Member
Registered: 2019-05-03
Posts: 32

[SOLVED] Best practice to deal with software requiring older library

Hi!

I am trying to run a program that needs an older version of libffi.

When I try to run it, I get the following error:

ImportError: libffi.so.6: cannot open shared object file: No such file or directory

However this is what I have in /usr/lib

$ ls -la libffi*
lrwxrwxrwx 1 root root    15 Oct 15 22:56 libffi.so -> libffi.so.7.1.0*
lrwxrwxrwx 1 root root    15 Oct 15 22:56 libffi.so.7 -> libffi.so.7.1.0*
-rwxr-xr-x 1 root root 42960 Oct 15 22:56 libffi.so.7.1.0*

I have read that symlinking libffi.so.6 to libffi.so.7 is highly discouraged. So my question is, what is the best practice solution to this problem?
Is it possible to install libffi6 right next to 7? Isn't that what the .so.number system is for in the first place? If so, what's the way to do it? I.e. from where can I get older versions and how do I install them correctly?
my /var/cache/pacman/pkg/ does no longer contain an old enough version.

Thanks for any help with this!

Last edited by Polarity (2021-11-05 13:32:02)

Offline

#2 2021-03-20 09:41:05

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,098

Re: [SOLVED] Best practice to deal with software requiring older library

Offline

#3 2021-03-20 10:45:01

Polarity
Member
Registered: 2019-05-03
Posts: 32

Re: [SOLVED] Best practice to deal with software requiring older library

Thank you, that worked for this specific case. But I'd like to understand it more generally. What if there happens to be no AUR package for it?

Offline

#4 2021-03-20 10:49:29

loqs
Member
Registered: 2014-03-06
Posts: 17,378

Re: [SOLVED] Best practice to deal with software requiring older library

Open a request asking for such a package to be created.

Offline

#5 2021-03-20 10:52:31

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,098

Re: [SOLVED] Best practice to deal with software requiring older library

Just do the same that the libffi6 package is doing: compile the old version with a specific versioned package name and remove all headers/devel stuff that would conflict with the current version. Since this stuff is generally needed only for binary blobs that don't require compilation, you can just package the shared library and the soversion link and leave everything else out.

Offline

#6 2021-03-20 11:16:33

Polarity
Member
Registered: 2019-05-03
Posts: 32

Re: [SOLVED] Best practice to deal with software requiring older library

Thanks for clearing that up. I had looked at the package and was mostly wondering about the headers and if they would interfere. Good to know I can just drop them.

Offline

#7 2021-03-22 03:45:59

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Best practice to deal with software requiring older library

Polarity wrote:

Hi!

I am trying to run a program that needs an older version of libffi.

When I try to run it, I get the following error:

ImportError: libffi.so.6: cannot open shared object file: No such file or directory

Did you try telling pyenv to rebuild the python interpreter?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB