Date: Tue, 4 Jul 2023 15:02:42 +0100 From: Nuno Teixeira <eduardo@freebsd.org> To: Dimitry Andric <dim@freebsd.org> Cc: FreeBSD Mailing List <freebsd-ports@freebsd.org> Subject: Re: glib2 deprecated declarations failing on clang16 Message-ID: <CAFDf7U%2B0FRTmHRur8Dnk6xq1rptZDNxamVRgvdTixJbYO9jJfA@mail.gmail.com> In-Reply-To: <BBD89BC1-8E9D-4E6D-887E-4A785F4A21D4@FreeBSD.org> References: <CAFDf7U%2B-M1D7xL_AkB-eY%2B0jq2JjjdhzoZUZtnmanVoa25vOtQ@mail.gmail.com> <BBD89BC1-8E9D-4E6D-887E-4A785F4A21D4@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <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 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 <div dir=3D"ltr"><div>So what could be done here?</div><div><br></div><div>= Suppress warnings at port or something need to be fixed at devel/glib20?</d= iv><div><br></div><div>Thanks,<br></div></div><br><div class=3D"gmail_quote= "><div dir=3D"ltr" class=3D"gmail_attr">Dimitry Andric <<a href=3D"mailt= o:dim@freebsd.org">dim@freebsd.org</a>> escreveu no dia ter=C3=A7a, 4/07= /2023 =C3=A0(s) 14:56:<br></div><blockquote class=3D"gmail_quote" style=3D"= margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef= t:1ex">On 4 Jul 2023, at 14:37, Nuno Teixeira <<a href=3D"mailto:eduardo= @freebsd.org" target=3D"_blank">eduardo@freebsd.org</a>> wrote:<br> > <br> > I'm getting build errors from current with www/bluefish about depr= ecated glib2 declarations and causing build to fail with clang16:<br> > ---<br> > /usr/local/include/glib-2.0/glib/gmacros.h:1262:37: note: expanded fro= m macro 'G_DEPRECATED'<br> > #define G_DEPRECATED __attribute__((__deprecated__))<br> >=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^<br> > mv -f .deps/bluefish.Tpo .deps/bluefish.Po<br> > bftextview2_langmgr.c:2665:2: warning: 'g_thread_create_full' = is deprecated: Use 'g_thread_new' instead [-Wdeprecated-declaration= s]<br> >=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);<br> > ---<br> > <br> > Any help is welcome on finding out its cause.<br> > <br> > a related issue: <a href=3D"https://github.com/PCSX2/pcsx2/issues/3315= " rel=3D"noreferrer" target=3D"_blank">https://github.com/PCSX2/pcsx2/issue= s/3315</a><br> > <br> > Build log: <a href=3D"https://pkg-status.freebsd.org/beefy17/data/main= -i386-default/pf46bd2c58425_s0631830a7a/logs/bluefish-2.2.14.log" rel=3D"no= referrer" target=3D"_blank">https://pkg-status.freebsd.org/beefy17/data/mai= n-i386-default/pf46bd2c58425_s0631830a7a/logs/bluefish-2.2.14.log</a><br> <br> The actual error is an incompatible callback function signature:<br> <br> 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]= <br> g_signal_connect(acw->reflabel, "activate-link", acw_label_act= ive_link_lcb, acw);<br> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~<br> /usr/local/include/glib-2.0/gobject/gsignal.h:515:59: note: expanded from m= acro 'g_signal_connect'<br> g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), = NULL, (GConnectFlags) 0)<br> ^~~~~~~~~~~<br> /usr/local/include/glib-2.0/gobject/gsignal.h:411:25: note: passing argumen= t to parameter 'c_handler' here<br> GCallback c_handler,<br> ^<br> <br> I have seen these more often with glib-based applications. In some cases<br= > it is feasible to fix the callback function to have the correct<br> signature, in other cases you can slap a cast in place. Or, if the<br> affected code is vala-generated (also happens), the big hammer is to<br> suppress the warning(s).<br> <br> -Dimitry<br> <br> </blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre= fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"l= tr"><span style=3D"color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committ= er (ports)</span></div></div> --000000000000432fad05ffa9bd35--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7U%2B0FRTmHRur8Dnk6xq1rptZDNxamVRgvdTixJbYO9jJfA>