Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » sbml-interoperability » python bindings of libsbml-2.3.2 on Mac OS X
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Mike Hucka


Posts: 961
Registered:
October 2003
Re: python bindings of libsbml-2.3.2 on Mac OS X 31 Aug '05 15:28 Go to previous message

Hello,

Some answers finally to an old problem on MacOSX.

Ralph, you reported problems with installing on MacOSX
10.3. These turn out to be 2 separate problems.

Problem #1
----------

>>>>> On 2 Jun 2005, Ralph Gauges <ralph.gauges@eml-r.villa-bosch.de> wrote:
RG> Hi Ben, I just tried to install libsbml-2.3-2 on Mac
RG> OS X 10.3 and upon installing the python bindings, I
RG> got the following error message:
RG>
RG> cp libsbml.py build/libsbml /sw/bin/python setup.py
RG> install --skip-build --prefix=/sw/apps/libsbml-2.3.2
RG> running install error: $MACOSX_DEPLOYMENT_TARGET
RG> mismatch: now "" but "10.3" during configure make[3]:

This MACOSX_DEPLOYMENT_TARGET thing is actually due to a bug
in the MacOSX Python Distutils prior to versions 2.3.5 and
2.4.1. See item #5.7 at

http://www.pythonmac.org/wiki/FAQ

Now, the curious thing is: why was this happening to you,
when your command above references the Fink version of
python in /sw/bin and not the Apple version in /usr/bin? My
guess is that your shell's command $path was set to search
/usr/bin before /sw/bin, and somewhere in the commands
invoked by python setup.py during the 'make install'
process, it's calling "python" without an explicit path and
getting /usr/bin/python instead of /sw/bin/python. This
might explain why you're getting this error about
MACOSX_DEPLOYMENT_TARGET, an error that shouldn't occur if
everything was invoking the non-Apple /sw version of python.

But, the above is pure speculation, because I can't seem to
reproduce the problem locally even if I fiddle with $path
settings and so on. If you are still experiencing the
problem, then please refer to the document above (the Python
wiki) points to a patch for the 10.3 (Panther) version of
Python 2.3.0 that is supposed to address some of the
installation issues. Could you try that, and see if it
resolves the MACOSX_DEPLOYMENT_TARGET error?

Problem #2
----------

RG> If I try it with the python that comes with OS
RG> X, I get a list of undefined symbols.

This was due to a deficiency in config/python.m4; it failed
to recognize the use of --with-python=/System/Library/...
as invoking the Apple version of python. I've checked a fix
into CVS, and it'll be in the next libsbml release.

Sorry about the trouble caused by this. This looks like it
hit several people. Hopefully it's fixed, but I'm very
interested to hear if it's not. If you and others can try
the newly CVS'ed copies of the files in libsbml/config, I'd
appreciate hearing back how it goes.

MH

>>>>> On 2 Jun 2005, Ralph Gauges <ralph.gauges@eml-r.villa-bosch.de> wrote:
RG> Hi Ben, I just tried to install libsbml-2.3-2 on Mac
RG> OS X 10.3 and upon installing the python bindings, I
RG> got the following error message:
RG>
RG> cp libsbml.py build/libsbml /sw/bin/python setup.py
RG> install --skip-build --prefix=/sw/apps/libsbml-2.3.2
RG> running install error: $MACOSX_DEPLOYMENT_TARGET
RG> mismatch: now "" but "10.3" during configure make[3]:
RG> *** [install] Error 1 make[3]: Leaving directory
RG> `/Users/ralph/Download/libsbml-2.3.2/src/bindings/python'
RG> make[2]: *** [python-recursive] Error 2 make[2]:
RG> Leaving directory
RG> `/Users/ralph/Download/libsbml-2.3.2/src/bindings'
RG> make[1]: *** [bindings-recursive] Error 2 make[1]:
RG> Leaving directory
RG> `/Users/ralph/Download/libsbml-2.3.2/src' make: ***
RG> [src-recursive] Error 2
RG>
RG>
RG> This happens when I use a fink installed version of
RG> python. If I try it with the python that comes with OS
RG> X, get get a list of undefined symbols.
RG>
RG> g++
RG> -L/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
RG> python2.3/lib-dynload -bundle_loader /usr//bin/python
RG> -L/sw//lib -bundle -o _libsbml.so libsbml_wrap.o
RG> -L../.. -lsbml -lexpat -lm ld: Undefined symbols:
RG> _PyArg_ParseTuple _PyCFunction_Type
RG> _PyCObject_FromVoidPtr _PyCObject_Import
RG> _PyDict_SetItemString _PyErr_Clear _PyErr_Fetch
RG> _PyErr_Format _PyErr_Occurred _PyErr_SetString
RG> _PyExc_NameError _PyExc_NotImplementedError
RG> _PyExc_OverflowError _PyExc_TypeError
RG> _PyFloat_FromDouble _PyFloat_Type _PyInt_FromLong
RG> _PyInt_Type _PyLong_AsDouble _PyLong_AsLong
RG> _PyLong_AsUnsignedLong _PyLong_FromUnsignedLong
RG> _PyLong_Type _PyModule_AddObject _PyModule_GetDict
RG> _PyOS_snprintf _PyObject_CallObject _PyObject_Free
RG> _PyObject_GetAttr _PyObject_Init _PyObject_Malloc
RG> _PyObject_SetAttrString _PyObject_Size _PyObject_Str
RG> _PyString_AsString _PyString_FromFormat
RG> _PyString_FromString _PyString_FromStringAndSize
RG> _PyString_Type _PyTuple_GetItem _PyType_IsSubtype
RG> _PyType_Type _Py_BuildValue _Py_InitModule4
RG> __Py_NoneStruct __Py_TrueStruct __Py_ZeroStruct
RG> make[3]: *** [_libsbml.so] Error 1 make[3]: Leaving
RG> directory
RG> `/Users/ralph/Download/libsbml-2.3.2/src/bindings/python'
RG> make[2]: *** [python-recursive] Error 2 make[2]:
RG> Leaving directory
RG> `/Users/ralph/Download/libsbml-2.3.2/src/bindings'
RG> make[1]: *** [bindings-recursive] Error 2 make[1]:
RG> Leaving directory
RG> `/Users/ralph/Download/libsbml-2.3.2/src'
RG>
RG>
RG> Has anyone sucessfully installed the python bindings
RG> on Mac OS X?
RG>
RG> Thanks
RG>
RG> Ralph
RG>


      

SubjectPosterDate
Read Message   python bindings of libsbml-2.3.2 on Mac OS X Ralph.Gauges02 Jun '05 08:05
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X Ben Bornstein02 Jun '05 08:45
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X Ed Frank02 Jun '05 09:08
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X Ralph.Gauges02 Jun '05 09:45
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X Ben Bornstein02 Jun '05 09:56
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X Mike Hucka02 Jun '05 12:54
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X Ralph.Gauges03 Jun '05 00:01
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X Mike Hucka03 Jun '05 00:06
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X Ralph.Gauges03 Jun '05 00:59
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X Mike Hucka03 Jun '05 10:37
Read Message   Re: python bindings of libsbml-2.3.2 on Mac OS X  Mike Hucka31 Aug '05 15:28
Previous Topic:ASTNode_swapChildren
Next Topic:Java Bindings
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.