On Oct 29, 2008, at 12:16 AM, Martin Rubey wrote:

> Robert Bradshaw <[EMAIL PROTECTED]> writes:
>
>> Your /usr/bin/python is API version 1013, and the one we ship with
>> Sage is API version 1011 (with some patches). The errors above (and
>> below) are complaints about this mismatch. Some stuff will work but
>> it's going to be touchy, especially anything that deals directly with
>> the Python/C API (as python-on-lisp seems to do a lot). I doubt it'll
>> be possible to get this working without using the Python that is
>> shipped with Sage (and against which all of Sage's modules are built
>> against).
>
> OK - although I do not understand completely: using the python  
> interpreter
> /usr/bin/python *did* work.  What did not work was to use the  
> python library
> libpython2.5.so.1.0.

I would assume that the differences between 1011 and 1013 are minor  
(e.g. they are both 2.5.2) so most stuff should work. I've loaded  
stuff across greater mismatches than that, and my experience is that  
sometimes things work, and sometimes things go horribly wrong.  
However, with lisp-to-python it looks like everything goes via the C  
API, so any change might pose issues. This is just a guess.

> Yesterday night I tried (please excuse stupidity, I do not know C  
> either) to
> produce a shared lib out of libpython.a shipped with sage, by saying
>
>  gcc -shared libpython2.5.a -o libpython2.5.so
>
> (no idea whether this is correct)
>
> But that didn't get me running at all:
>
> * (py::PY-REPL)
> Welcome to the Python-on-lisp REPL emulator - enter on a blank line  
> to quit
> import sys
> STYLE-WARNING: Undefined alien: "Py_InitModule4"
> STYLE-WARNING: Undefined alien: "Py_SetProgramName"
> STYLE-WARNING: Undefined alien: "Py_Initialize"
> STYLE-WARNING: Undefined alien: "PyRun_SimpleString"
> STYLE-WARNING: Undefined alien: "Py_BuildValue"
> STYLE-WARNING: Undefined alien: "PyArg_ParseTuple"
>>>>
> debugger invoked on a SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR in  
> thread
> #<THREAD "initial thread" {A84D8A1}>:
>   Attempt to call an undefined alien function.
>
> Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
>
> restarts (invokable by number or by possibly-abbreviated name):
>   0: [ABORT] Exit debugger, returning to top level.
>
> (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR)
> 0]

No idea on this one. Py_InitModule4, etc. *should* be in the symbol  
table.

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to