Skip site navigation (1)Skip section navigation (2)
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 &lt;<a href=3D"mailt=
o:dim@freebsd.org">dim@freebsd.org</a>&gt; 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 &lt;<a href=3D"mailto:eduardo=
@freebsd.org" target=3D"_blank">eduardo@freebsd.org</a>&gt; wrote:<br>
&gt; <br>
&gt; I&#39;m getting build errors from current with www/bluefish about depr=
ecated glib2 declarations and causing build to fail with clang16:<br>
&gt; ---<br>
&gt; /usr/local/include/glib-2.0/glib/gmacros.h:1262:37: note: expanded fro=
m macro &#39;G_DEPRECATED&#39;<br>
&gt; #define G_DEPRECATED __attribute__((__deprecated__))<br>
&gt;=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>
&gt; mv -f .deps/bluefish.Tpo .deps/bluefish.Po<br>
&gt; bftextview2_langmgr.c:2665:2: warning: &#39;g_thread_create_full&#39; =
is deprecated: Use &#39;g_thread_new&#39; instead [-Wdeprecated-declaration=
s]<br>
&gt;=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, &amp;gerror);<br>
&gt; ---<br>
&gt; <br>
&gt; Any help is welcome on finding out its cause.<br>
&gt; <br>
&gt; 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>
&gt; <br>
&gt; 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 &#39;gboolean (GtkLabel *, gchar *, gpointer)&#39; (aka &#39;int (str=
uct _GtkLabel *, char *, void *)&#39;) to parameter of type &#39;GCallback&=
#39; (aka &#39;void (*)(void)&#39;) [-Wincompatible-function-pointer-types]=
<br>
g_signal_connect(acw-&gt;reflabel, &quot;activate-link&quot;, 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 &#39;g_signal_connect&#39;<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 &#39;c_handler&#39; 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>