[pypy-dev] update (+patch) on embedding pypy

Max Lavrenov max.lavrenov at gmail.com
Wed Apr 11 08:41:19 CEST 2012


Hello everyone!

I got some errors while i was building the embedded-pypy branch with python
translate.py -Ojit --shared.
 Could anybody help me with it, please?

The defautl branch builds without any errors.

[translation:ERROR]     In file included from debug_print.c:16:0:
[translation:ERROR]     common_header.h:18:0: warning: "_POSIX_C_SOURCE"
redefined [enabled by default]
[translation:ERROR]     /usr/include/features.h:215:0: note: this is the
location of the previous definition
[translation:ERROR]     In file included from
../module_cache/module_11.c:157:0:
[translation:ERROR]
/home/e-max/workspace/pypy/pypy/translator/c/src/dtoa.c:132:0: warning:
"PyMem_Malloc" redefined [enabled by default]
[translation:ERROR]
/home/e-max/workspace/pypy/pypy/module/cpyext/include/pymem.h:8:0: note:
this is the location of the previous definition
[translation:ERROR]
/home/e-max/workspace/pypy/pypy/translator/c/src/dtoa.c:133:0: warning:
"PyMem_Free" redefined [enabled by default]
[translation:ERROR]
/home/e-max/workspace/pypy/pypy/module/cpyext/include/pymem.h:9:0: note:
this is the location of the previous definition
[translation:ERROR]     Traceback (most recent call last):
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line
2017, in <module>
[translation:ERROR]         tracker.process(f, g, filename=fn)
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line
1910, in process
[translation:ERROR]         tracker = parser.process_function(lines,
filename)
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line
1425, in process_function
[translation:ERROR]         table = tracker.computegcmaptable(self.verbose)
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line 52,
in computegcmaptable
[translation:ERROR]         self.parse_instructions()
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line
207, in parse_instructions
[translation:ERROR]         insn = meth(line)
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line
1047, in visit_jmp
[translation:ERROR]         return FunctionGcRootTracker.visit_jmp(self,
line)
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line
710, in visit_jmp
[translation:ERROR]         raise NoPatternMatch(repr(self.lines[tablelin]))
[translation:ERROR]     __main__.NoPatternMatch: '\t.long\t.L370-.L376\n'
[translation:ERROR]     make: *** [jit_backend_llsupport_descr.gcmap] Error
1
[translation:ERROR]     make: *** Waiting for unfinished jobs....
[translation:ERROR]     Traceback (most recent call last):
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line
2017, in <module>
[translation:ERROR]         tracker.process(f, g, filename=fn)
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line
1910, in process
[translation:ERROR]         tracker = parser.process_function(lines,
filename)
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line
1425, in process_function
[translation:ERROR]         table = tracker.computegcmaptable(self.verbose)
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line 65,
in computegcmaptable
[translation:ERROR]         return self.gettable()
[translation:ERROR]       File
"/home/e-max/workspace/pypy/pypy/translator/c/gcc/trackgcroot.py", line 99,
in gettable
[translation:ERROR]         localvar)
[translation:ERROR]     AssertionError: pypy_g_generate_tokens: %r10
[translation:ERROR]     make: *** [interpreter_pyparser_pytokenizer.gcmap]
Error 1
[translation:ERROR]     """)




On Wed, Apr 4, 2012 at 19:55, Roberto De Ioris <roberto at unbit.it> wrote:

>
> >
> >> On Tue, Apr 3, 2012 at 11:32 AM, Roberto De Ioris <roberto at unbit.it>
> >> wrote:
> >>>
> >>>
> >>>>
> >>>> Ok I see.
> >>>>
> >>>> Is the rest of the API used going to be cpyext? If so, then
> >>>> Py_Initialize is indeed a perfect choice.
> >>>>
> >>>
> >>>
> >>> I am about to add:
> >>>
> >>> Py_SetPythonHome
> >>> Py_SetProgramName
> >>> Py_Finalize
> >>>
> >>> i will put them into
> >>>
> >>> module/cpyext/src/pythonrun.c
> >>>
> >>> Do you think Py_Initialize should go there too ?
> >>>
> >>> --
> >>> Roberto De Ioris
> >>> http://unbit.it
> >>
> >> Sounds like a good idea. Should I merge the pull request now or wait
> >> for the others?
> >>
> >>
> >
> > I think it is better to wait. Moving that to cpyext will avoid messing
> > with translators (adding more exported symbols) too.
> >
> >
>
> Ok, i am pretty satisfied with the current code (i have made a pull
> request).
>
> I have implemented:
>
> Py_Initialize
> Py_Finalize
> Py_SetPythonHome
> Py_SetProgramName
>
> all as rpython-cpyext except for Py_Initialize being splitted in a c part
> (it requires a call to RPython_StartupCode)
>
> Successfully tested with current uWSGI tip. Py_SetPythonHome add flawless
> support for virtualenv.
>
>
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/mailman/listinfo/pypy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120411/53ea72a2/attachment.html>


More information about the pypy-dev mailing list