xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 18 months ago

Closed 18 months ago

Last modified 10 months ago

#2801 closed defect (fixed)

cannot import native OpenGL module (--with-opengl) when there is no sound module (--without-sound)

Reported by: mehw Owned by: Antoine Martin
Priority: minor Milestone: 4.1
Component: client Version: 4.0.x
Keywords: opengl sound Cc:



OS: Gentoo
Xpra version: 4.0.2


Run setup.py with the following options:

--with-opengl --without-sound

Start both server and client on the local machine:

xpra start :7
xpra attach :7

Starting the client gives the following error:

Warning: cannot import native OpenGL module
 No module named 'xpra.sound'

Possible cause

The changeset 25991 introduced the use of the function force_enabled imported from the sound module in gl_check.py. Despite the fact that it requires one argument, it is used without when checking OpenGL. I believe that force_enable is meant to be used instead, which doesn't require to import the sound module. Hence OpenGL can be checked with no sound module.

Possible solution

diff -Nuar a/xpra/client/gl/gl_check.py b/xpra/client/gl/gl_check.py
--- a/xpra/client/gl/gl_check.py	2020-05-10 19:00:53.000000000 +0200
+++ b/xpra/client/gl/gl_check.py	2020-06-07 21:28:48.167122367 +0200
@@ -12,7 +12,6 @@
 from xpra.os_util import POSIX, OSX, bytestostr
 from xpra.log import Logger, CaptureHandler
 from xpra.client.gl.gl_drivers import WHITELIST, GREYLIST, VERSION_REQ, BLACKLIST, OpenGLFatalError
-from xpra.sound.gstreamer_util import force_enabled
 log = Logger("opengl")
@@ -130,7 +129,7 @@
         from OpenGL.GL import GL_VERSION, GL_EXTENSIONS
         from OpenGL.GL import glGetString, glGetIntegerv
         gl_version_str = glGetString(GL_VERSION)
-        if gl_version_str is None and not force_enabled:
+        if gl_version_str is None and not force_enable:
             raise_fatal_error("OpenGL version is missing - cannot continue")
             return props
         #b'4.6.0 NVIDIA 440.59' -> ['4', '6', '0 NVIDIA...']
@@ -147,7 +146,7 @@
             props["opengl"] = gl_major, gl_minor
             MIN_VERSION = (1,1)
             if (gl_major, gl_minor) < MIN_VERSION:
-                if not force_enabled:
+                if not force_enable:
                     raise_fatal_error("OpenGL output requires version %s or greater, not %s.%s" %
                                   (".".join([str(x) for x in MIN_VERSION]), gl_major, gl_minor))
                     return props

Attachments (1)

xpra-4.0-sound-module.patch (2.1 KB) - added by mehw 18 months ago.
proposed patch

Download all attachments as: .zip

Change History (3)

Changed 18 months ago by mehw

Attachment: xpra-4.0-sound-module.patch added

proposed patch

comment:1 Changed 18 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

Thanks, fixed in r26640.

comment:2 Changed 10 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2801

Note: See TracTickets for help on using tickets.