What does version info in ldd -v mean?

2019-07-16 01:41发布

Version information:
    /usr/lib/lapack/liblapack.so:
        libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
        libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        libgcc_s.so.1 (GCC_4.0.0) => /lib/x86_64-linux-gnu/libgcc_s.so.1
        libgfortran.so.3 (GFORTRAN_1.0) => /usr/lib/x86_64-linux-gnu/libgfortran.so.3
        libgfortran.so.3 (GFORTRAN_1.4) => /usr/lib/x86_64-linux-gnu/libgfortran.so.3
        libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6

So there are 3 rows of libc.so.6, versioned at GLIBC_2.xx.

What does that mean? What version of libc.so.6 does this liblapack.so require?

How can I get liblapack.so's version?

1条回答
smile是对你的礼貌
2楼-- · 2019-07-16 02:10

What does that mean?

It means that liblapack.so requires versioned symbols from libc.so.6 with versions GLIBC_2.2.5, GLIBC_2.4 and GLIBC_2.14. You can read about versioned symbols here.

What version of libc.so.6 does this liblapack.so require?

It requires 2.14 or newer. In general, GLIBC never removes symbols, only adds new ones, and so will still provide symbols versioned at GLIBC_2.2.5 even in the latest GLIBC-2.24.

If it did ever remove such "old" versioned symbol, that would break any old binaries that depended on that symbol (which is why it's not done).

How can I get liblapack.so's version?

It doesn't look like liblapack.so itself is using any versioned symbols. You can look at your package manager to find out what version of liblapack.so you have. Something like:

dpkg -S /usr/lib/lapack/liblapack.so
liblapack-dev: /usr/lib/lapack/liblapack.so

dpkg -l liblapack-dev
...
ii  liblapack-dev  3.5.0-2ubuntu1  amd64 Library of linear algebra routines 3 - static version
查看更多
登录 后发表回答