Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol lookup error: undefined symbol: _glapi_tls_Current #556

Closed
alxv-su opened this issue Mar 5, 2020 · 20 comments
Closed

Symbol lookup error: undefined symbol: _glapi_tls_Current #556

alxv-su opened this issue Mar 5, 2020 · 20 comments

Comments

@alxv-su
Copy link

alxv-su commented Mar 5, 2020

System information

SolveSpace version: 3.0~fcb2757d

Operating system: Debian 9.12

Behavior

I get "symbol lookup error: undefined symbol: _glapi_tls_Current" when I try to run solvespace:

$ snap run solvespace
/snap/solvespace/16/usr/bin/solvespace: symbol lookup error: /snap/solvespace/16/gnome-platform/usr/lib/x86_64-linux-gnu/libGL.so.1: undefined symbol: _glapi_tls_Current

Additional information

I use proprietary nvidia driver 390.116.

@ppd
Copy link
Member

ppd commented Mar 5, 2020

Is your system glvnd enabled? I.e. do you have stuff in /var/lib/snapd/lib/glvnd/egl_vendor.d?

Provide the output of snap version too, please.

@alxv-su
Copy link
Author

alxv-su commented Mar 5, 2020

ppd, thank you for reply!
My /var/lib/snapd/lib/glvnd/ directory is empty.

root@kitchen:~# snap version
snap    2.43.3
snapd   2.43.3
series  16
debian  9
kernel  4.9.0-12-amd64

I have installed all packages that contains glvnd (except nonglvnd) and nvidia in their names from Debian repository. After reboot I still have same error.

@ppd
Copy link
Member

ppd commented Mar 5, 2020

That's quite odd. Will try on my nvidia machine at work.

@ppd
Copy link
Member

ppd commented Mar 6, 2020

My /var/lib/snapd/lib/glvnd/ directory is empty.

Apologies. It's only non-empty from the perspective of the snap. Could you do the following?

mfederle@maxi:~$ snap run --shell solvespace
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

mfederle@maxi:/home/mfederle$ ls -al /var/lib/snapd/lib/glvnd/egl_vendor.d/
total 0
drwxr-xr-x 2 root mfederle 60 Mär  6 09:32 .
drwxrwxrwt 3 root mfederle 60 Mär  6 09:32 ..
lrwxrwxrwx 1 root mfederle 65 Mär  6 09:32 10_nvidia.json -> /var/lib/snapd/hostfs/usr/share/glvnd/egl_vendor.d/10_nvidia.json

It should have somewhat comparable output.

@ppd
Copy link
Member

ppd commented Mar 6, 2020

Do you have libglvnd0-nvidia installed? I've seen a few workarounds that mention removing libglvnd0-nvidia and installing libglvnd0.

@alxv-su
Copy link
Author

alxv-su commented Mar 6, 2020

I have same file:

user@kitchen:~$ snap run --shell solvespace
user@kitchen:/home/user$ ls -al /var/lib/snapd/lib/glvnd/egl_vendor.d
total 0
drwxr-xr-x 2 root user 60 Mar  5 22:38 .
drwxrwxrwt 3 root user 60 Mar  5 22:38 ..
lrwxrwxrwx 1 root user 65 Mar  5 22:38 10_nvidia.json -> /var/lib/snapd/hostfs/usr/share/glvnd/egl_vendor.d/10_nvidia.json

Yes, I have libglvnd0-nvidia installed.
I'm just replaced libglvnd0-nvidia with libglvnd0. Now solvespace runs but with text "Unable to create a GL context" in every window.

@ppd
Copy link
Member

ppd commented Mar 6, 2020

Fair enough. So the bug wasn't related to the snap package.

Now solvespace runs but with text "Unable to create a GL context" in every window.

That's unrelated. What GPU do you have? I think Gtk::GLArea requires >= OpenGL 3.0 features. I wonder if it's possible that your card or driver is too old. But that seems a bit unlikely 🤔

@alxv-su
Copy link
Author

alxv-su commented Mar 6, 2020

GeForce GTX 950.

