Synergy-core: Improve Bonjour (dns_sd.h) required error on Windows

Created on 8 Nov 2014  路  4Comments  路  Source: symless/synergy-core

When compiling on windows I had to manually add dns_sd.h to /src/gui/src. I am not sure what the cause of this is, but I know it has something to do with zeroconf and bonjour.

enhancement stale

Most helpful comment

I also had to download, unzip & copy this file in manually. http://synergy-project.org/wiki/Compiling doesn't mention any dependency on this, should we add it?

All 4 comments

Same problem. It is not obvious which version of mDNSResponder corresponds to dlls installed by http://synergy-project.org/bonjour/BonjourPSSetup.exe

DLL's installed by it has dates from spring 2010, so I tried
mDNSShared/dns_sd.h from
http://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-214.3.2.tar.gz (dates spring 2010 too)
and it solves compilation problem succesfully

I tried the fix suggested by @galkinvv but it did not resolve the issue for me.

I'm getting
In file included from src\MainWindow.cpp:28:0:
src\ZeroconfService.h:25:9: error: 'int32_t' does not name a type
src\ZeroconfService.h:42:19: error: 'DNSServiceErrorType' has not been declared

Had to #include <stdint.h> in ZeroconfService.h for the typedef to work. Cstdint did not work as it requires the C++11 flag.

I also had to download, unzip & copy this file in manually. http://synergy-project.org/wiki/Compiling doesn't mention any dependency on this, should we add it?

Here's how I fixed it

[pdxjohnny@debian synergy]$ apt-file search dns_sd
gvfs-backends: /usr/share/glib-2.0/schemas/org.gnome.system.dns_sd.gschema.xml
libavahi-compat-libdnssd-dev: /usr/include/avahi-compat-libdns_sd/dns_sd.h
libavahi-compat-libdnssd-dev: /usr/include/dns_sd.h
libavahi-compat-libdnssd-dev: /usr/lib/x86_64-linux-gnu/libdns_sd.a
libavahi-compat-libdnssd-dev: /usr/lib/x86_64-linux-gnu/libdns_sd.so
libavahi-compat-libdnssd-dev: /usr/lib/x86_64-linux-gnu/pkgconfig/avahi-compat-libdns_sd.pc
libavahi-compat-libdnssd1: /usr/lib/x86_64-linux-gnu/libdns_sd.so.1
libavahi-compat-libdnssd1: /usr/lib/x86_64-linux-gnu/libdns_sd.so.1.0.0
libgnomevfs2-common: /usr/share/gconf/schemas/system_dns_sd.schemas
[pdxjohnny@debian synergy]$ sudo apt-get install -y libavahi-compat-libdnssd-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libavahi-client-dev libavahi-common-dev libavahi-compat-libdnssd1 libdbus-1-dev
The following NEW packages will be installed:
  libavahi-client-dev libavahi-common-dev libavahi-compat-libdnssd-dev libavahi-compat-libdnssd1 libdbus-1-dev
0 upgraded, 5 newly installed, 0 to remove and 31 not upgraded.
Need to get 438 kB of archives.
After this operation, 1,644 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ jessie/main libavahi-compat-libdnssd1 amd64 0.6.31-5 [45.3 kB]
Get:2 http://ftp.us.debian.org/debian/ jessie/main libavahi-common-dev amd64 0.6.31-5 [64.9 kB]
Get:3 http://ftp.us.debian.org/debian/ jessie/main libdbus-1-dev amd64 1.8.20-0+deb8u1 [208 kB]
Get:4 http://ftp.us.debian.org/debian/ jessie/main libavahi-client-dev amd64 0.6.31-5 [59.0 kB]
Get:5 http://ftp.us.debian.org/debian/ jessie/main libavahi-compat-libdnssd-dev amd64 0.6.31-5 [60.0 kB]
Fetched 438 kB in 0s (622 kB/s)
Selecting previously unselected package libavahi-compat-libdnssd1:amd64.
(Reading database ... 125916 files and directories currently installed.)
Preparing to unpack .../libavahi-compat-libdnssd1_0.6.31-5_amd64.deb ...
Unpacking libavahi-compat-libdnssd1:amd64 (0.6.31-5) ...
Selecting previously unselected package libavahi-common-dev.
Preparing to unpack .../libavahi-common-dev_0.6.31-5_amd64.deb ...
Unpacking libavahi-common-dev (0.6.31-5) ...
Selecting previously unselected package libdbus-1-dev:amd64.
Preparing to unpack .../libdbus-1-dev_1.8.20-0+deb8u1_amd64.deb ...
Unpacking libdbus-1-dev:amd64 (1.8.20-0+deb8u1) ...
Selecting previously unselected package libavahi-client-dev.
Preparing to unpack .../libavahi-client-dev_0.6.31-5_amd64.deb ...
Unpacking libavahi-client-dev (0.6.31-5) ...
Selecting previously unselected package libavahi-compat-libdnssd-dev.
Preparing to unpack .../libavahi-compat-libdnssd-dev_0.6.31-5_amd64.deb ...
Unpacking libavahi-compat-libdnssd-dev (0.6.31-5) ...
Setting up libavahi-compat-libdnssd1:amd64 (0.6.31-5) ...
Setting up libavahi-common-dev (0.6.31-5) ...
Setting up libdbus-1-dev:amd64 (1.8.20-0+deb8u1) ...
Setting up libavahi-client-dev (0.6.31-5) ...
Setting up libavahi-compat-libdnssd-dev (0.6.31-5) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
[pdxjohnny@debian synergy]$ ./hm.sh build

Looks like this is already in the documentation for linux at least, I just didn't find it until now.
https://github.com/symless/synergy/wiki/Compiling#Ubuntu_1004_to_1510

Was this page helpful?
0 / 5 - 0 ratings

Related issues

martindale picture martindale  路  5Comments

xmstspider picture xmstspider  路  4Comments

Celant picture Celant  路  4Comments

130s picture 130s  路  3Comments

johnny-mac picture johnny-mac  路  4Comments