Score:2

Rofi: symbol lookup error: libgdk_pixbuf-2.0.so.0: undefined symbol: g_task_set_name. But it's there!

in flag

I'm using Ubuntu 20.04 LTS and I just installed Awesome Tiling WM. I run into "symbol lookup error" issues when installing Rofi, even though I can find the symbol in the library it is looking in, and I don't know what to do about that.

Here's what I did:

I install Rofi with

~$ sudo apt install rofi

But when I run it, I get

~$ rofi
rofi: symbol lookup error: ~/anaconda3/envs/py37/lib/./libgdk_pixbuf-2.0.so.0: undefined symbol: g_task_set_name

However, the symbol g_task_set_name is in the library at that location:

~$ nm -D --with-symbol-versions ~/anaconda3/envs/py37/lib/./libgdk_pixbuf-2.0.so.0 | grep g_task_set_name
             U g_task_set_name

(I've seen elsewhere that the version of these symbols matter, but I'm not seeing any version after this symbol. I don't know what that means, some of the other symbols in that library show version after the name.)

Furthermore, when I run rofi from inside the folder with the library there is no problem:

~/anaconda3/envs/py37/lib$ rofi
Rofi is unsure what to show.
Please specify the mode you want to show.

rofi -show {mode}

The following modi are enabled:
 * window
 * run
 * ssh

The following can be enabled:
 * windowcd
 * drun
 * combi
 * keys

To activate a mode, add it to the list of modi in the modi setting.

In the end I want to add rofi to a key binding in awesomeWM. So a work around might be to have the command always run from this folder somehow. But I don't know how to do that.

While trying to solve the issue more thoroughly I get more confused. I find the same library in two other locations, one for 32-bit and one for 64-bit.

~$ dpkg -S libgdk_pixbuf-2.0.so.0
libgdk-pixbuf2.0-0:amd64: /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4000.0
libgdk-pixbuf2.0-0:amd64: /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
libgdk-pixbuf2.0-0:i386: /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0
libgdk-pixbuf2.0-0:i386: /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0.4000.0

The symbol in neither of these libraries:

~$ nm -D --with-symbol-versions /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 | grep g_task_set_
                 U g_task_set_return_on_cancel
                 U g_task_set_source_tag
                 U g_task_set_task_data

(with identical output for the library in the i386 folder). But rofi still runs from the 64-bit folder:

/usr/lib/x86_64-linux-gnu$ rofi
Rofi is unsure what to show.
Please specify the mode you want to show.

    rofi -show {mode}

...

But not from the 32-bit folder:

/usr/lib/i386-linux-gnu$ rofi
rofi: symbol lookup error: /home/martin/anaconda3/envs/py37/lib/./libgdk_pixbuf-2.0.so.0: undefined symbol: g_task_set_name

I'd like help to get Rofi working, preferably through solving the problem but workarounds would be good too.

I'd also appreciate help just to understand what is going on. I don't understand how rofi goes about looking for libraries and symbols. Why can't it find the symbols in the libraries? And why does rofi only run in two of the three folders containing the library, even though only one of those two folders has a library with the right symbol?

Thanks in advance

N0rbert avatar
zw flag
You have to exclude Anaconda from PATH and LD_LIBRARY_PATH and then retry running `rofi`. Or simply deactivate Anaconda for one run.
in flag
It works! thank you! I went into .bashrc and removed the line where I had added all the anaconda folders to LD_LIBRARY_PATH. But now I imagine there will be python packages that used those library paths and wont find them again. Maybe that can be solved by adding those library paths to PYTHONPATH instead?
N0rbert avatar
zw flag
I'm not sure about PYTHONPATH, so I wrote an answer basing on above comment.
Score:1
zw flag

You have to exclude Anaconda from $PATH and $LD_LIBRARY_PATH environment variables and then retry running rofi.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.