[pypy-issue] [issue1524] program traslated by rpython cannot startup on windows

Jesse tracker at bugs.pypy.org
Tue Jul 2 12:38:17 CEST 2013


New submission from Jesse <boytm at 163.com>:

The program translated by rpython cannot startup with popup a message 
window: "Rutime Error! R6034 An application has made an attempt to load the C 
runtime library incorrectly. Please contact the application's support team for 
more information".

It seems the lack of manifest. 
MsvcPlatform::gen_makefile should generate the step for linking manifest, but 
the vc version is 0 incorrectly.

See below, should use search instead of match to parse vc version.
file rpython\translator\platform\windows.py:

   def __init__(self, cc=None, x64=False):
        self.x64 = x64
        msvc_compiler_environ = find_msvc_env(x64)
        Platform.__init__(self, 'cl.exe')
        if msvc_compiler_environ:
            self.c_environ = os.environ.copy()
            self.c_environ.update(msvc_compiler_environ)
            # XXX passing an environment to subprocess is not enough. Why?
            os.environ.update(msvc_compiler_environ)

        # detect version of current compiler
        returncode, stdout, stderr = _run_subprocess(self.cc, '',
                                                     env=self.c_environ)
        r = re.match(r'Microsoft.+C/C\+\+.+\s([0-9]+)\.([0-9]+).*', stderr)
        if r is not None:
            self.version = int(''.join(r.groups())) / 10 - 60
        else:

----------
messages: 5891
nosy: boytm, pypy-issue
priority: bug
release: 2.0
status: unread
title: program traslated by rpython cannot startup on windows

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1524>
________________________________________


More information about the pypy-issue mailing list