Re: DBD::Oracle fails to compile on Fedora 41
[email protected] (Daniël van Eeden) Mon, 25 Nov 2024 07:17:09 +0100
| Newsgroups | perl.dbi.dev |
|---|---|
| Message-ID | <[email protected]> |
--=_f0b12e9c81bc939bdcde832a838dd27d
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8;
format=flowed
Hi,
The deprecation warning might be related to
https://github.com/perl5-dbi/dbi/pull/112 /
https://github.com/perl5-dbi/dbi/issues/110
Daniël van Eeden
On 2024-11-24 14:29, Henrique Martins wrote:
> Upgraded to Fedora 41, new compiler that comes with it seems to have
> -Wreturn-mismatch enabled.
>
> When trying to install DBD::Oracle with cpan, I get this error:
> dbdcnx.c:90:25: error: 'return' with no value, in function returning
> non-void [-Wreturn-mismatch]
> 90 | if(llist_empty(el)) return;\
>
> Looking at dbdcnx, the llist_drop(ael) macro does contain the return
> line above.
>
> The macro is used in functions
>
> release_env, which returns a void
> find_env, which returns a env_box_t*
> release_pool, which returns a void
>
> and the call within find_env needs a "return NULL;" instead.
>
> I was able to make it compile with two (silly) methods
>
> - duplicated the macro with
> return NULL
> instead of
> return
> called it from find_env
>
> - added argument to the macro
> llist_drop(ael, ret)
> called it as
> llist_drop(&box->base.lock, return);
> or
> llist_drop(&box->base.lock, return NULL);
> where appropriate.
>
> Both approaches compile, have the first one in place, will try the
> second later.
>
> -- Henrique
>
> -----------------------------------------------------------------
>
> I also get a deprecation warning as below, didn't look at it
>
> Oracle.xs: In function 'XS_DBD__Oracle__st_ora_fetch':
> Oracle.xs:233:9: warning: 'Perl_dowantarray' is deprecated
> [-Wdeprecated-declarations]
> 233 | if (GIMME == G_SCALAR) { /* XXX Oraperl */
> | ^~
> In file included from /usr/lib64/perl5/CORE/perl.h:6186,
> from /usr/lib64/perl5/vendor_perl/auto/DBI/DBIXS.h:23,
> from Oracle.h:50,
> from Oracle.xs:1:
> /usr/lib64/perl5/CORE/proto.h:1031:1: note: declared here
> 1031 | Perl_dowantarray(pTHX)
--=_f0b12e9c81bc939bdcde832a838dd27d
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3DUTF-8" /></head><body style=3D'font-size: 10pt; font-family: Tahoma,Aria=
l,Helvetica,sans-serif'>
<p>Hi,</p>
<p><br /></p>
<p>The deprecation warning might be related to <a href=3D"https://github.co=
m/perl5-dbi/dbi/pull/112">https://github.com/perl5-dbi/dbi/pull/112</a> / <=
a href=3D"https://github.com/perl5-dbi/dbi/issues/110">https://github.com/p=
erl5-dbi/dbi/issues/110</a> </p>
<p><br /></p>
<p>Daniël van Eeden</p>
<p id=3D"reply-intro">On 2024-11-24 14:29, Henrique Martins wrote:</p>
<blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2=
px solid; margin: 0">
<div class=3D"pre" style=3D"margin: 0; padding: 0; font-family: monospace">=
<br />Upgraded to Fedora 41, new compiler that comes with it seems to have =
-Wreturn-mismatch enabled.<br /><br />When trying to install DBD::Oracle wi=
th cpan, I get this error:<br /> dbdcnx.c:90:25: error: ‘return=
’ with no value, in function returning non-void [-Wreturn-mismatch]<b=
r /> 90 | if(llist_empty(el)) return;\<br /><br /=
>Looking at dbdcnx, the llist_drop(ael) macro does contain the return line =
above.<br /><br />The macro is used in functions<br /><br /> release_=
env, which returns a void<br /> find_env, which returns a env_box_t*<=
br /> release_pool, which returns a void<br /><br />and the call with=
in find_env needs a "return NULL;" instead.<br /><br />I was able to make i=
t compile with two (silly) methods<br /><br />- duplicated the macro with<b=
r /> return NULL<br />instead of<br /> return<br />called it fr=
om find_env<br /><br />- added argument to the macro<br /> llist_drop=
(ael, ret)<br />called it as<br /> llist_drop(&box->base.lock,=
return);<br />or<br /> llist_drop(&box->base.lock, return NUL=
L);<br />where appropriate.<br /><br />Both approaches compile, have the fi=
rst one in place, will try the second later.<br /><br />-- Henrique<br /><b=
r />-----------------------------------------------------------------<br />=
<br />I also get a deprecation warning as below, didn't look at it<br /><br=
/>Oracle.xs: In function ‘XS_DBD__Oracle__st_ora_fetch’:<br />=
Oracle.xs:233:9: warning: ‘Perl_dowantarray’ is deprecated [-Wd=
eprecated-declarations]<br /> 233 | if (G=
IMME =3D=3D G_SCALAR) { /* XXX Oraperl */<=
br /> | ^~<br />In file inc=
luded from /usr/lib64/perl5/CORE/perl.h:6186,<br /> &nb=
sp; from /usr/lib64/perl5/vendor_perl/aut=
o/DBI/DBIXS.h:23,<br /> &nb=
sp; from Oracle.h:50,<br /> =
from Oracle.xs:1:<br />/usr/lib64/perl5/CORE/proto.h:10=
31:1: note: declared here<br /> 1031 | Perl_dowantarray(pTHX)<br /><br=
/><br /><br /> <br /><br /> </div>
</blockquote>
</body></html>
--=_f0b12e9c81bc939bdcde832a838dd27d--