For some reason okular is not getting pulled in with the upstream sync’s in unstable. It has been in ARCH-ARM’s repo since October 12th at v23.08.2-1. We seem to be stuck at v23.04.3-1. This upgraded package is now needed in our unstable and testing branches because of the recent KDE5 renaming.
[ray@jellyfin ~]$ sudo pacman -S okular
resolving dependencies...
warning: cannot resolve "kpty", a dependency of "okular"
warning: cannot resolve "kactivities", a dependency of "okular"
warning: cannot resolve "threadweaver", a dependency of "okular"
warning: cannot resolve "kparts", a dependency of "okular"
Alone the same lines with the KDE5 renaming our pamac-tray-icon-plasma package needs a rebuild to be compatible. This is now needed in our unstable and testing branches.
Also our sddm-breath-theme package in our unstable and testing branches will not upgrade because of the KDE5 renaming. There was some discussion a while back with kvantum being discontinued a while back with x86 and some packages at that time was upgraded on the ARM side so there could be some upgrades but this package was left out. If kvantum is discontinued almost all of our ARM images will have to be redone.
With more investigating the reason okular was not upgrading is we were building our own package apparently for mobile compatibility. I have built and pushed our okular package to the unstable and testing branches when the mirrors sync.
RPi was using their own API and recently discontinued using it in favor of the regular libs under /usr/lib/. Try rebuilding the realvnc server package from AUR and see if it will build using the regular system libs. Otherwise there may have to be some coding changes in their coding. Since it is an AUR package there is not much that can be done as far as manjaro or arch upstream packaging.
Well, the /opt thing is a hack done in the third-party package you linked to:
(a really ugly hack at that, because it overwrites system libraries!). So removing that part (or switching to the realvnc-vnc-server package from AUR that does not have this snippet) might fix it, though you may have to reinstall the packages providing the libraries that were overwritten.
Or you could try using a VNC server that is actually Free Software. There are a few of those. RealVNC is proprietary, binary-only software which is being repackaged from .deb packages intended for Debian and/or Ubuntu, so if the underlying system libraries change, there is very little that can be done to fix RealVNC to work with the new ones.