$ glxinfo | grep 'OpenGL version'
OpenGL version string: 4.6.0 NVIDIA 390.116

@ppd
Copy link
Member

ppd commented Mar 6, 2020

I ran Debian 9 from a USB stick and installed nvidia-driver via stretch-backports.

The good news: I can reproduce the issue.
The bad news: It is not specific to solvespace. Other snaps fail just the same with something like:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

So clearly we're not using the nvidia driver for some reason, yet snapd seems to expose it just fine at a first glance. Something's probably different in the packaging or setup of the Debian driver vs. the Ubuntu one.

@ppd
Copy link
Member

ppd commented Mar 6, 2020

Support request upstream: https://forum.snapcraft.io/t/no-opengl-on-debian-9-nvidia/15848

Further investigation shows that it's certainly not a solvespace bug. Also, this investigation is way beyond the scope of the issue's title...

I quote

It looks like Debian is now using the alternatives system to allow multiple libGL implementations to exist with the option to switch between them. I think this will need some snapd changes in the opengl interface to allow the symlink to be followed.

@whitequark We should probably close this or maybe create an "info issue" with those details until snapd receives the necessary fixes.

@alxv-su
Copy link
Author

alxv-su commented Mar 7, 2020

Is it possible somehow to workaround this problem?
I install Debian 10 on second hard drive and it has same problem.

@ppd
Copy link
Member

ppd commented Mar 7, 2020

You could install the nvidia driver from the official installer or use the nouveau driver.

Whether the layout of the official Nvidia driver is compatible with current snapd is another question. Probably, but I haven't tried myself.

@alxv-su
Copy link
Author

alxv-su commented Mar 7, 2020

I just installed nvidia driver 440.64 from the official installer.
Again, solvespace runs but with text "Unable to create a GL context" in every window.

@alxv-su
Copy link
Author

alxv-su commented Mar 7, 2020

I installed nouveau driver. Solvespace runs, but 3D graphics in other applications is slow.

@whitequark
Copy link
Contributor

Is it possible somehow to workaround this problem?

This isn't ideal but building SolveSpace from source should make it work. (Ideally the snap should still be fixed.)

@ppd
Copy link
Member

ppd commented Mar 8, 2020

Or run it without any of the snap confinement:

mfederle@maxi-xps:~$ cd /snap/solvespace/current
mfederle@maxi-xps:/snap/solvespace/current$ LD_LIBRARY_PATH="$(pwd)/lib:$(pwd)/usr/lib:$(pwd)/usr/lib/x86_64-linux-gnu" ./usr/bin/solvespace
SolveSpace!

Missing (absent) translation for '&Helix'
Missing (absent) translation for 'Re&volve'
Missing (absent) translation for 'Show &Underconstrained Points'
^C
mfederle@maxi-xps:/snap/solvespace/current$ 

It might need a few libraries from the core snap, but hopefully the rest is available and compatible on Debian 9.

@ppd
Copy link
Member

ppd commented Mar 8, 2020

@whitequark

(Ideally the snap should still be fixed.)

The fix will come by update of the snap daemon itself, as it does some magic to expose the nvidia libraries from the host to the app within the snap. We do not ship proprietary drivers in the snap, only the mesa stack, afaik.

@ppd
Copy link
Member

ppd commented Mar 10, 2020

Upstream bug: https://bugs.launchpad.net/snapd/+bug/1866855

@alxv-su
Copy link
Author

alxv-su commented Mar 10, 2020

Or run it without any of the snap confinement:

mfederle@maxi-xps:~$ cd /snap/solvespace/current
mfederle@maxi-xps:/snap/solvespace/current$ LD_LIBRARY_PATH="$(pwd)/lib:$(pwd)/usr/lib:$(pwd)/usr/lib/x86_64-linux-gnu" ./usr/bin/solvespace

This workaround works! Thank you! :)

@ppd
Copy link
Member

ppd commented Mar 18, 2020

For the sake of completeness, I quote upstream's findings:

I think right now we have no chance to fix it.

So don't hold your breath; it might take a while...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants