From nobody Tue Jul 04 14:21:42 2023 X-Original-To: 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 4QwQ364W0Zz4lMcy for ; Tue, 4 Jul 2023 14:21:54 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4QwQ3643GBz3MSr; Tue, 4 Jul 2023 14:21:54 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688480514; 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=VOyzS6CquDx6HSs2TQkkgAAD+bafKbNMFPP0e8U5rKo=; b=lfQGbVwx7zFgoxng0CdZN+G6cr/ziZlZqTIlAc81aTlhZpuTv9Zdncyr008XYKRXCwK/gh pM1gvSgq8Z/IMx7m6jbZKn5pInk1zPucCtwDGCkbZalG7gZX+WBMaaWJq34rcetVPDuqmk A2sRfzWZr+vVu0MOwn23JFrZ3ma1VWflrquRADOLNToGFM1xmO8VJwxtejKjGNHlHh8Rp8 HUKMHNoFtJXgzz0P6KCnGc2xgpVA74OSP6D7UiCRKUF0tSnR5KMLWRoz3udfqi+GLycmwr Ypw6Rxq5RGGsKV3Bh9dk4TXnO0im+IJPd3NF87i2PYnNOiHPXm+yC2gtcoZU7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688480514; 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=VOyzS6CquDx6HSs2TQkkgAAD+bafKbNMFPP0e8U5rKo=; b=eStq9pyuVFIJzf8+Jef/vxhtWhPX/kq/LPYxlRYfPKpzsC+fXKEjG/lsIUU3Y5gppsCk11 N8BerspYcwFGkNKkkxVp1zIi1iBapHLGc9o3d+wXALGjndRcGagV6oR79LbkE+9Aem43qg LPSGnv0tL/Hu1XYfU/WwURDCFas57vScNvfgBWZQO11ro1EGpiUbqZin/Wy3hmXU6+q+hX u1lrbPbk6X8xzqKUPSNfdQge7K12RKufGTuFFST+mcMLoxiV5X0Pa34c9A+ZeTemiLxV/c dv0eGCJ1kBMUCNBddHegaHM8lFYUjv4MjtvOK8K+GmT5mzImVbAjJm/7AJlB7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688480514; a=rsa-sha256; cv=none; b=tsW7TezILlq+BjPTLY7CCrkEl2E/c1n22bMe8hbzC2p/s3ZapoewULqSqnlHAawt0vadFC WCF/mnK7OaRUEfAttSMZDD3EUWBgcjxE+bGE+AojG/i2L8jEvbgwbR9txnjc5LYl8pQliC OMTZRpg/N5rM2SsvJUtsdcH4an3ssQAaNr3xyTv6aJC0Vvy/qzu3gyUVfgF1YONLkh1/c5 K88Ex1IiNmLA6xQr0UcHGE9emyeHd2sa2aSRaB2HOLMUNE4JKofzPMy5aSHm+6CbXWRTKS ipRJueDyTp1pweChd6jGJ+8034yolma09x1fVqRE3/3Nx7Jth1ApqYoxkSevUA== Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (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 4QwQ36353GzJ4t; Tue, 4 Jul 2023 14:21:54 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-7672073e7b9so426747685a.0; Tue, 04 Jul 2023 07:21:54 -0700 (PDT) X-Gm-Message-State: AC+VfDzfCU2JJFhReVaVy82SGRumLfjva86SiGQRLn1fawzUuGytA79m +vPJJK8Fc51wn/YV03eCVn8iNssfw+zuXKWS76o= X-Google-Smtp-Source: ACHHUZ74SZT5WW719gCPFoQrtnm+Qbz3nBVmuvtrccpPnpuBEWThP4v/QR9vpA2pk0KUZpQmH3tB27bfjGxBw8aQRKo= X-Received: by 2002:ac8:58d0:0:b0:400:7b00:a119 with SMTP id u16-20020ac858d0000000b004007b00a119mr13479684qta.67.1688480513727; Tue, 04 Jul 2023 07:21: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:21:42 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: glib2 deprecated declarations failing on clang16 To: Danilo Egea Gondolfo Cc: ports@freebsd.org Content-Type: multipart/alternative; boundary="0000000000003b245805ffaa0108" X-ThisMailContainsUnwantedMimeParts: N --0000000000003b245805ffaa0108 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Danilo! Yes, it builds ok. I will do a run test tomorrow on bluefish. Any hint on how to explain it in commit: --- --- src/bftextview2_autocomp.c.orig 2023-07-04 14:09:37 UTC +++ src/bftextview2_autocomp.c @@ -429,7 +429,7 @@ acwin_create(BluefishTextView * btv) /*gtk_widget_set_size_request(acw->reflabel,150,-1); */ gtk_widget_show_all(acw->scroll); gtk_widget_show(hbox); - g_signal_connect(acw->reflabel, "activate-link", acw_label_active_link_lcb, acw); + g_signal_connect(acw->reflabel, "activate-link", G_CALLBACK(acw_label_active_link_lcb), acw); /*gtk_widget_set_size_request(GTK_WIDGET(acw->tree),100,200); */ /*gtk_widget_set_size_request(acw->win, 150, 200); */ /*g_signal_connect(G_OBJECT(acw->win),"key-release-event",G_CALLBACK(acwin_= key_release_lcb),acw); */ --- and --- --- src/external_commands.c.orig 2023-07-04 14:12:18 UTC +++ src/external_commands.c @@ -483,7 +483,7 @@ create_commandstring(Texternalp * ep, const gchar * fo gtk_dialog_set_default_response(GTK_DIALOG(dialog),GTK_RESPONSE_ACCEPT); tmp =3D g_strdup_printf(_("Supply arguments to define %%a i= n '%s'"), formatstring); entry =3D dialog_entry_labeled(NULL, tmp, gtk_dialog_get_content_area(GTK_DIALOG(dialog)), 6); - g_signal_connect(G_OBJECT(entry), "activate", command_dialog_entry_activated_lcb, dialog); + g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(command_dialog_entry_activated_lcb), dialog); g_free(tmp); gtk_widget_show_all(dialog); result =3D gtk_dialog_run(GTK_DIALOG(dialog)); --- Thanks! Danilo Egea Gondolfo escreveu no dia ter=C3=A7a, 4/07/= 2023 =C3=A0(s) 15:00: > On 04/07/2023 14:56, Dimitry Andric wrote: > > > On 4 Jul 2023, at 14:37, Nuno Teixeira wrote: > >> I'm getting build errors from current with www/bluefish about > deprecated 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__)) > >> ^ > >> 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 type= s > 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 case= s > > 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 > > > Not a glib expert here, but you can try this https://pastebin.com/ty8hLjV= U > > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000003b245805ffaa0108 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Danilo!

Yes, it builds= ok.

I will do a run test tomorrow on bluefish.

Any hint on how to explain it in commit:

---
--- src/bftextview2_autocomp.c.orig =C2=A0 = =C2=A0 2023-07-04 14:09:37 UTC
+++ src/bftextview2_autocomp.c
@@ -429= ,7 +429,7 @@ acwin_create(BluefishTextView * btv)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 /*gtk_widget_set_size_request(acw->reflabel,150,-1); */
=C2=A0= =C2=A0 =C2=A0 =C2=A0 gtk_widget_show_all(acw->scroll);
=C2=A0 =C2=A0= =C2=A0 =C2=A0 gtk_widget_show(hbox);
- =C2=A0 =C2=A0 =C2=A0 g_signal_co= nnect(acw->reflabel, "activate-link", acw_label_active_link_lc= b, acw);
+ =C2=A0 =C2=A0 =C2=A0 g_signal_connect(acw->reflabel, "= ;activate-link", G_CALLBACK(acw_label_active_link_lcb), acw);
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 /*gtk_widget_set_size_request(GTK_WIDGET(acw->t= ree),100,200); */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /*gtk_widget_set_size_requ= est(acw->win, 150, 200); */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /*g_signal_co= nnect(G_OBJECT(acw->win),"key-release-event",G_CALLBACK(acwin_= key_release_lcb),acw); */
---
and
---
--- src/external_commands.c.orig =C2=A0 =C2=A0 =C2=A0 =C2=A02023-07-04 1= 4:12:18 UTC
+++ src/external_commands.c
@@ -483,7 +483,7 @@ create_co= mmandstring(Texternalp * ep, const gchar * fo
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 gtk_dialog_set_default_response(GTK_DIALOG(= dialog),GTK_RESPONSE_ACCEPT);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 tmp =3D g_strdup_printf(_("Supply arguments to define %%= a in '%s'"), formatstring);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 entry =3D dialog_entry_labeled(NULL, tmp, gtk_dial= og_get_content_area(GTK_DIALOG(dialog)), 6);
- =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 g_signal_connect(G_OBJECT(entry), "activate&q= uot;, command_dialog_entry_activated_lcb, dialog);
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 g_signal_connect(G_OBJECT(entry), "act= ivate", G_CALLBACK(command_dialog_entry_activated_lcb), dialog);
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 g_free(tmp);
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 gtk_widget_show_all(di= alog);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 result = =3D gtk_dialog_run(GTK_DIALOG(dialog));
---

<= div>Thanks!

Danilo Egea Gondolfo <danilo@freebsd.org> escreveu no dia ter=C3=A7a, 4/07/2023 = =C3=A0(s) 15:00:
On 04/07/2023 14:56, Dimitry Andric wrote:

> On 4 Jul 2023, at 14:37, Nuno Teixeira <eduardo@freebsd.org> wrote:
>> I'm getting build errors from current with www/bluefish about = deprecated 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__))
>>=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&#= 39; is deprecated: Use 'g_thread_new' instead [-Wdeprecated-declara= tions]
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 g_thread_create_full(build_bflan= g2scan_thread, NULL, 0, FALSE, FALSE, G_THREAD_PRIORITY_LOW, &gerror);<= br> >> ---
>>
>> Any help is welcome on finding out its cause.
>>
>> a related issue: https://github.com/PCSX2/pcsx2/i= ssues/3315
>>
>> Build log: https://pkg-status.freebsd.org/beefy17/da= ta/main-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 typ= es passing 'gboolean (GtkLabel *, gchar *, gpointer)' (aka 'int= (struct _GtkLabel *, char *, void *)') to parameter of type 'GCall= back' (aka 'void (*)(void)') [-Wincompatible-function-pointer-t= ypes]
> g_signal_connect(acw->reflabel, "activate-link", acw_labe= l_active_link_lcb, acw);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~
> /usr/local/include/glib-2.0/gobject/gsignal.h:515:59: note: expanded f= rom macro 'g_signal_connect'
> g_signal_connect_data ((instance), (detailed_signal), (c_handler), (da= ta), NULL, (GConnectFlags) 0)
> ^~~~~~~~~~~
> /usr/local/include/glib-2.0/gobject/gsignal.h:411:25: note: passing ar= gument to parameter 'c_handler' here
> GCallback c_handler,
> ^
>
> I have seen these more often with glib-based applications. In some cas= es
> 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
>
Not a glib expert here, but you can try this https://pastebin.com/ty8hL= jVU



--
Nuno Teixeira
FreeBSD Committ= er (ports)
--0000000000003b245805ffaa0108--