Hi Armin,
Am 2021-10-12 13:18, schrieb Armin Rigo:
Hi Thomas,
On Tue, 12 Oct 2021 at 00:33, Thomas Liske <li...@ibh.de> wrote:
[translation:ERROR] CompilationError: CompilationError(err="""
data_pypy_module_cpyext.c:25256:3: warning: initialization of
'void
(*)(Signed)' {aka 'void (*)(long int)'} from incompatible pointer type
'void (*)(int)' [-Wincompatible-pointer-types]
25256 | set_Py_DebugFlag, /* 0.value */
| ^~~~~~~~~~~~~~~~
data_pypy_module_cpyext.c:25256:3: note: (near initialization
for
'pypy_g_array_25832.a.items[0].o_value')
This is a warning (which we should look into and probably show up
everywhere). The log contains only one error:
oops :-O
[platform:Error] ../module_cache/module_15.c:558:14: error:
conflicting type qualifiers for 'stdout'
[platform:Error] 558 | extern FILE* stdout;
[platform:Error] | ^~~~~~
[platform:Error] /usr/include/stdio.h:61:20: note: previous
declaration of 'stdout' was here
[platform:Error] 61 | extern FILE *const stdout;
[platform:Error] | ^~~~~~
Responsible for that is rpython/rlib/rfile.py, whose create_stdio()
function is called on pypy3 but not on pypy2. Maybe we can add some
hack to avoid entirely the "extern" above, which is not needed anyway
because we #include stdio.h.
Thanks for pointing me in the right direction! Although i don't know how
it works at all, I've created a small patch to suppress the
std(in|err|out) declaration and got pypy3 to compile :-)
Should I put the patches required to make pypy musl compatible at some
issue tracker or will ${someone} consider to take them from the mailing
list?
Warm regards,
Thomas
--
supp...@ibh.de Tel. +49 351 477 77 30
www.ibh.de Fax +49 351 477 77 39
-----------------------------------------------------------------------
Dipl.-Ing. Thomas Liske
Teamleiter DataCenter Services
IBH IT-Service GmbH Amtsgericht Dresden
Heilbronner Str. 20 HRB 13626
01189 Dresden GF: Sandra Zander
Germany VAT DE182302907
-----------------------------------------------------------------------
Ihr Partner für: LAN, WAN IP-Quality, Security, VoIP, SAN, Backup, USV
-----------------------------------------------------------------------
professioneller IT-Service - kompetent und zuverlässig
-----------------------------------------------------------------------
--- a/rpython/rtyper/lltypesystem/rffi.py 2021-10-12 13:51:19.679004256 +0200
+++ b/rpython/rtyper/lltypesystem/rffi.py 2021-10-12 13:51:39.411425448 +0200
@@ -693,7 +693,7 @@
c_setter = "void %(setter_name)s (%(c_type)s v) { %(name)s = v; }" % locals()
lines = ["#include <%s>" % i for i in eci.includes]
- if declare_as_extern:
+ if declare_as_extern and name not in ['stdin', 'stdout', 'stderr']:
lines.append('extern %s %s;' % (c_type, name))
lines.append(c_getter)
if not getter_only:
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev