Bug 271320 - security/libsecret: fix build with clang 16
Summary: security/libsecret: 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-05-08 20:21 UTC by Dimitry Andric
Modified: 2023-05-18 11:43 UTC (History)
1 user (show)

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


Attachments
security/libsecret: fix build with clang 16 (1.84 KB, patch)
2023-05-08 20:21 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-05-08 20:21:33 UTC
Clang 16 has a new error about incompatible function types, which shows up when building security/libsecret:

      libsecret/test-vala-lang.p/test-vala-lang.c:1166:51: error: incompatible function pointer types passing 'void (gpointer)' (aka 'void (void *)') to parameter of type 'GTestDataFunc' (aka 'void (*)(const void *)') [-Wincompatible-function-pointer-types]
              g_test_add_data_func ("/vala/lookup/sync", NULL, _test_lookup_sync_gtest_data_func);
                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/local/include/glib-2.0/glib/gtestutils.h:337:58: note: passing argument to parameter 'test_func' here
                                               GTestDataFunc   test_func);
                                                               ^

Since the errors all occur in vala-generated code, it does not make sense to patch the .c files. Suppress the warning instead.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-05-08 20:21:54 UTC
Created attachment 242066 [details]
security/libsecret: fix build with clang 16
Comment 2 John Hein 2023-05-15 22:31:37 UTC
upstream references...

https://gitlab.gnome.org/GNOME/libsecret/-/issues/85

and from there passed further upstream to vala:

https://gitlab.gnome.org/GNOME/vala/-/issues/1413
(where -Wno-incompatible-function-pointer-types is recommended for now)

and
https://gitlab.gnome.org/GNOME/vala/-/issues/1408
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-05-18 11:42:00 UTC
A commit in branch main references this bug:

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

commit baf5218c3bf238c5feea231a3c587b416b689016
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-05-08 20:12:30 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-05-18 11:34:09 +0000

    security/libsecret: fix build with clang 16

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

      libsecret/test-vala-lang.p/test-vala-lang.c:1166:51: error: incompatible function pointer types passing 'void (gpointer)' (aka 'void (void *)') to parameter of type 'GTestDataFunc' (aka 'void (*)(const void *)') [-Wincompatible-function-pointer-types]
              g_test_add_data_func ("/vala/lookup/sync", NULL, _test_lookup_sync_gtest_data_func);
                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/local/include/glib-2.0/glib/gtestutils.h:337:58: note: passing argument to parameter 'test_func' here
                                               GTestDataFunc   test_func);
                                                               ^

    Since the errors all occur in vala-generated code, it does not make
    sense to patch the .c files. Suppress the warning instead.

    PR:             271320
    Approved by:    portmgr (build fix blanket)
    MFH:            2023Q2

 security/libsecret/Makefile | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)