Xpra: Ticket #2672: Library errors Xpra-Python3-x86_64-4.0-r25729.dmg on OSX 10.12

I'm not sure if the library errors are being caused by continuing to use 10.12 (are the 4.0 clients for OSX expecting libraries from 10.14?), or if it is because I installed the .dmg in ~/Downloads/Xpra-Python3-x86_64-4.0-r25729 (so I can have multiple versions installed... I then cd into the MacOS directory of each install and manually run ./Xpra attach - which used to work)... or if there is a genuine issue with the libraries.

Obviously (mostly), I downloaded the Xpra-Python3-x86_64-4.0-r25729.dmg build from your beta repo.

I then created a directory in the Downloads folder to drag the dmg into, then dragged the app from the installer into the newly made folder, rather than the applications folder icon in the installer.

Trying to then connect to a server, I get this traceback client-side.

Schadenfreude:MacOS Schadenfreude$ ./Xpra attach tcp:10.0.3.148:1234
** (process:1215): WARNING **: 14:52:45.642: Failed to load shared library '/Users/macos/gtk/inst/lib/libgdk-3.0.dylib' referenced by the typelib: dlopen(/Users/macos/gtk/inst/lib/libgdk-3.0.dylib, 9): Symbol not found: _NSPasteboardTypeURL
  Referenced from: /Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/libgdk-3.0.dylib
  Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
 in /Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/libgdk-3.0.dylib
xpra initialization error:
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/scripts/main.py", line 107, in main
    defaults = make_defaults_struct()
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/scripts/config.py", line 1202, in make_defaults_struct
    defaults = read_xpra_defaults(username, uid, gid)
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/scripts/config.py", line 372, in read_xpra_defaults
    dirs = get_xpra_defaults_dirs(username, uid, gid)
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/scripts/config.py", line 393, in get_xpra_defaults_dirs
    dirs = get_default_conf_dirs() + get_system_conf_dirs() + get_user_conf_dirs(uid)
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/platform/paths.py", line 65, in get_default_conf_dirs
    return envaslist_or_delegate("XPRA_DEFAULT_CONF_DIRS", do_get_default_conf_dirs)
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/platform/paths.py", line 27, in envaslist_or_delegate
    return impl(*args)
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/paths.py", line 75, in do_get_default_conf_dirs
    return [os.path.join(get_resources_dir(), "etc", "xpra")]
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/platform/paths.py", line 176, in get_resources_dir
    return env_or_delegate("XPRA_RESOURCES_DIR", do_get_resources_dir)
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/platform/paths.py", line 32, in env_or_delegate
    return impl(*args)
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/paths.py", line 27, in do_get_resources_dir
    macapp = get_OSXApplication()
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/__init__.py", line 37, in get_OSXApplication
    from gi.repository import GtkosxApplication #@UnresolvedImport
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/gi/importer.py", line 145, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "importlib/__init__.pyc", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/gi/importer.py", line 145, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "importlib/__init__.pyc", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/gi/importer.py", line 146, in load_module
    dynamic_module = load_overrides(introspection_module)
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/gi/overrides/__init__.py", line 118, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "importlib/__init__.pyc", line 127, in import_module
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/gi/overrides/Gdk.py", line 83, in <module>
    Color = override(Color)
  File "/Users/Schadenfreude/Downloads/Xpra-Python3-x86_64-4.0-r25729/Xpra.app/Contents/Resources/lib/python/gi/overrides/__init__.py", line 195, in override
    assert g_type != TYPE_NONE

A quick check shows that I definitely don't have a 'macos' directory in my /Users/ directory.

Schadenfreude:MacOS Schadenfreude$ ls -la /Users/
total 0
drwxr-xr-x   7 root           admin    238 Nov  5  2016 .
drwxr-xr-x  32 root           wheel   1156 Oct  6 08:15 ..
-rw-r--r--   1 root           wheel      0 Jul 30  2016 .localized
drwxr-xr-x+ 12 Guest          _guest   408 Nov  5  2016 Guest
drwxr-xr-x+ 48 Schadenfreude  staff   1632 Mar 17 12:00 Schadenfreude
drwxrwxrwt   5 root           wheel    170 Feb 14  2019 Shared
drwxr-xr-x+ 11 notalex        staff    374 Jul 15  2015 notalex

I would try moving to the /Applications directory to try again, but the /Users/macos/ directory would still not exist (let me know if you'd like me to try though, maybe the installer just got confused by my trick?).



Tue, 24 Mar 2020 07:00:01 GMT - Antoine Martin: status, description changed

Ah. That's because the 4.0 builds are supposed to require 10.14 or later IIRC, but I forgot to bump the LSMinimumSystemVersion, which would have given you a nice warning message instead of failing with symbol errors.

The question now is, do I:

I think I will attempt (2) after making a backup. This is going to take time..


Tue, 24 Mar 2020 10:27:10 GMT - Antoine Martin: summary changed


Tue, 24 Mar 2020 15:50:44 GMT - Antoine Martin: owner, status changed

Rebuilt everything with min_sdk=10.12, and updated the manifest so we require 10.12: r25762. There's a new build (just without the manifest change) in the beta area.

Tested OK on a 10.12.x VM.

BTW, there are 4.0 builds in the beta area which I have built using the "old" 10.11.x VM which is normally used for making 3.0.x LTS builds. Those also work. (ie: the r25756 builds does work IIRC)

Note to self: I shouldn't do that, as it could be confusing if one version exhibits a problem and another doesn't - this is not necessarily a code change - could just be a library change / build env bug.


Thu, 26 Mar 2020 22:20:25 GMT - alas:

Handy for those, like me, that are paranoid about Mac changing library structures... looks like Xpra-Python3-x86_64-4.0-r25761.dmg does indeed work with a 4.0-r25719 Fedora 30 server.

I also double checked, works against the 3.0.7-r25627 server I get from the stable repo also.

So, guess I'll close this and say thanks.


Thu, 26 Mar 2020 22:20:31 GMT - alas: status changed; resolution set


Sat, 28 Mar 2020 02:30:30 GMT - Antoine Martin:

Forgot to bump the version requirements for the PKG: r25801.


Sun, 29 Mar 2020 15:39:57 GMT - Antoine Martin:

The new builds were crashing in the opengl probing code (looked like memory corruption), so I had to revert r25801 and r25762: r25853.

I even tried rebuilding everything, from scratch. Twice.

v4 will require 10.14 or later. Sorry. At least now the OS will give a better warning message rather than an error.


Mon, 30 Mar 2020 13:14:18 GMT - Antoine Martin:

I refused to let this go because I want the new build VM (#2505) to be reliable, and rebuilding everything from scratch does reproduce the bug. Almost a full day later, the problem comes from r25775 (gtk bumped from 3.24.10 to 3.24.14) now reverted in r25870. So in theory, we could still allow 10.12+ and make it work..


Mon, 30 Mar 2020 16:40:06 GMT - Antoine Martin:

So in theory, we could still allow 10.12+ and make it work..

Done in r25871.

The latest beta builds require 10.12 or later.


Sat, 22 Aug 2020 05:14:08 GMT - Antoine Martin:

Almost a full day later, the problem comes from r25775 (gtk bumped from 3.24.10 to 3.24.14) now reverted in r25870.

See also #2822


Sat, 23 Jan 2021 05:57:42 GMT - migration script:

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