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

Anydesk arm64 #2455

Closed
wants to merge 7 commits into from
Closed

Anydesk arm64 #2455

wants to merge 7 commits into from

Conversation

Botspot
Copy link
Owner

@Botspot Botspot commented Oct 5, 2023

Testing required on systems other than PiOS Bullseye 64-bit.

This uses multiarch and some dirty lib symlinking to get Anydesk running on PiOS 64-bit. It avoids installing libraspberrypi-dev:armhf, as that package conflicts with libraspberrypi-dev:arm64.

I doubt Anydesk would successfully open on a system other than PiOS due to missing libs.

@theofficialgman
Copy link
Collaborator

@Botspot FYI, the reason this failed https://github.com/Botspot/pi-apps/actions/runs/6423970408 is because you tested as a PR# from the master branch. As the script is written I have it only import any updated app, not script files. That could be changed but its just not how it functions right now.

If you want to test a branch in its entirety I suggest selecting the branch from the dropdown and then putting in the app name as I did here -> https://github.com/Botspot/pi-apps/actions/runs/6477319941

@theofficialgman
Copy link
Collaborator

weird... https://github.com/Botspot/pi-apps/actions/runs/6477319941/job/17587322949#step:3:1360
libraspberrypi0:armhf is definitely in the repo on the web but local Packages files do NOT have it as confirmed by the empty output here from the debug logging https://github.com/Botspot/pi-apps/actions/runs/6477319941/job/17587322949#step:3:1380

worth investigating, maybe the buster arm64 image ships with corrupted local files or it is being hidden with a pin?

@Botspot
Copy link
Owner Author

Botspot commented Oct 11, 2023

weird... https://github.com/Botspot/pi-apps/actions/runs/6477319941/job/17587322949#step:3:1360 libraspberrypi0:armhf is definitely in the repo on the web but local Packages files do NOT have it as confirmed by the empty output here from the debug logging https://github.com/Botspot/pi-apps/actions/runs/6477319941/job/17587322949#step:3:1380

worth investigating, maybe the buster arm64 image ships with corrupted local files or it is being hidden with a pin?

Maybe Buster's libraspberrypi0 was never made compatible with multiarch. I think I remember something about that, but it's been awhile.

@theofficialgman
Copy link
Collaborator

theofficialgman commented Oct 11, 2023

but local Packages files do NOT have it as confirmed by the empty output here from the debug logging https://github.com/Botspot/pi-apps/actions/runs/6477319941/job/17587322949#step:3:1380

wait no. I have the debug logging sent directly to the logfile https://github.com/Botspot/pi-apps/blob/master/api#L1772 so it never prints to the terminal. we see it in error reports because the logfile is uploaded but this CI does not cat the logfile.

I should add it so that install/uninstall failures cat the logfile in this CI tester.

@theofficialgman
Copy link
Collaborator

Same as -> #2198 (comment)

We should be encouraging upstream developers to write their applications generically, not conforming to old, unstable, hacky workarounds

Anydesk users are encouraged to contact support https://anydesk.com/en/support/contact-us

@Botspot
Copy link
Owner Author

Botspot commented Feb 27, 2024

We should be encouraging upstream developers to write their applications generically, not conforming to old, unstable, hacky workarounds

Re-opening, as we already tend to take the users' side and implement workarounds for things that vendors should really be responsible for. (Take zoom for example.)

@Botspot Botspot reopened this Feb 27, 2024
@Botspot
Copy link
Owner Author

Botspot commented Mar 7, 2024

I would like to give this some priority because it is being sought after a lot by the google-searching population.

This is THE most popular install-app page we have.
20240307_16h34m39s_grim

And these are the search terms that are responsible.
20240307_16h33m53s_grim
The people have spoken, and I would like to try to deliver, since anydesk is not...

rpi_arm_userspace="libraspberrypi0:armhf"
fi

install_packages https://download.anydesk.com/rpi/anydesk_${version}_armhf.deb libgles-dev:armhf libegl-dev:armhf libpolkit-gobject-1-0:armhf $rpi_arm_userspace patchelf || exit 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likely unnecessary dependencies
development libraries are nearly never required for a package
control file for anydesk already pulls in egl and glvnd libraries which pull in everything else needed

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are the libs installed by libraspberrypi0:armhf:

/usr/lib/arm-linux-gnueabihf/libbcm_host.so.0
/usr/lib/arm-linux-gnueabihf/libdebug_sym.so.0
/usr/lib/arm-linux-gnueabihf/libdtovl.so.0
/usr/lib/arm-linux-gnueabihf/libvchiq_arm.so.0
/usr/lib/arm-linux-gnueabihf/libvcos.so.0

I am not sure that the default deps pull those in, at least for armhf

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am referring to libgles-dev:armhf libegl-dev:armhf

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without those 2 installed, and then reinstalling the anydesk package and allowing it to pull in deps:

$ anydesk
anydesk: error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory

Copy link
Owner Author

@Botspot Botspot Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I get it. AnyDesk should be able to use libGLESv2.so.2 provided by libgles2, instead of specifically needing libGLESv2.so that is only provided by the -dev package.
Looks like this can be fixed with more elf patching.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... odd

