-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Unable to start Xpra (arm64) on m1 #4017
Comments
FYI: I don't have direct access to M1 or M2 Apple hardware to test on so this may take a while. |
Thanks @totaam. How would I go about compiling it with --with-system-ffi ? |
@totaam I'm seeing the same issue here with the apple silicon beta, and would like to try and help. I spent a good part of yesterday trying to build locally using the gtk-osx-build fork, but keep hitting problems (complication failures etc.) To save your time, can you confirm that these instructions are right: https://github.com/Xpra-org/xpra/blob/master/docs/Build/MacOS.md and there are no changes required to running on a almost-newly-installed macOS 13.6 with Xcode 15, commandlinetools installed. Detailed results of trying to get it built. First with architectures=['x86_64']:
Next with architectures=['arm64']: using the following:
I get the following results:
zlib issue. the URL is 404, so I changed the repo url to https://distfiles.macports.org/zlib/ based on quick google search for the tarball name :)
|
That's likely as I never saw perl errors here on any arch.
Perhaps it moved since I used that URL to download the source? (IIRC, this is from gtk-osx-build upstream)
Looks like microsoft/vcpkg#29168 |
Done - Xpra-org/gtk-osx-build#31
Good shout. Traced it through and there looks to be a workaround (disable neon), but also that it's fixed recently. For now I will try the workaround |
OK, now I am getting build failure with cairo, which is looking for a LZO header.
I sollved this by adding 'lzo' as a new module (not 100% sure this is completely right, but it seems to work): a/modulesets-stable/gtk-osx.modules b/modulesets-stable/gtk-osx.modules
index 276bd7b..dae834d 100644
--- a/modulesets-stable/gtk-osx.modules
+++ b/modulesets-stable/gtk-osx.modules
@@ -39,6 +39,9 @@
<repository name="sourceforge"
href="http://downloads.sourceforge.net/sourceforge/"
type="tarball" />
+ <repository name="oberhummer"
+ href="https://www.oberhumer.com/opensource/lzo/download/"
+ type="tarball" />
<repository name="system"
type="system" />
<!--
@@ -194,7 +197,7 @@
<!--
disable-arm-a64-neon and disable-arm-neon are reuquired when building on
Apple Silicon. See https://gitlab.freedesktop.org/pixman/pixman/-/issues/59
- -->
+ -->
<autotools id="pixman"
autogen-sh="configure"
autogenargs="--disable-gtk --disable-mmx --disable-arm-a64-neon --disable-arm-neon">
@@ -206,6 +209,15 @@
<dep package="meta-gtk-osx-bootstrap" />
</after>
</autotools>
+ <!---->
+ <autotools id="lzo"
+ autogen-sh="configure"
+ autogenargs="--disable-dependency-tracking">
+ <branch module="lzo-2.10.tar.gz"
+ version="2.10"
+ hash="sha1:4924676a9bae5db58ef129dc1cebce3baa3c4b5d"
+ repo="oberhummer" />
+ </autotools>
<!--
cairo doesn't really need fontconfig, but if Pango finds
freetype it insists that it has to have fontconfig too and that
@@ -222,6 +234,7 @@
<dep package="meta-gtk-osx-bootstrap" />
<dep package="harfbuzz-no-cairo" />
<dep package="fontconfig" />
+ <dep package="lzo" />
</dependencies>
</meson>
<!----> but, that moves on to the next error!
|
Oh odd. I have never seen this one!
Ah, this one may well be: Xpra-org/gtk-osx-build#19 (comment) |
Very strange.
|
That's the broken bit that needs |
Yes, that did work. For the record I did this:
I'll look to see if I can encourage cmake to actually do that, as the Anyway. Next problem, need to And on to the next one:
"Fixed" that: index 2987b84..26321c9 100644
--- a/xpra-tools.modules
+++ b/xpra-tools.modules
@@ -96,7 +96,7 @@
repo="github.com"/>
</cmake>
- <cmake id="xxhash" cmakeargs="-DCMAKE_INSTALL_PREFIX=" autogen-sh="configure">
+ <cmake id="xxhash" cmakeargs="-DCMAKE_MACOSX_RPATH=FALSE" autogen-sh="configure" cmakedir="cmake_unofficial">
<branch module="/Cyan4973/xxHash/archive/refs/tags/v0.8.2.tar.gz"
version="0.8.2" checkoutdir="xxHash-0.8.2"
hash="sha256:baee0c6afd4f03165de7a4e67988d16f0f2b257b51d0e3cb91909302a26a79c4"
And on to the next error...
EDIT: Just realised this is documented in the build instructions. Will do that.! |
Good, so it's not just me. I had tried to fix it and then gave up on it.
Thanks! Applied. |
For the record. Next problem : libvorbis doesn't build due to an unsupported linker flag. Homebrew fixes this with a patch: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/lib/libvorbis.rb#L45C12-L45C12 I've manually edited |
Next, I had to remove Then, I changed the
AND...
\o/ Now to build Xpra!
OK more homework for me!
Gets further and fails on |
Thanks!
Nice!
There is a problem with |
Without CLIENT_ONLY, I get 'the Xpra html5 client must be installed in ...' which I don't yet know how to solve. With CLIENT_ONLY, I get this:
is that what you were remembering? |
Just install the |
I did that and get the same error:
|
OK I fixed that: ben@Bens-MacBook-Pro MacOS % git diff
diff --git a/packaging/MacOS/make-app.sh b/packaging/MacOS/make-app.sh
index 171853b71..f212759b9 100755
--- a/packaging/MacOS/make-app.sh
+++ b/packaging/MacOS/make-app.sh
@@ -87,7 +87,7 @@ if [ "$?" != "0" ]; then
exit 1
fi
#get the version and build info from the python build records:
-export PYTHONPATH="."
+export PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
VERSION=`${PYTHON} -c "from xpra import __version__;import sys;sys.stdout.write(__version__)"`
REVISION=`${PYTHON} -c "from xpra import src_info;import sys;sys.stdout.write(str(src_info.REVISION))"`
REV_MOD=`${PYTHON} -c "from xpra import src_info;import sys;sys.stdout.write(['','M'][src_info.LOCAL_MODIFICATIONS>0])"`
ben@Bens-MacBook-Pro MacOS %
now gtk-mac-bundler failed. But more progress! |
OK this is why it failed:
hmm...
I'll have to dig into it another time. Thanks for the help so far though! |
That's most definitely wrong.
Could be a compatibility error. You're building git master? What version is the server? |
What am I looking at? |
The big remaining question is whether or not these builds will run on system that don't have the exact same version of |
Looks like PyPi tarball doesn't have setup.py, which jhbuild needs. Add it back using a patch. Xpra-org/xpra#4017 (comment)
Looks like PyPi tarball doesn't have setup.py, which jhbuild needs: *** Checking out python3-setuptools_rust *** [66/137] *** Building python3-setuptools_rust *** [66/137] python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/setuptools-rust-1.8.1 python3: can't open file '/Users/runner/gtk/source/setuptools-rust-1.8.1/setup.py': [Errno 2] No such file or directory *** Error during phase build of python3-setuptools_rust: ########## Error running python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/setuptools-rust-1.8.1 *** [66/137] Add it back using a patch. Xpra-org/xpra#4017 (comment)
Looks like PyPi tarball doesn't have setup.py, which jhbuild needs: 2024-02-06T16:42:10.5816920Z *** Building python3-idna *** [90/137] 2024-02-06T16:42:10.5822330Z python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/idna-3.6 2024-02-06T16:42:10.7839920Z python3: can't open file '/Users/runner/gtk/source/idna-3.6/setup.py': [Errno 2] No such file or directory 2024-02-06T16:42:10.8055060Z *** Error during phase build of python3-idna: ########## Error running python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/idna-3.6 *** [90/137] https://github.com/cpatulea/gtk-osx-build/actions/runs/7802110330/job/21278777736 Add it back using a patch. Xpra-org/xpra#4017 (comment)
Fixes build failure: 2024-02-07T00:13:44.1632550Z In file included from Modules/_AVFoundation.m:12: 2024-02-07T00:13:44.1634070Z Modules/_AVFoundation_protocols.m:80:28: error: cannot find protocol declaration for 'AVCapturePhotoOutputReadinessCoordinatorDelegate' 2024-02-07T00:13:44.1635400Z p = PyObjC_IdToPython(@protocol(AVCapturePhotoOutputReadinessCoordinatorDelegate)); 2024-02-07T00:13:44.1636240Z ^ 2024-02-07T00:13:44.1667560Z 1 error generated. 2024-02-07T00:13:44.1769500Z error: command '/Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' failed with exit code 1 2024-02-07T00:13:44.2675810Z *** Error during phase build of python3-pyobjc-framework-avfoundation: ########## Error running python3 setup.py build --build-base /Users/runner/.cache/jhbuild/build/pyobjc-framework-AVFoundation-10.0 *** [101/137] CI log: https://github.com/cpatulea/gtk-osx-build/actions/runs/7806902536/job/21294198714 Issue: ronaldoussoren/pyobjc#572 Cc: Xpra-org/xpra#4017
@pefribeiro / @puremourning / @sejtam does the latest build work for you guys ( https://xpra.org/beta/MacOS/arm64/ |
I can confirm that 6.0-r35120 fixed it for me on my m1. |
I'll try in a few days when I'm back with my M2
|
This seems to work also now on my M2. I say seems, because I have not yet figured out how to make the GUI clients on OSX use SSH with a public-key (ie passwordless). |
Thanks for all the efforts, but I'm afraid it doesn't seem to work here:
Any help much appreciated. |
@pefribeiro this looks fine, only the server failed to accept your connection. Perhaps it is out of date. |
Ok, thanks. What server versions does the Xpra client v6 handle? Is v4 too old? |
|
I'm having a similar problem with Xpra 6, downloaded today from https://xpra.org/dists/MacOS/arm64/Xpra.pkg, on Mac OS Sonoma 14.4.1 with Apple silicon: $ uname -a
Darwin macaw.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020 arm64 arm Darwin
$ xpra
grep: /usr/share/locale/locale.alias: No such file or directory
(Xpra:30292): Gtk-WARNING **: 19:45:15.029: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/source/gtk+-3.24.38/gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /Applications/Xpra.app/Contents/Resources/share/icons/Adwaita/scalable/status/image-missing.svg: Unable to load image-loading module: /Applications/Xpra.app/Contents/Resources/bin/../Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: dlopen(/Applications/Xpra.app/Contents/Resources/bin/../Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so, 0x0001): tried: '/Applications/Xpra.app/Contents/Resources/lib/libpixbufloader-svg.so' (no such file), '/Applications/Xpra.app/Contents/Resources/bin/../Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xpra.app/Contents/Resources/bin/
../Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so' (no such file), '/Applications/Xpra.app/Contents/Resources/bin/../Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so' (no such file) (gdk-pixbuf-error-quark, 5)
Bail out! Gtk:ERROR:../../../../gtk/source/gtk+-3.24.38/gtk/gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /Applications/Xpra.app/Contents/Resources/share/icons/Adwaita/scalable/status/image-missing.svg: Unable to load image-loading module: /Applications/Xpra.app/Contents/Resources/bin/../Resources/lib/gdk-pixb
uf-2.0/2.10.0/loaders/libpixbufloader-svg.so: dlopen(/Applications/Xpra.app/Contents/Resources/bin/../Resources/lib/gdk-
pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so, 0x0001): tried: '/Applications/Xpra.app/Contents/Resources/lib/libpixbufloader-svg.so' (no such file), '/Applications/Xpra.app/Contents/Resources/bin/../Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xpra.app/Contents/Resources/bin/../Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so' (no such file), '/Applications/Xpra.app/Contents/Resources/bin/../Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so' (no such file) (gdk-pixbuf-error-quark, 5)
fish: Job 1, 'xpra' terminated by signal SIGABRT (Abort) I'm not entirely sure if it's exactly the same problem, since the other messages here do not mention |
I'll ping @dehesselle, just in case this is interesting to you (if the ping even goes through). I know of them addressing vaguely similar problems in https://gitlab.gnome.org/GNOME/meld/-/issues/804. |
Not sure what the This looks like a packaging issue with missing pixbuf loaders. I'll take a look.
Or perhaps this is unrelated? |
@ilyagr Yes, pings come through (any reason they should not?). There's a lot going on here, did you want to point me at something specific? |
@dehesselle This is another GTK Python project that seems to have some trouble with packaging on Mac OS (to run on Apple Silicon and recent Mac OS especially), and with signing. I thought these problems might interest you, but I might have guessed wrong, and I might be overstepping (especially since I haven't been involved with this project at all). As for the ping, I didn't know whether GitHub pings people who haven't participated in a project before. |
I was able to work around this issue about missing
This will make the errors go away and xpra works well! (MacOS 14.5 on M3 Max) |
That workaround worked great for me, Xpra started at least. Thank you very much! It seems like this should be quite fixable then. |
I've added this symlink to the build script: 03de726 : xpra/packaging/MacOS/make-app.sh Lines 227 to 231 in 03de726
And since this problem was critical, I've pushed this change to v6.x and the latest stable downloads have been updated to point to this version: 6.0.1-r3 Or you can also grab 6.1-r35837 or later from the beta repo: https://xpra.org/beta/
Can I close this ticket? |
Thank you! AFAIC, feel free to close this, or to wait until somebody gets down to the underlying problem that caused the path to be wrong. In principle, there could be more wrong paths causing more subtle issues. I am still having trouble, but of a different kind. Xpra can start, show a splash screen on the $ # On the host
$ xpra start ssh://lima-debian --ssh="ssh -F /Users/ilyagr/.lima/debian/ssh.config" --start meld
grep: /usr/share/locale/locale.alias: No such file or directory
grep: /usr/share/locale/locale.alias: No such file or directory
2024-05-28 13:57:11,502 Xpra GTK3 client version 6.0.1-r0
2024-05-28 13:57:11,518 running on Mac OS X 14.4.1
2024-05-28 13:57:11,518 cpython 3.11
grep: /usr/share/locale/locale.alias: No such file or directory
2024-05-28 13:57:11,840 GStreamer version 1.22.9
2024-05-28 13:57:11,864 created unix domain sockets:
2024-05-28 13:57:11,864 '/Users/ilyagr/.xpra/clients/macaw.local-19733'
2024-05-28 13:57:11.935 Xpra[19733:22195690] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
(Xpra:19733): Gtk-CRITICAL **: 13:57:11.940: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
2024-05-28 13:57:11,952 keyboard settings: layout=us
2024-05-28 13:57:11,957 desktop size is 2592x1920:
2024-05-28 13:57:11,957 macaw.local (320x4834 mm - DPI: 205x10)
2024-05-28 13:57:11,957 1 1080x1920 at 1512x0 (340x598 mm - DPI: 81x82) workarea: 1080x1895 at 1512x25
2024-05-28 13:57:11,957 monitor 2 1512x982 at 0x643 (301x195 mm - DPI: 128x128) workarea: 1456x944 at 56x681
Entering daemon mode; any further errors will be reported to:
/run/user/501/xpra/S2910.log
Actual display used: :1
Actual log file name is now: /run/user/501/xpra/:1.log $ # On the remote
$ tail /run/user/501/xpra/:1.log
2024-05-28 13:57:23,719 failed to parse bencode packet
2024-05-28 13:57:23,822 13.6GB of system memory
2024-05-28 13:57:24,609 New unix-domain connection received
2024-05-28 13:57:24,609 on '/home/ilyagr.linux/.xpra/lima-debian-1'
2024-05-28 13:57:24,609 New unix-domain connection received
2024-05-28 13:57:24,610 on '/run/user/501/xpra/lima-debian-1'
2024-05-28 13:57:25,231 Warning: remote clipboard request timed out
2024-05-28 13:57:25,231 request id 0, selection=CLIPBOARD, target=TARGETS
2024-05-28 13:57:25,233 Warning: remote clipboard request timed out
2024-05-28 13:57:25,233 request id 1, selection=PRIMARY, target=TARGETS |
Describe the bug
Unable to start Xpra on M1.
To Reproduce
Steps to reproduce the behavior:
System Information (please complete the following information):
(Note that the link in Installation section points to https://xpra.org/dists/MacOS/x86_64/Xpra.dmg, the x86_64 version. The
.pkg
versions have a typo in the URL.)Additional context
The text was updated successfully, but these errors were encountered: