FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.64k stars 83 forks source link

Cmake fails because of libplist "missing" even though it is installed. #197

Closed fduncanh closed 1 year ago

fduncanh commented 1 year ago

(posted by @ivanzgroot at the old UxPlay antimof site) https://github.com/antimof/UxPlay/issues/134

Cmake fails looking for libplist-2.0 but libplist-2.2.0-9.fc38.x86_64 is already installed. Running on Fedora 38.

`-- Project name: uxplay -- Will compile using X11 Libraries (use cmake option -DNO_X11_DEPS=ON if X11 dependence is not wanted) -- CFLAGS "" from build environment will be postpended to CMAKE_CFLAGS -- Using CFLAGS with -march=native -- ONLY USE THIS WHEN COMPILING ON THE MACHINE THAT WILL RUN UXPLAY -- run "cmake -DNO_MARCH_NATIVE=ON" to switch off this compiler option -- using CMAKE_CFLAGS: -DSTANDALONE -DSTDC_CONSTANT_MACROS -DSTDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Ofast -march=native -- Checking for one of the modules 'libplist>=2.0' -- Checking for one of the modules 'libplist-2.0' CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:894 (message): None of the required 'libplist-2.0' found Call Stack (most recent call first): lib/CMakeLists.txt:92 (pkg_search_module)

-- Will use X_DISPLAY_FIX -- ZOOMFIX will NOT be applied as Gstreamer version is >= 1.20 -- Configuring incomplete, errors occurred!`

if I run:

sudo dnf update && sudo dnf install libplist

the results are:

Package libplist-2.2.0-9.fc38.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete!

fduncanh commented 1 year ago

@ivanzgroot : From your cmake output, it looks like pkgconf (to provide "pkg-config") might not be installed. what does "which pkg-config" report (should be "/usr/bin/pkg-config")

The UxPlay README says

You also need pkg-config: if it is not found by "which pkg-config", install pkg-config or its work-alike replacement pkgconf. Also make sure that cmake>=3.4.1 is installed:

On Fedora 38 install two rpms: pkgconf and pkgconf-pkg-config

ivanzgroot commented 1 year ago

Hey, Thanks for the repost in here @fduncanh. I accidentally published to the old site.

I just tried to install the packages with:

sudo dnf update && sudo dnf install pkgconf-pkg-config pkgconf

and it came back with:

Package pkgconf-pkg-config-1.8.0-6.fc38.x86_64 is already installed. Package pkgconf-1.8.0-6.fc38.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete!

So pkgconf is installed.

But I just got it working. It was indeed missing the libplist-2.0 package. I had libplist-2.2.0-9.fc38.x86_64 installed but cmake is looking for libplist-devel-2.2.0-9.fc38.x86_64 . After installing it the Cmake command worked.

fduncanh commented 1 year ago

OK! The UxPlay README does list libplist-devel in the RedHat instructions!

shubhxms commented 1 year ago

hello! i get the following error when i run uxplay uxplay: error while loading shared libraries: libplist-2.0.so.3: cannot open shared object file: No such file or directory libsplist is installed

fduncanh commented 1 year ago

@shubhxms give more details. did you compile uxplay yourself? which version ("uxplay -v") what distribution?

how do you know that libplist is installed? (the error message appears to indicate that it isn't)

EDIT: look for it with

find /usr  -name  "libplist*"
fduncanh commented 1 year ago

on e.g. Ubuntu-22.04 LTS, libplist-2.0.so.3 is in /usr/lib/x86_64-linux-gnu/ and is installed by "sudo apt install libplist3"

If you built uxplay yourself (recommended) and followed the instructions you should have it installed.

If you used a prebuilt package, that package should have included libplist in its requirements.

geeflaxx commented 1 year ago

Hey I have arch linux and libplist3 is not in the package manager

does someone has a solution?

image

fduncanh commented 1 year ago

what makes you think you need "libplist3" ???? (This is a name used by Ubuntu/Debian, for non-obvious reasons, originally introduced in Debian 10 to distinguish libplist-2.0 from libplist-1.x, which were both supplied) Debian describes it in https://packages.debian.org/sid/libplist3

Is something not working for you?

From the README (if you are not using AUR):

Building on non-Debian Linux and *BSD

geeflaxx commented 1 year ago

image

I already installed it

EDIT by fduncanh: @geeflaxx :

fduncanh commented 1 year ago

a new release of libplist was recently made, unfortunately with one single modified item in its supposedly "stable" API that breaks some apps, but not uxplay. See https://github.com/libimobiledevice/libplist/releases and https://github.com/libimobiledevice/libplist/issues/227

When the new release is compiled, the shared library it produces is now called "libplist-2.0.so.4" instead of "libplist-2.0.so.3". This was probably done because of the slight change in API.

Arch Linux recently upgraded libplist to this new version, and previously-compiled uxplay binaries that were compiled against the older libplist need to be rebuild (either using AUR scripts, or using the uxplay build instructions from this site).

fduncanh commented 1 year ago

Closing, see #199

fduncanh commented 1 year ago

@shubhxms

If you are using Arch Linux, the issue is because of a recent Arch update of libplist after uxplay was compiled. See #199 You just need to rebuild uxplay (using AUR, if that is how you installed it)

shubhxms commented 1 year ago

@shubhxms give more details. did you compile uxplay yourself? which version ("uxplay -v") what distribution?

i am on a arch based distro, i downloaded the AUR package

"uxplay -v " returns an error: "uxplay: error while loading shared libraries: libplist-2.0.so.3: cannot open shared object file: No such file or directory"

how do you know that libplist is installed? (the error message appears to indicate that it isn't)

i tried installing and the system said "reinstalling, already installed"

EDIT: look for it with

find /usr  -name  "libplist*"

/usr/lib/pkgconfig/libplist++-2.0.pc /usr/lib/pkgconfig/libplist-2.0.pc find: ‘/usr/lib/mysql/plugin/auth_pam_tool_dir’: Permission denied /usr/lib/libplist++-2.0.so /usr/lib/libplist++-2.0.so.4 /usr/lib/libplist++-2.0.so.4.3.0 /usr/lib/libplist-2.0.so /usr/lib/libplist-2.0.so.4 /usr/lib/libplist-2.0.so.4.3.0 find: ‘/usr/share/polkit-1/rules.d’: Permission denied

shubhxms commented 1 year ago

@shubhxms

If you are using Arch Linux, the issue is because of a recent Arch update of libplist after uxplay was compiled. See #199 You just need to rebuild uxplay (using AUR, if that is how you installed it)

oh! thank you!

  • Suggestion: always give full details, such as which distribution you use, and description (e.g. "it used to work, but has stopped working")

i will keep that in mind, sorry for the confusion!

fduncanh commented 1 year ago

All good now?

shubhxms commented 1 year ago

I get the "could not connect to Uxplay@" error (https://github.com/FDH2/UxPlay#2-uxplay-starts-but-stalls-after-initialized-server-sockets-appears-with-the-server-name-showing-on-the-client-but-the-client-fails-to-connect-when-the-uxplay-server-is-selected) firewalld is not running and I do not have ufw installed

fduncanh commented 1 year ago

run "uxplay -d" and post the output here

shubhxms commented 1 year ago

uxplay -d ''' UxPlay 1.64: An Open-Source AirPlay mirroring and audio-streaming server. Audio format 1: AAC-ELD 44100/2 GStreamer audio pipeline 1: "appsrc name=audio_source ! queue ! avdec_aac ! audioconvert ! audioresample ! volume name=volume ! level ! autoaudiosink sync=true" Audio format 2: ALAC 44100/16/2 GStreamer audio pipeline 2: "appsrc name=audio_source ! queue ! avdec_alac! audioconvert ! audioresample ! volume name=volume ! level ! autoaudiosink sync=false" GStreamer video pipeline will be: "appsrc name=video_source ! queue ! h264parse ! decodebin ! videoconvert !autovideosink name=video_sink sync=true" Initialized GStreamer video renderer using system MAC address (mac-address) Initialized server socket(s) '''

fduncanh commented 1 year ago

sounds like a firewall. I'll boot Arch and look

fduncanh commented 1 year ago

check for the firewall with

sudo systemctl status firewalld

stop it with

sudo systemctl stop firewalld
shubhxms commented 1 year ago

sudo systemctl status firewalld

firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled;> Active: inactive (dead) Docs: man:firewalld(1)

it is not running

same issue - "could not connect to uxplay@"

fduncanh commented 1 year ago

The symptom you have means that the uxplay server is not hearing anything back from the iOS device. You need to find out why.
https://linuxconfig.org/how-to-monitor-network-activity-on-a-linux-system

On arch, with the firewall disabled, it works here

sudo systemctl status firewalld
○ firewalld.service - firewalld - dynamic firewall daemon
     Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; preset: disabled)
     Active: inactive (dead)
       Docs: man:firewalld(1)

uxplay
UxPlay 1.64: An Open-Source AirPlay mirroring and audio-streaming server.
using system MAC address 80:dx:4c:ab:a1:66
Initialized server socket(s)
Accepted IPv4 client on socket 24
Local: 192.168.1.28
Remote: 192.168.1.109
Client identified as User-Agent: AirPlay/680.23.1
Accepted IPv4 client on socket 26
Local: 192.168.1.28
Remote: 192.168.1.109
raop_rtp_mirror starting mirroring
Begin streaming to GStreamer video pipeline
fduncanh commented 1 year ago

also check for ufw, iptables

https://www.baeldung.com/linux/firewall-status

shubhxms commented 1 year ago

hi! i gave up on the idea back then but was able to get it working now! thank you so much for being so responsive and helpful! :)

Booth1983 commented 1 week ago

Hi, when I compile Uxplay on Ubuntu 20.04 it gives me the same Issue as mentioned above in the Headline.

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBPLIST
    linked by target "airplay" in directory /home/schule/bin/uxplay/UxPlay/lib

-- Configuring incomplete, errors occurred!

Use of sudo apt install libplist3 says, that its allready installed. Same with libplist-dev.