On ubuntu trusty tahr, when I install libblas3
from the repository, it installs a file at /usr/lib/libblas.so.3gf
. Under focal fossa, it behaves differently and installs under /usr/lib/x86_64-linux-gnu/libblas.so.3
. I am assuming that the latter follows libtool versioning as per this answer. However I can't find anything about this old .3gf
file extension. It is found alongside libblas.so.3
and libblas.so
. What does .3gf
represent?

- 163
1 Answers
Typically a shared library comes with a file and two symbolic links:
- The file
libfoo.so.1.2.3
(with multiple numbers after.so
) is named after the version of the library as a software project. It isn't used directly, only through one of the two symbolic links. - The symbolic link
libfoo.so.V
(with a single number after.so
) is named after the “soversion” (shared object version). The soversion changes every time there is an incompatible change in the library's ABI. Programs are linked against a specific soversion of the library. You can have different versions of the library installed, with different soversions, if you have programs that were built against different versions of the library. - The symbolic
libfoo.so
(with no numbers after.so
) is the version for which you have development files installed (headers, static library). If you compile a program, it will be linked with whatever soversionlibfoo.so
points to (which had better be compatible with the header files).
The soversion in the file name is conventionally an integer that is incremented each time there is an incompatible change, but it doesn't have to be.
For a some time, Debian maintained two versions of the BLAS library with incompatible APIs: libblas3
with the API of the upstream project, and libblas3gf
with “several minor changes to the C interface”. The libblas3
package installed libblas.so.3
for programs linked against the upstream API and the libblas3gf
package installed libblas.so.3gf
for programs linked against the Debian API.
In 2011, Debian stopped maintaining a separate version of the library. (As far as I understand it, the Debian changes or something like them were merged upstream, and so future versions of libblas3
had everything that the 3gf version had.) So the 3gf version became obsolete, but the .so
file was still available to run existing compiled programs. It took several years for the backward compatibility aliases to be removed. Ubuntu 18.04 still had them, but Ubuntu 20.04 no longer has them.

- 829,060
gf
were chosen? From the link you provided, I wonder if it had something to do with libgfortran3, a dependency. I had incorrectly assumed that a soversion ought to be machine readable; I guess the versioning is for us mortals. – Erasmus May 11 '21 at 23:17gf
. It could be gfortran. Or maybe the initials of the person who made the modified version. Or maybe based on some description of the patch like “generalized floats” or whatever. – Gilles 'SO- stop being evil' May 12 '21 at 08:21