How do I check which of a shared library dependencies aren't loaded?

This morning, I updated Endeavour OS with yay -Syu. One of the updated packages was extra/graphviz, which got a minor update.

yay -Syu output contained the following lines.

Warning: Could not load “/usr/lib/graphviz/libgvplugin_gs.so.6” - It was found, so perhaps one of its dependents was not. Try ldd.
Warning: Could not load “/usr/lib/graphviz/libgvplugin_gs.so.6” - It was found, so perhaps one of its dependents was not. Try ldd.

How do I check with ldd which dependencies of /usr/lib/graphviz/libgvplugin_gs.so.6 haven’t been loaded?
After I understand which dependencies caused those warnings, what should I do?

Just put them in a line with a space in between :slightly_smiling_face:

ldd /usr/lib/graphviz/libgvplugin_gs.so.6

I am having this issue as well and it looks like it is already reported here:

I guess we should wait for it to be fixed upstream.

2 Likes

I thought ldd was the linker and wondered in which way a linker would show which shared libraries weren’t loaded. :sweat_smile: :man_facepalming:
In my defense, I can say that ldd --help doesn’t even say what that command is. :wink:

Usage: ldd [OPTION]... FILE...
      --help              print this help and exit
      --version           print version information and exit
  -d, --data-relocs       process data relocations
  -r, --function-relocs   process data and function relocations
  -u, --unused            print unused direct dependencies
  -v, --verbose           print all information

On the bright side, the output of ldd /usr/lib/graphviz/libgvplugin_gs.so.6 shows every dependencies is loaded. At least, that is what I guess, since the command output are lines like the following, where the part in parentheses should be the address where the shared library is loaded.

libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007fae9c05c000)

I learned a lesson: Instead of checking what the command help says, check what the output of man for that command is. Chances are it gives more useful information.

NAME
       ldd - print shared object dependencies

SYNOPSIS
       ldd [option]... file...

DESCRIPTION
       ldd prints the shared objects (shared libraries) required by each program or shared object specified on the command line.
       An example of its use and output is the following:

           $ ldd /bin/ls
               linux-vdso.so.1 (0x00007ffcc3563000)
               libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f87e5459000)
               libcap.so.2 => /lib64/libcap.so.2 (0x00007f87e5254000)
               libc.so.6 => /lib64/libc.so.6 (0x00007f87e4e92000)
               libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f87e4c22000)
               libdl.so.2 => /lib64/libdl.so.2 (0x00007f87e4a1e000)
               /lib64/ld-linux-x86-64.so.2 (0x00005574bf12e000)
               libattr.so.1 => /lib64/libattr.so.1 (0x00007f87e4817000)
               libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f87e45fa000)

print shared object dependencies should make clear ldd is not the linker but the command that shows the information I was looking for.

1 Like

I am not at the machine where I had this issue updating but when I ran the ldd command at the very top was a library without => to point to any path where it should be found. That would be the “missing link”.

Edit:
Ah, I see your edit now, so there you have it:

Yes, you are (indeed) right.

linux-vdso.so.1 (0x00007ffd3e580000)

It’s the first entry shown. I guess I didn’t pay attention to that also because I thought that number was a memory address.

What I shown in the previous comment is the output of man ldd, though. I find interesting it shows the same line I get with ldd /usr/lib/graphviz/libgvplugin_gs.so.6 but for ldd /bin/ls.

1 Like

Although Graphviz is required by Gimp, it’s only for the visualisation of data in graph form or similar. I’ve just been using Gimp without any issues. I guess it’s not much of an issue for many folk. It doesn’t seem to be a major component. Hope fully upstream will resolve it. :man_shrugging:

It seems that is the virtual ELF dynamic shared object the kernel automatically maps into the address space of all user-space applications. If I understand correctly, it cannot be a missing shared library.

1 Like

Apparently, that warning doesn’t mean Graphviz won’t work as expected. It seems more a false positive given from the installation or a temporary glitch.

I correct myself: There is an issue that needs to be fixed, but it’s not a missing dependency like the warning suggests.

It seems the issue isn’t a missing dependency, as the warning suggests, but libgvplugin_gs.so that tries to access a symbol that isn’t exposed anymore from libgs.so (/usr/lib/libgs.so). Effectively, there is an issue that needs to be fixed.

1 Like

I just got the exact same message when updating my system today, what is the impact of this? I restart the laptop and now have no issues using it (at least for now…).

btw, all we can do is to wait for an fix update?

It’s one of the Graphviz plugins that isn’t loadable. Graphviz itself is used by GIMP to create diagrams.
If you don’t use that functionality, you won’t notice any change. GIMP opens as usual and it works as always.

We can just wait for a fix. GIMP requires Graphviz; it’s not possible to remove the latter without removing the first.

2 Likes

for future use, the command that shows the error in question is

$ ldd -d filename
(long list of correct files, most of which are links, and then at the bottom:)
undefined symbol: gs_error_names (/usr/lib/graphviz/libgvplugin_gs.so.6)

2 Likes

Now that you helped me in understanding what man ldd was saying about the -d option, I can say that ldd -r reports every missing functions and objects.

New in testing repo:

graphviz 5.0.1-2 -> 5.0.1-3

It looks as if the issue has been addressed:

Package (1)       Old Version  New Version  Net Change  Download Size

testing/graphviz  5.0.1-2      5.0.1-3        0.00 MiB       3.59 MiB

Total Download Size:   3.59 MiB
Total Installed Size:  9.92 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 graphviz-5.0.1-3-x86_64                                                                             3.6 MiB  4.07 MiB/s 00:01 [#############################################################################] 100%
(1/1) checking keys in keyring                                                                                                 [#############################################################################] 100%
(1/1) checking package integrity                                                                                               [#############################################################################] 100%
(1/1) loading package files                                                                                                    [#############################################################################] 100%
(1/1) checking for file conflicts                                                                                              [#############################################################################] 100%
(1/1) checking available disk space                                                                                            [#############################################################################] 100%
:: Processing package changes...
(1/1) upgrading graphviz                                                                                                       [#############################################################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Warn about old perl modules

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.