From nobody Tue Jul 04 14:02:42 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QwPdB0tntz4l8QX for ; Tue, 4 Jul 2023 14:02:54 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QwPdB0T92z3G5X; Tue, 4 Jul 2023 14:02:54 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688479374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y2iV1Sv1r0k9NRdjuy4e11fLpG35rrfL683JWvfHZAw=; b=vCCqlvO/zXOfL1o3uIZGwEj8bzhsu3apX0RTS5J5QrrTc32N2qaOvu0wD58spM1cDfnmQ9 6Huwwd7gDBJr/DotuMjzc7k8X92GFefLIuhVuCbLa00FE4J/k5P+VwhDRW4faFgW2ANkjB TbdFZj8dBK5N5HmH+MIu22AYW24EtGhgiWw4WwKvkOXVgIqv+xdGzmALirBmwSQtidZdYI ABRHrad0O7T2/vyhEWxzddqkVFsf1SAjTOWdjcNtTdMT6tzIoVF0P9ewT6E3e2NCeV/9yg ixMuIQQFFsZevk8FBEgA7kxIjjJQHuKBOHWnnKtNUpmFtU7R5HW+YCkjfCRjVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688479374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y2iV1Sv1r0k9NRdjuy4e11fLpG35rrfL683JWvfHZAw=; b=pYCkf+NglZqb7nF9ozMIZDUXF+2Qranwg9KIPbIyiS/cjNbLssI7UDNNz8j+AKm7+oNqYr QwmnKKE+9ZVvpbCj7Xwju8wIJ5qcWr1UOcElox2or/IewsMGEv134oK+a4PAwhIXcoLgYg hlmM21A83sZBFr0I20jaQjFtOqLAUF+RN9Ri7zbU8txOPj6JZU1lGYbsms3XSC/eRWBsxD p+YSQpFMHq8cOZzmilayA8LRBJEoWoVfNyFrhg1LH4AL7gL+FL6AE3sR5YTjb76YkYvQJG HpwY3EQvWIkf+vZ6fqm7B63PuCHrG9AOng9nzwfTyPlaUzWtxIewDhfUgXnvOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688479374; a=rsa-sha256; cv=none; b=yJCY+TAsoE9G2VBUMh7BtFbt902QzBZ7crYdQcTV3MYLKrhTrY91UIivC6QQihh/Fx+Ev4 iM73zuyFtOOZNgf1jVTYeBKlJ9NKPaFmEcoxdWvz3u9438lo3W1xsEQd2Q19zCgZGqFFCH P2By8S0QEUDxYzfM+IaFbJyqb2RdCxlk7lc+/fGcfD6EmO+fMlSEYEgdcKZiLc9JIkstKQ gK9a8auqpsKJFJMBN6Cvp26FKqfYIAOBGJi3KLy6mOXdQQjQoxRrSJONkEx8gUTGr4EvJ+ c2dtmiy22eVRJktZPPwjnQ1/X8Q5fVqjXOI49HlxqZ2ImjP127D2cyLA9Id0hw== Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QwPd96h0LzHTy; Tue, 4 Jul 2023 14:02:53 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-403713e7344so4303771cf.2; Tue, 04 Jul 2023 07:02:53 -0700 (PDT) X-Gm-Message-State: AC+VfDx5r6HntiBpzSqroR5P8lrHaogmbYBLcnjeYZ1NS0NjNHJvSHj8 +0R27+JOUylBIjyfMQwifCSIN72RajhS3gMxD5E= X-Google-Smtp-Source: ACHHUZ5Npay+iTmm7FL3IX1sHGin5dzf+5qUTm5wQmucOW/bXB8P+Xy79BnmeSY/BQkzcexoEE47Qy7HFp4L4P9FrKc= X-Received: by 2002:ac8:57c5:0:b0:400:8713:d2de with SMTP id w5-20020ac857c5000000b004008713d2demr16221877qta.24.1688479373403; Tue, 04 Jul 2023 07:02:53 -0700 (PDT) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Nuno Teixeira Date: Tue, 4 Jul 2023 15:02:42 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: glib2 deprecated declarations failing on clang16 To: Dimitry Andric Cc: FreeBSD Mailing List Content-Type: multipart/alternative; boundary="000000000000432fad05ffa9bd35" X-ThisMailContainsUnwantedMimeParts: N --000000000000432fad05ffa9bd35 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable So what could be done here? Suppress warnings at port or something need to be fixed at devel/glib20? Thanks, Dimitry Andric escreveu no dia ter=C3=A7a, 4/07/2023 =C3= =A0(s) 14:56: > On 4 Jul 2023, at 14:37, Nuno Teixeira wrote: > > > > I'm getting build errors from current with www/bluefish about deprecate= d > glib2 declarations and causing build to fail with clang16: > > --- > > /usr/local/include/glib-2.0/glib/gmacros.h:1262:37: note: expanded from > macro 'G_DEPRECATED' > > #define G_DEPRECATED __attribute__((__deprecated__)) > > ^ > > mv -f .deps/bluefish.Tpo .deps/bluefish.Po > > bftextview2_langmgr.c:2665:2: warning: 'g_thread_create_full' is > deprecated: Use 'g_thread_new' instead [-Wdeprecated-declarations] > > g_thread_create_full(build_bflang2scan_thread, NULL, 0, FALSE, > FALSE, G_THREAD_PRIORITY_LOW, &gerror); > > --- > > > > Any help is welcome on finding out its cause. > > > > a related issue: https://github.com/PCSX2/pcsx2/issues/3315 > > > > Build log: > https://pkg-status.freebsd.org/beefy17/data/main-i386-default/pf46bd2c584= 25_s0631830a7a/logs/bluefish-2.2.14.log > > The actual error is an incompatible callback function signature: > > bftextview2_autocomp.c:432:2: error: incompatible function pointer types > passing 'gboolean (GtkLabel *, gchar *, gpointer)' (aka 'int (struct > _GtkLabel *, char *, void *)') to parameter of type 'GCallback' (aka 'voi= d > (*)(void)') [-Wincompatible-function-pointer-types] > g_signal_connect(acw->reflabel, "activate-link", > acw_label_active_link_lcb, acw); > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~ > /usr/local/include/glib-2.0/gobject/gsignal.h:515:59: note: expanded from > macro 'g_signal_connect' > g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data)= , > NULL, (GConnectFlags) 0) > ^~~~~~~~~~~ > /usr/local/include/glib-2.0/gobject/gsignal.h:411:25: note: passing > argument to parameter 'c_handler' here > GCallback c_handler, > ^ > > I have seen these more often with glib-based applications. In some cases > it is feasible to fix the callback function to have the correct > signature, in other cases you can slap a cast in place. Or, if the > affected code is vala-generated (also happens), the big hammer is to > suppress the warning(s). > > -Dimitry > > --=20 Nuno Teixeira FreeBSD Committer (ports) --000000000000432fad05ffa9bd35 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
So what could be done here?

