[GH-ISSUE #52] Build without dns_sd.h when not building GUI #42

Closed
opened 2026-05-05 04:50:35 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @xantoz on GitHub (May 29, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/52

Operating Systems

Gentoo Linux

Barrier Version

2.1.0

Steps to reproduce bug

  1. cd /path/to/barrier
  2. mkdir build
  3. cd build
  4. cmake -DBARRIER_BUILD_GUI=OFF -DBARRIER_BUILD_INSTALLER=OFF ../

If I do not have any provider of dns_sd.h installed (such as mdnsresponder or avahi with mdnsrespondercompat) cmake aborts with: "Missing header: dns_sd.h"

Expected result: cmake will succeed as long as BARRIER_BUILD_GUI=OFF, despite the lack of a provider of dns_sd.h on my system. With BARRIER_BUILD_GUI=ON cmake will complain about missing dns_sd.h

Other info

The only files that include dns_sd.h are under src/gui/src, thus it seems that dns_sd is only a requirement when building the GUI. This also reflects the state of things for old versions of synergy.

Further I ended up installing avahi and building with GUI and I checked the output of ldd on the resulting binaries:
barrier-ldd.txt
Only the GUI executable "barrier" shows any dependency on libdns_sd.so.1, libavahi-client.so.3 and libavahi-common.so.3

Originally created by @xantoz on GitHub (May 29, 2018). Original GitHub issue: https://github.com/debauchee/barrier/issues/52 ### Operating Systems ### Gentoo Linux ### Barrier Version ### 2.1.0 ### Steps to reproduce bug ### 1. cd /path/to/barrier 2. mkdir build 3. cd build 4. cmake -DBARRIER_BUILD_GUI=OFF -DBARRIER_BUILD_INSTALLER=OFF ../ If I do not have any provider of dns_sd.h installed (such as mdnsresponder or avahi with mdnsrespondercompat) cmake aborts with: "Missing header: dns_sd.h" Expected result: cmake will succeed as long as BARRIER_BUILD_GUI=OFF, despite the lack of a provider of dns_sd.h on my system. With BARRIER_BUILD_GUI=ON cmake will complain about missing dns_sd.h ### Other info ### The only files that include dns_sd.h are under src/gui/src, thus it seems that dns_sd is only a requirement when building the GUI. This also reflects the state of things for old versions of synergy. Further I ended up installing avahi and building with GUI and I checked the output of ldd on the resulting binaries: [barrier-ldd.txt](https://github.com/debauchee/barrier/files/2048069/barrier-ldd.txt) Only the GUI executable "barrier" shows any dependency on libdns_sd.so.1, libavahi-client.so.3 and libavahi-common.so.3
gitea-mirror 2026-05-05 04:50:35 -06:00
Author
Owner

@AdrianKoshka commented on GitHub (May 29, 2018):

I could be wrong, but I think barrier needs dns_sd.h whether you're building the GUI or not.

<!-- gh-comment-id:392846022 --> @AdrianKoshka commented on GitHub (May 29, 2018): I could be wrong, but I think barrier needs `dns_sd.h` whether you're building the GUI or not.
Author
Owner

@xantoz commented on GitHub (May 30, 2018):

synergy-1.9 doesn't, and judging from the barrier source code and the resulting binaries it shouldn't need it as well.

<!-- gh-comment-id:393065961 --> @xantoz commented on GitHub (May 30, 2018): synergy-1.9 doesn't, and judging from the barrier source code and the resulting binaries it shouldn't need it as well.
Author
Owner

@walker0643 commented on GitHub (Jun 30, 2018):

You're absolutely right, @xantoz :) fixed in e88bc97e63

<!-- gh-comment-id:401554975 --> @walker0643 commented on GitHub (Jun 30, 2018): You're absolutely right, @xantoz :) fixed in https://github.com/debauchee/barrier/commit/e88bc97e630b55bc11c6627e4ae26ae564fdaae9
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#42
No description provided.