Bug 271968 - sysutils/tracker3: fix build with clang 16
Summary: sysutils/tracker3: fix build with clang 16
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks: 271047
  Show dependency treegraph
 
Reported: 2023-06-12 18:54 UTC by Dimitry Andric
Modified: 2023-06-15 18:14 UTC (History)
2 users (show)

See Also:
vishwin: maintainer-feedback+


Attachments
sysutils/tracker3: fix build with clang 16 (1.89 KB, patch)
2023-06-12 18:54 UTC, Dimitry Andric
no flags Details | Diff
sysutils/tracker3: fix build with clang 16 (v2) (1.94 KB, patch)
2023-06-12 18:57 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-06-12 18:54:32 UTC
Clang 16 has a new error about incompatible function types, which shows
up when building sysutils/tracker3:

  ../src/libtracker-sparql/bus/tracker-bus.vala:20:56: error: incompatible function pointer types assigning to 'void (*)(TrackerSparqlConnection *, GCancellable *, GAsyncReadyCallback, gpointer)' (aka 'void (*)(struct _TrackerSparqlConnection *, struct _GCancellable *, void (*)(struct _GObject *, struct _GAsyncResult *, void *), void *)') from 'void (*)(TrackerSparqlConnection *, GAsyncReadyCallback, gpointer)' (aka 'void (*)(struct _TrackerSparqlConnection *, void (*)(struct _GObject *, struct _GAsyncResult *, void *), void *)') [-Wincompatible-function-pointer-types]
          ((TrackerSparqlConnectionClass *) klass)->close_async = (void (*) (TrackerSparqlConnection*, GAsyncReadyCallback, gpointer)) tracker_bus_connection_real_close_async;
                                                                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since the error occurs in vala-generated code, it does not make sense to
patch the .c file. Suppress the warning instead.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-06-12 18:54:56 UTC
Created attachment 242747 [details]
sysutils/tracker3: fix build with clang 16
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2023-06-12 18:57:42 UTC
Created attachment 242748 [details]
sysutils/tracker3: fix build with clang 16 (v2)

Oops, use .include <bsd.port.post.mk> at the end.
Comment 3 Charlie Li freebsd_committer freebsd_triage 2023-06-12 22:41:41 UTC
(setting maintainer-feedback solely to avoid timeout)

This port apparently has not been updated since the original commit; the current version upstream is 3.5.3. There is a chance this problem ceases to exist with the current upstream version.
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2023-06-15 10:27:58 UTC
LGTM. You can land this.
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-06-15 16:25:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e78dc018f22d87c8a6e7b8b267e141b0161499d7

commit e78dc018f22d87c8a6e7b8b267e141b0161499d7
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-06-12 18:53:44 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-15 16:23:54 +0000

    sysutils/tracker3: fix build with clang 16

    Clang 16 has a new error about incompatible function types, which shows
    up when building sysutils/tracker3:

      ../src/libtracker-sparql/bus/tracker-bus.vala:20:56: error: incompatible function pointer types assigning to 'void (*)(TrackerSparqlConnection *, GCancellable *, GAsyncReadyCallback, gpointer)' (aka 'void (*)(struct _TrackerSparqlConnection *, struct _GCancellable *, void (*)(struct _GObject *, struct _GAsyncResult *, void *), void *)') from 'void (*)(TrackerSparqlConnection *, GAsyncReadyCallback, gpointer)' (aka 'void (*)(struct _TrackerSparqlConnection *, void (*)(struct _GObject *, struct _GAsyncResult *, void *), void *)') [-Wincompatible-function-pointer-types]
              ((TrackerSparqlConnectionClass *) klass)->close_async = (void (*) (TrackerSparqlConnection*, GAsyncReadyCallback, gpointer)) tracker_bus_connection_real_close_async;
                                                                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Since the error occurs in vala-generated code, it does not make sense to
    patch the .c file. Suppress the warning instead.

    PR:             271968
    Approved by:    vishwin, fernape
    MFH:            2023Q2

 sysutils/tracker3/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Comment 6 Dimitry Andric freebsd_committer freebsd_triage 2023-06-15 18:14:45 UTC
See also bug 272017, for updating tracker3 to 3.5.3.