[pypy-dev] Re: Is PyPy MinGW support broken?

2023-06-19 Thread Julian Waters
Ah, I see. Again, thanks for the clarifications! Yes, I was indeed using
PyPy instead of CPython, it looks to me that the logic that pipes the
printed values into the rpython toolchain is broken, since in my MinGW /tmp
directory I can see that the executables were built without issues and
running them writes the expected output to my terminal, however inside
rpython printing the result.out returns... An empty array, which
rpython takes to be an error. I'm going to have some work cut out for me
on this, haha

regards,
Julian :)
___
pypy-dev mailing list -- pypy-dev@python.org
To unsubscribe send an email to pypy-dev-le...@python.org
https://mail.python.org/mailman3/lists/pypy-dev.python.org/
Member address: arch...@mail-archive.com


[pypy-dev] Re: Is PyPy MinGW support broken?

2023-06-19 Thread Matti Picus

On 19/6/23 10:45, Julian Waters wrote:

I'm working with the MinGW team; I can create a patch to help, but a 
quick low down on how the build_executable_cache and related logic 
works would help me out a little


Also: Is MinGW not used by the core team?

best**regards,
Julian

Thanks for giving PyPy a try. That code is a little obscure, but the 
goal is to figure out the size in C of different rpython types. So it 
creates a C file with various printf lines, compiles it, and checks the 
stdout. When I run it on linux here is the first C file (I put `import 
pdb;pdb.set_trace()` just before the line that fails to stop the process 
and look around) called gcctest.c that is created:



$ cat /tmp/usession-py3.9-0/gcctest.c

// includes
#include 
#include 
#include 
#include 
#include 



// checking code
int main(void)
{
   printf("sizeof __int128_t=%ld\n", (long)sizeof(__int128_t));
   return (0);
}


Next to that source file is the object file and the executable. Did the 
compilation succeed? What happens when you run the executable?



The "core windows team" is me, and I admit I have not tried to use mingw 
to build PyPy. There are some instructions here [0] but I don't think 
anyone has actually tried that in a long time so there is probably 
significant bitrot. Corrections are welcome


In order to build on windows, you must use PyPy2.7, a regular CPython 
2.7 will not work, see [1] for the justification.



Matti

[0] https://doc.pypy.org/en/latest/windows.html#using-the-mingw-compiler

[1] https://doc.pypy.org/en/latest/windows64.html#windows64

___
pypy-dev mailing list -- pypy-dev@python.org
To unsubscribe send an email to pypy-dev-le...@python.org
https://mail.python.org/mailman3/lists/pypy-dev.python.org/
Member address: arch...@mail-archive.com


[pypy-dev] Re: Is PyPy MinGW support broken?

2023-06-19 Thread Julian Waters
I'm working with the MinGW team; I can create a patch to help, but a quick
low down on how the build_executable_cache and related logic works would
help me out a little

Also: Is MinGW not used by the core team?

best regards,
Julian
___
pypy-dev mailing list -- pypy-dev@python.org
To unsubscribe send an email to pypy-dev-le...@python.org
https://mail.python.org/mailman3/lists/pypy-dev.python.org/
Member address: arch...@mail-archive.com


[pypy-dev] Re: Is PyPy MinGW support broken?

2023-06-19 Thread Matti Picus


On 19/6/23 10:08, Julian Waters wrote:

When I try to build PyPy with MinGW, I get the following:

...
It seems as if the ask_gcc function is broken for MinGW, and I can't 
tell why at a first glance. Is a fix possible?



Someone who uses mingw would have to suggest a patch.

Matti



___
pypy-dev mailing list -- pypy-dev@python.org
To unsubscribe send an email to pypy-dev-le...@python.org
https://mail.python.org/mailman3/lists/pypy-dev.python.org/
Member address: arch...@mail-archive.com


[pypy-dev] Is PyPy MinGW support broken?

2023-06-19 Thread Julian Waters
When I try to build PyPy with MinGW, I get the following:

[translation:info] Translating target as defined by targetpypystandalone
Traceback (most recent call last):
  File "../../rpython/bin/rpython", line 20, in 
main()
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\translator
\goal\translate.py", line 219, in main
targetspec_dic, translateconfig, config, args =
parse_options_and_load_target()
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\translator
\goal\translate.py", line 155, in parse_options_and_load_target
targetspec_dic = load_target(targetspec)
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\translator
\goal\translate.py", line 97, in load_target
mod = __import__(specname)
  File "targetpypystandalone.py", line 7, in 
from pypy.interpreter import gateway
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\pypy\interpreter\g
ateway.py", line 19, in 
from pypy.interpreter.eval import Code
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\pypy\interpreter\e
val.py", line 6, in 
from pypy.interpreter.baseobjspace import W_Root
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\pypy\interpreter\b
aseobjspace.py", line 6, in 
from rpython.rlib import jit, types, rutf8
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\rlib\rutf8
.py", line 26, in 
from rpython.rlib.unicodedata import unicodedb
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\rlib\unico
dedata\__init__.py", line 4, in 
from rpython.rlib.unicodedata import unicodedb_5_2_0 as unicodedb
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\rlib\unico
dedata\unicodedb_5_2_0.py", line 6, in 
from rpython.rlib.unicodedata.supportcode import (signed_ord,
_all_short,
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\rlib\unico
dedata\supportcode.py", line 2, in 
from rpython.rtyper.lltypesystem.rffi import r_ushort, r_short
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\rtyper\llt
ypesystem\rffi.py", line 515, in 
sizeof_c_type('__int128_t', ignore_errors=True)
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\rtyper\too
l\rfficache.py", line 38, in sizeof_c_type
return sizeof_c_types([c_typename], **kwds)[0]
  File
"D:\eclipse-php-2022-06-R-win32-x86_64\Projects\pypy-release-pypy3.10-v7.x\rpython\rtyper\too
l\rfficache.py", line 47, in sizeof_c_types
assert len(lines) == len(typenames_c)
AssertionError

It seems as if the ask_gcc function is broken for MinGW, and I can't tell
why at a first glance. Is a fix possible?
___
pypy-dev mailing list -- pypy-dev@python.org
To unsubscribe send an email to pypy-dev-le...@python.org
https://mail.python.org/mailman3/lists/pypy-dev.python.org/
Member address: arch...@mail-archive.com