Ubuntu 17.10: compton: undefined symbol: glFramebufferTexture2D

Asked by Justin V

Using Ubuntu 17.10 with Ubuntu packages for virtualbox, and it mostly work.

However, compton fails at startup.

$ compton
compton: symbol lookup error: compton: undefined symbol: glFramebufferTexture2D

It references glFramebufferTexture2D, but libGL.so.1 only has *2DEXT (ie: not *2D).

$ objdump -T /usr/bin/compton | grep glFramebufferTexture2D
0000000000000000 DF *UND* 0000000000000000 glFramebufferTexture2D
$ objdump -T /usr/lib/virtualbox/additions/libGL.so.1 | grep glFramebufferTexture2D
0000000000072540 g DF .text 0000000000000015 Base glFramebufferTexture2DEXT
$ dpkg -S /usr/bin/compton
compton: /usr/bin/compton
$ dpkg -S /usr/lib/virtualbox/additions/libGL.so.1
virtualbox-guest-x11: /usr/lib/virtualbox/additions/libGL.so.1
$ apt-cache policy compton
compton:
  Installed: 0.1~beta2+20150922-1
  Candidate: 0.1~beta2+20150922-1
  Version table:
 *** 0.1~beta2+20150922-1 500
        500 http://us.archive.ubuntu.com/ubuntu artful/universe amd64 Packages
        100 /var/lib/dpkg/status
$ apt-cache policy virtualbox-guest-x11
virtualbox-guest-x11:
  Installed: 5.1.30-dfsg-1
  Candidate: 5.1.30-dfsg-1
  Version table:
 *** 5.1.30-dfsg-1 500
        500 http://us.archive.ubuntu.com/ubuntu artful/multiverse amd64 Packages
        100 /var/lib/dpkg/status

Tried artful-proposed which contains 5.1.34, but no better:

$ compton
compton: symbol lookup error: compton: undefined symbol: glFramebufferTexture2D
$ objdump -T /usr/lib/virtualbox/additions/libGL.so.1 | grep glFramebufferTexture2D
0000000000072580 g DF .text 0000000000000015 Base glFramebufferTexture2DEXT
$ apt-cache policy virtualbox-guest-x11
virtualbox-guest-x11:
  Installed: 5.1.34-dfsg-0ubuntu1.17.10.2
  Candidate: 5.1.34-dfsg-0ubuntu1.17.10.2
  Version table:
 *** 5.1.34-dfsg-0ubuntu1.17.10.2 500
        500 http://us.archive.ubuntu.com/ubuntu artful-proposed/multiverse amd64 Packages
        100 /var/lib/dpkg/status
     5.1.30-dfsg-1 500
        500 http://us.archive.ubuntu.com/ubuntu artful/multiverse amd64 Packages

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu virtualbox Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

What output do you receive for
$ objdump -T /usr/lib/x86_64-linux-gnu/libGL.so.1 | grep glFramebufferTexture2D
and/or
$ objdump -T /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 | grep glFramebufferTexture2D
(if one of these libraries exists)

Is Ubuntu 17.10 the virtualbox host or the guest system?

Revision history for this message
Justin V (justin8492) said :
#2

# find / -xdev -name libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
/usr/lib/virtualbox/additions/libGL.so.1
# objdump -T /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 | grep glFramebufferTexture2D
0000000000054ac0 g DF .text 0000000000000000 Base glFramebufferTexture2DEXT
0000000000054ac0 g DF .text 0000000000000000 Base glFramebufferTexture2D

Ubuntu 17.10 is the guest. Windows is the host.

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

The /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 library contains the desired glFramebufferTexture2D function, but /usr/lib/virtualbox/additions/libGL.so.1 apparently doesn't. And <I assume that the wrong one is picked up first.

What is the output of
ldd /usr/bin/compton

Maybe a command like
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/mesa/ compton
allows you to start compton

Revision history for this message
Justin V (justin8492) said :
#4

The package installs an ld.so.conf patch:

$ cat /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf
/usr/lib/virtualbox/additions
$ ls -la /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf
lrwxrwxrwx 1 root root 42 Nov 16 21:44 /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf
$ ls -l /etc/alternatives/x86_64-linux-gnu_gl_conf
lrwxrwxrwx 1 root root 46 Nov 16 21:44 /etc/alternatives/x86_64-linux-gnu_gl_conf -> /usr/lib/virtualbox/additions/00vboxvideo.conf

I'll try the LD_LIBRARY_PATH.

Revision history for this message
Justin V (justin8492) said :
#5

The LD_LIBRARY_PATH fixed it.

I switched alternatives to the libgl1-mesa-glx package. Both /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf and _ELG.conf point to

# ls -l /etc/ld.so.conf.d/x86*GL.conf
lrwxrwxrwx 1 root root 43 Nov 16 21:44 /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf -> /etc/alternatives/x86_64-linux-gnu_egl_conf
lrwxrwxrwx 1 root root 42 Nov 16 21:44 /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf

# update-alternatives --list x86_64-linux-gnu_gl_conf
/usr/lib/virtualbox/additions/00vboxvideo.conf
/usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
# update-alternatives --list x86_64-linux-gnu_egl_conf
/usr/lib/virtualbox/additions/00vboxvideo.conf
/usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf

If the EGL alternative points to virtualbox, it picks up libGL.so.1 from that directory. So, both GL and EGL need to be updated:

# update-alternatives --set x86_64-linux-gnu_egl_conf /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf
update-alternatives: using /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in manual mode
# update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
update-alternatives: using /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in manual mode
# ldconfig
# ldd /usr/bin/compton | grep libGL
        libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007fcaa8cb7000)

# dpkg -S /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
libgl1-mesa-glx:amd64: /usr/lib/x86_64-linux-gnu/mesa/ld.so.conf
# dpkg -S /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf
libegl1-mesa:amd64: /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf
# dpkg -S /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
libgl1-mesa-glx:amd64: /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1

Now, compton works (though, only because I am not using virtualbox's libGL.so.1).

Don't know whether to mark this as "problem solved" or not since this is more of a workaround than a solution (particularly with respect to virtualbox package), but compton is working.

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Glad to hear that you found a workaround.
Eventually this could be reported as bug at virtualbox.org

Revision history for this message
Justin V (justin8492) said :
#7

Can you help with this problem?

Provide an answer of your own, or ask Justin V for more information if necessary.

To post a message you must log in.