antimof / UxPlay

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

make: "dns_sd.h: No such file or directory" #30

Closed drscotthawley closed 3 years ago

drscotthawley commented 3 years ago

Thanks for making this. I'm having a problem with the build, in that it can't find a header file. After 'make' I get:

$ make
[ 23%] Built target plist
[ 26%] Built target curve25519
[ 46%] Built target ed25519
[ 57%] Built target playfair
[ 58%] Building C object lib/CMakeFiles/airplay.dir/dnssd.c.o
UxPlay-master/lib/dnssd.c:38:10: fatal error: dns_sd.h: No such file or directory
 #include <dns_sd.h>
          ^~~~~~~~~~
compilation terminated.

One common fix for this is to install a libavahi-compat-libdnssd-dev, but in my case it's already installed:

$ sudo apt-get install libavahi-compat-libdnssd-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libavahi-compat-libdnssd-dev is already the newest version (0.8-3ubuntu1).

How does one resolve this dependency? (Ubuntu 20.10)

drscotthawley commented 3 years ago

Partial Fix:

  1. Downloaded dns_sd.h directly from Apple, placed it UxPlay/lib,
  2. Changed line 38 of dnssd.c from #include <dns_sd.h> to #include "dns_sd.h"
  3. Re-ran make, succeeded.

BUT: When trying to connect on iPad, after Selecting Screen Mirroring > UxPlay, I get the spinning "wait" icon that ultimately terminates with "Airplay. Unable to connected to UxPlay". When looking at uxplay log in Linux, I see something about a failed gstreamer plugin:

$ ./uxplay 
Initialized server socket(s)
*** WARNING *** The program 'uxplay' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>

(uxplay:648629): GStreamer-WARNING **: 12:37:32.407: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so': /lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: cairo_tag_end

(uxplay:648629): GStreamer-WARNING **: 12:37:32.436: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so': /lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: cairo_tag_end
drscotthawley commented 3 years ago

Exact same issues occurs on RPiPlay. Since developing is ongoing there, closing here and opening there.