= Suppress warnings at port or something need to be fixed at devel/glib20?

Thanks,

Dimitry Andric <dim@freebsd.org> escreveu no dia ter=C3=A7a, 4/07= /2023 =C3=A0(s) 14:56:
On 4 Jul 2023, at 14:37, Nuno Teixeira <eduardo@freebsd.org> wrote:
>
> I'm getting build errors from current with www/bluefish about depr= ecated glib2 declarations and causing build to fail with clang16:
> ---
> /usr/local/include/glib-2.0/glib/gmacros.h:1262:37: note: expanded fro= m macro 'G_DEPRECATED'
> #define G_DEPRECATED __attribute__((__deprecated__))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
> mv -f .deps/bluefish.Tpo .deps/bluefish.Po
> bftextview2_langmgr.c:2665:2: warning: 'g_thread_create_full' = is deprecated: Use 'g_thread_new' instead [-Wdeprecated-declaration= s]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0g_thread_create_full(build_bflang2sca= n_thread, NULL, 0, FALSE, FALSE, G_THREAD_PRIORITY_LOW, &gerror);
> ---
>
> Any help is welcome on finding out its cause.
>
> a related issue: https://github.com/PCSX2/pcsx2/issue= s/3315
>
> Build log: https://pkg-status.freebsd.org/beefy17/data/mai= n-i386-default/pf46bd2c58425_s0631830a7a/logs/bluefish-2.2.14.log

The actual error is an incompatible callback function signature:

bftextview2_autocomp.c:432:2: error: incompatible function pointer types pa= ssing 'gboolean (GtkLabel *, gchar *, gpointer)' (aka 'int (str= uct _GtkLabel *, char *, void *)') to parameter of type 'GCallback&= #39; (aka 'void (*)(void)') [-Wincompatible-function-pointer-types]=
g_signal_connect(acw->reflabel, "activate-link", acw_label_act= ive_link_lcb, acw);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~
/usr/local/include/glib-2.0/gobject/gsignal.h:515:59: note: expanded from m= acro 'g_signal_connect'
g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), = NULL, (GConnectFlags) 0)
^~~~~~~~~~~
/usr/local/include/glib-2.0/gobject/gsignal.h:411:25: note: passing argumen= t to parameter 'c_handler' here
GCallback c_handler,
^

I have seen these more often with glib-based applications. In some cases it is feasible to fix the callback function to have the correct
signature, in other cases you can slap a cast in place. Or, if the
affected code is vala-generated (also happens), the big hammer is to
suppress the warning(s).

-Dimitry



--
Nuno Teixeira
FreeBSD Committ= er (ports)
--000000000000432fad05ffa9bd35--