Bug 228735 - dns/kf5-kdnssd: Fix build error when compiled with MDNSRESPONDER option
Summary: dns/kf5-kdnssd: Fix build error when compiled with MDNSRESPONDER option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-04 05:20 UTC by Ashish SHUKLA
Modified: 2018-06-04 10:03 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Attachments
Fix (5.03 KB, patch)
2018-06-04 05:22 UTC, Ashish SHUKLA
ashish: maintainer-approval? (ashish)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ashish SHUKLA freebsd_committer freebsd_triage 2018-06-04 05:20:57 UTC
Compiling on FreeBSD 11.1 (amd64), I get following error:

    FAILED: src/CMakeFiles/KF5DNSSD.dir/mdnsd-servicebrowser.cpp.o 
    /usr/bin/c++  -DKF5DNSSD_EXPORTS -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_QSTRINGBUILDER -D_LARGEFILE64_SOURCE -Isrc -I/wrkdirs/usr/ports/dns/kf5-kdnssd/work/kdnssd-5.46.0/src -Isrc/KF5DNSSD_autogen/include -I. -I/usr/local/include -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtNetwork -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5/mkspecs/freebsd-clang -isystem /usr/local/include/qt5/QtDBus -O2 -pipe -fstack-protector -fno-strict-aliasing -std=c++0x -fno-operator-names -fno-exceptions -Wno-gnu-zero-variadic-macro-arguments -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -Wdate-time -fdiagnostics-color=always -pedantic -O2 -pipe -fstack-protector -fno-strict-aliasing -fPIC -fvisibility=hidden -fvisibility-inlines-hidden   -fPIC -std=gnu++11 -MD -MT src/CMakeFiles/KF5DNSSD.dir/mdnsd-servicebrowser.cpp.o -MF src/CMakeFiles/KF5DNSSD.dir/mdnsd-servicebrowser.cpp.o.d -o src/CMakeFiles/KF5DNSSD.dir/mdnsd-servicebrowser.cpp.o -c /wrkdirs/usr/ports/dns/kf5-kdnssd/work/kdnssd-5.46.0/src/mdnsd-servicebrowser.cpp
    /wrkdirs/usr/ports/dns/kf5-kdnssd/work/kdnssd-5.46.0/src/mdnsd-servicebrowser.cpp:102:9: error: no matching function for call to 'DNSServiceBrowse'
        if (DNSServiceBrowse(&ref, 0, 0, fullType.toLatin1().constData(),
            ^~~~~~~~~~~~~~~~
    /usr/local/include/dns_sd.h:1488:31: note: candidate function not viable: no known conversion from 'QByteArray' to 'const char *' for 5th argument
DNSServiceErrorType DNSSD_API DNSServiceBrowse
                              ^
    /wrkdirs/usr/ports/dns/kf5-kdnssd/work/kdnssd-5.46.0/src/mdnsd-servicebrowser.cpp:200:61: warning: unused parameter 'hostname' [-Wunused-parameter]
    QHostAddress ServiceBrowser::resolveHostName(const QString &hostname)
                                                            ^
    1 warning and 1 error generated.


Complete build log at:

https://people.freebsd.org/~ashish/logs/kf5-kdnssd-5.46.0-11-amd64-default.log
Comment 1 Ashish SHUKLA freebsd_committer freebsd_triage 2018-06-04 05:22:37 UTC
Created attachment 193983 [details]
Fix

Fix for the issue.

HTH
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-06-04 09:34:42 UTC
A commit references this bug:

Author: adridg
Date: Mon Jun  4 09:34:04 UTC 2018
New revision: 471535
URL: https://svnweb.freebsd.org/changeset/ports/471535

Log:
  dns/kf5-kdnssd: Fix build error when compiled with MDNSRESPONDER option

  KDE ports build with -DQT_NO_CAST_FROM_BYTEARRAY, so the implicit cast
  from QByteArray to const char * is not available. Make the necessary
  conversion explicit.

  This is being upstreamed as well (but would only land in 5.48 or later).

  PR:		228735
  Submitted by:	ashish
  Reported by:	ashish
  Reviewed by:	tcberner

Changes:
  head/dns/kf5-kdnssd/Makefile
  head/dns/kf5-kdnssd/files/
  head/dns/kf5-kdnssd/files/patch-src_mdnsd-publicservice.cpp
  head/dns/kf5-kdnssd/files/patch-src_mdnsd-remoteservice.cpp
  head/dns/kf5-kdnssd/files/patch-src_mdnsd-servicebrowser.cpp