[pypy-dev] bug with MinGW32

bookaa rorsoft at gmail.com
Wed May 23 06:07:19 CEST 2012


I download last version of PyPy source from https://github.com/pypy/pypy
in MinGW32 (mingw-get-inst-20120426.exe), run:
    pypy/bin/py.py --cc=mingw32-gcc
get error:
    pypy.translator.platform.CompilationError: CompilationError(err="""
         e:\tem\usession-unknown-1\gcctest.c: In function 'main':
         e:\tem\usession-unknown-1\gcctest.c:25:51: error: 'uintptr_t' undeclared (first use in this function)

this is how I fix this bug:
  diff -crN pypy\rpython\tool\rfficache.py pypy\rpython\tool\rfficache.bookaa.py
  *** pypy\rpython\tool\rfficache.py Mon May 21 14:45:32 2012
  --- pypy\rpython\tool\rfficache.bookaa.py Wed May 23 08:07:33 2012
  ***************
  *** 13,19 ****
    from pypy.tool.gcc_cache import build_executable_cache
    
    def ask_gcc(question, add_source=""):
  !     includes = ['stdlib.h', 'stdio.h', 'sys/types.h']
        if os.name != 'nt':
            includes += ['inttypes.h']
        include_string = "\n".join(["#include <%s>" % i for i in includes])
  --- 13,19 ----
    from pypy.tool.gcc_cache import build_executable_cache
    
    def ask_gcc(question, add_source=""):
  !     includes = ['stdlib.h', 'stdio.h', 'sys/types.h', 'stdint.h']
        if os.name != 'nt':
            includes += ['inttypes.h']
        include_string = "\n".join(["#include <%s>" % i for i in includes])
  diff -crN pypy\rlib\rposix.py pypy\rlib\rposix.bookaa.py
  *** pypy\rlib\rposix.py Mon May 21 14:45:32 2012
  --- pypy\rlib\rposix.bookaa.py Wed May 23 08:29:36 2012
  ***************
  *** 24,29 ****
  --- 24,30 ----
        separate_module_sources =['''
            /* Lifted completely from CPython 3.3 Modules/posix_module.c */
            #include <malloc.h> /* for _msize */
  +         #include <stdint.h> /* for intptr_t */
            typedef struct {
                intptr_t osfhnd;
                char osfile;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120523/29f34b7a/attachment.html>


More information about the pypy-dev mailing list