/usr/lib/arm-linux-gnueabihf/libGLESv2.so	[libgles-dev](https://packages.debian.org/bookworm/libgles-dev) [armhf]

its not normal that a package uses this library.

those dependencies need to stay then

Copy link
Collaborator

@theofficialgman theofficialgman Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Botspot you missed my response ^
you need to revert those -dev changes from 9b0ce0a . they are needed. I checked as seen in the above comment

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is patching the elf to use the non-dev libs not sufficient?

@theofficialgman
Copy link
Collaborator

theofficialgman commented Mar 7, 2024

this script needs to force 4K pagesize, as does any other script that uses armhf on an arm64 kernel.
there will be errors at install and runtime on 16K pagesize kernels
eg:

Setting up libgdk-pixbuf-2.0-0:armhf (2.42.10+dfsg-1+b1) ...
/usr/lib/arm-linux-gnueabihf/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders: error while loading shared libraries: libglib
-2.0.so.0: ELF load command address/offset not page-aligned
Setting up libcairo-gobject2:armhf (1.16.0-7+rpt1) ...
Setting up libatk1.0-0:armhf (2.46.0-5) ...
Setting up libpango-1.0-0:armhf (1.50.12+ds-1) ...
Setting up libpangoft2-1.0-0:armhf (1.50.12+ds-1) ...
Setting up libpangocairo-1.0-0:armhf (1.50.12+ds-1) ...
Setting up libgtk2.0-0:armhf (2.24.33-2+rpt1) ...
/usr/lib/arm-linux-gnueabihf/libgtk2.0-0/gtk-query-immodules-2.0: error while loading shared libraries: libgmodule-
2.0.so.0: ELF load command address/offset not page-aligned
Setting up librsvg2-2:armhf (2.54.7+dfsg-1~deb12u1) ...
Setting up librsvg2-common:armhf (2.54.7+dfsg-1~deb12u1) ...
Setting up libgail18:armhf (2.24.33-2+rpt1) ...
Setting up anydesk:armhf (6.3.0) ...
Created symlink /etc/systemd/system/multi-user.target.wants/anydesk.service → /etc/systemd/system/anydesk.service.
Setting up libgail-common:armhf (2.24.33-2+rpt1) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u4) ...
Processing triggers for libgdk-pixbuf-2.0-0:armhf (2.42.10+dfsg-1+b1) ...
/usr/lib/arm-linux-gnueabihf/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders: error while loading shared libraries: libglib
-2.0.so.0: ELF load command address/offset not page-aligned

and

anydesk: error while loading shared libraries: libatk-1.0.so.0: ELF load command address/offset not page-aligned

@Botspot
Copy link
Owner Author

Botspot commented Mar 7, 2024

also it seems to fail to launch if on wayland

@theofficialgman
Copy link
Collaborator

I have tested this on piOS bookworm on RPi5 with 4K pagesize kernel on piOS wayfire and it does not function.
running anydesk from terminal shows output but no GUI starts and I see no anydesk processes

@Botspot
Copy link
Owner Author

Botspot commented Mar 7, 2024

I have tested this on piOS bookworm on RPi5 with 4K pagesize kernel on piOS wayfire and it does not function. running anydesk from terminal shows output but no GUI starts and I see no anydesk processes

See my comment above: "also it seems to fail to launch if on wayland"

strace shows that it is having issues with the /dev/vchiq file not existing.

Supposedly anydesk runs on pi5 if you switch to X11. https://forums.raspberrypi.com/viewtopic.php?t=366277
I will try that shortly.

@theofficialgman
Copy link
Collaborator

I have tested this on piOS bookworm on RPi5 with 4K pagesize kernel on piOS wayfire and it does not function. running anydesk from terminal shows output but no GUI starts and I see no anydesk processes

See my comment above: "also it seems to fail to launch if on wayland"

strace shows that it is having issues with the /dev/vchiq file not existing.

Supposedly anydesk runs on pi5 if you switch to X11. https://forums.raspberrypi.com/viewtopic.php?t=366277 I will try that shortly.

I tried. /dev/vchiq still does not exist and (obviously) "* failed to open vchiq instance" appears

@Botspot
Copy link
Owner Author

Botspot commented Mar 7, 2024

I tried. /dev/vchiq still does not exist and (obviously) "* failed to open vchiq instance" appears

Maybe that is no longer a thing on Pi5?

@theofficialgman
Copy link
Collaborator

and that is indicated by the forum thread
https://forums.raspberrypi.com/viewtopic.php?t=366277#p2197174

given the obvious issues with it not functioning as expected, I think this PR can be closed and we can continue to mark this as an upstream issue.

All anydesk needs to do is build their standard client for desktop linux for armhf and arm64 targets. no need for any deprecated broadcom library use

@theofficialgman
Copy link
Collaborator

Supposedly anydesk runs on pi5 if you switch to X11. https://forums.raspberrypi.com/viewtopic.php?t=366277 I will try that shortly.

nice... switching back to wayland in raspi-config now gives me a black screen on boot. good thing this was already a fresh install

@Botspot
Copy link
Owner Author

Botspot commented Mar 8, 2024

given the obvious issues with it not functioning as expected, I think this PR can be closed and we can continue to mark this as an upstream issue.

All anydesk needs to do is build their standard client for desktop linux for armhf and arm64 targets. no need for any deprecated broadcom library use

Strange how all these remote-connection tools all use vchiq. Looks like that is the issue with steamlink as well: https://forums.raspberrypi.com/viewtopic.php?p=2174716&hilit=%2Fdev%2Fvchiq#p2174716

@Botspot Botspot closed this Mar 8, 2024
@Botspot
Copy link
Owner Author

Botspot commented Mar 8, 2024

Still going to implement the api changes from this branch
Edit: done

@theofficialgman
Copy link
Collaborator

theofficialgman commented Mar 8, 2024

Strange how all these remote-connection tools all use vchiq. Looks like that is the issue with steamlink as well: https://forums.raspberrypi.com/viewtopic.php?p=2174716&hilit=%2Fdev%2Fvchiq#p2174716

its the direct interface to the GPU. They were doing it previously for performance reasons and since all the upstream support (eg: KMS) wasn't done yet.

Now that is complete and, to my knowledge, that direct GPU access is no longer allowed (hence why the device node is missing).

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

Successfully merging this pull request may close these issues.

2 participants