For some reason, stats/statlib refuses to build for me anymore. I did not make any changes to this file, yet on the last few build attempts I get the error below, which is obviously related to not seeing the python framework. However, I have the updated gnufcompiler.py, which contains the following for OSX: opt.extend(["-Wl,-framework","-Wl,Python","-lcc_dynamic","-bundle"]) So, I'm completely at a loss as to why these do not get appended to the compile options. Any ideas? Thanks, C. /usr/local/bin/g77 -lcc_dynamic build/temp.darwin-7.2.0-Power_Macintosh-2.3/usr/local/src/scipy/Lib/ stats/statlibmodule.o build/temp.darwin-7.2.0-Power_Macintosh-2.3/build/src/fortranobject.o -L/usr/local/lib/gcc/powerpc-apple-darwin7.0.0/3.4 -Lbuild/temp.darwin-7.2.0-Power_Macintosh-2.3 -lstatlib -lg2c -o build/lib.darwin-7.2.0-Power_Macintosh-2.3/stats/statlib.so /usr/bin/ld: Undefined symbols: _PyArg_ParseTuple _PyArg_ParseTupleAndKeywords _PyCObject_AsVoidPtr _PyCObject_Type _PyComplex_Type _PyDict_GetItemString _PyDict_SetItemString _PyErr_Clear _PyErr_NewException _PyErr_Occurred _PyErr_Print _PyErr_SetString _PyImport_ImportModule _PyInt_Type _PyModule_GetDict _PyNumber_Int _PyObject_GetAttrString _PyObject_IsTrue _PySequence_Check _PySequence_GetItem _PyString_FromString _PyString_Type _PyType_IsSubtype _PyType_Type _Py_BuildValue _Py_FatalError _Py_InitModule4 __Py_NoneStruct _PyDict_DelItemString _PyDict_New _PyErr_Format _PyExc_AttributeError _PyExc_RuntimeError _PyExc_TypeError _PyObject_Free _PyString_ConcatAndDel _Py_FindMethod __PyObject_New _MAIN__ collect2: ld returned 1 exit status error: Command "/usr/local/bin/g77 -lcc_dynamic build/temp.darwin-7.2.0-Power_Macintosh-2.3/usr/local/src/scipy/Lib/ stats/statlibmodule.o build/temp.darwin-7.2.0-Power_Macintosh-2.3/build/src/fortranobject.o -L/usr/local/lib/gcc/powerpc-apple-darwin7.0.0/3.4 -Lbuild/temp.darwin-7.2.0-Power_Macintosh-2.3 -lstatlib -lg2c -o build/lib.darwin-7.2.0-Power_Macintosh-2.3/stats/statlib.so" failed with exit status 1 C. -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia
On Fri, 12 Mar 2004, Christopher Fonnesbeck wrote:
For some reason, stats/statlib refuses to build for me anymore. I did not make any changes to this file, yet on the last few build attempts I get the error below, which is obviously related to not seeing the python framework. However, I have the updated gnufcompiler.py, which contains the following for OSX:
opt.extend(["-Wl,-framework","-Wl,Python","-lcc_dynamic","-bundle"])
So, I'm completely at a loss as to why these do not get appended to the compile options.
Any ideas?
Acctually, the latest CVS version of gnufcompiler.py contains if sys.platform=='darwin': if sys.executable.startswith('/usr/bin'): # This is when Python is from Apple framework opt.extend(["-Wl,-framework","-Wl,Python"]) #else we are running in Fink python. opt.extend(["-lcc_dynamic","-bundle"]) else: ... which means that in your case Python is assumed to be Fink Python but obviously (?) you are using Apple Python that is just installed to nonstandard (?) location. Could you guys and girls running on OSX find out what is the most robust way to determine that Python is either of Apple or Fink one? May be sys.version should be used instead of sys.executable for that? Thanks, Pearu
On Mar 13, 2004, at 3:49 AM, Pearu Peterson wrote:
Acctually, the latest CVS version of gnufcompiler.py contains
if sys.platform=='darwin': if sys.executable.startswith('/usr/bin'): # This is when Python is from Apple framework opt.extend(["-Wl,-framework","-Wl,Python"]) #else we are running in Fink python. opt.extend(["-lcc_dynamic","-bundle"]) else: ...
which means that in your case Python is assumed to be Fink Python but obviously (?) you are using Apple Python that is just installed to nonstandard (?) location. Could you guys and girls running on OSX find out what is the most robust way to determine that Python is either of Apple or Fink one? May be sys.version should be used instead of sys.executable for that?
Python is in /usr/bin, so I'm not sure why it isnt working. There is nothing non-standard about my installation, AFAIK. Do people really use fink python? C. -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia
On Sat, 13 Mar 2004, Christopher Fonnesbeck wrote:
On Mar 13, 2004, at 3:49 AM, Pearu Peterson wrote:
Acctually, the latest CVS version of gnufcompiler.py contains
if sys.platform=='darwin': if sys.executable.startswith('/usr/bin'): # This is when Python is from Apple framework opt.extend(["-Wl,-framework","-Wl,Python"]) #else we are running in Fink python. opt.extend(["-lcc_dynamic","-bundle"]) else: ...
Python is in /usr/bin, so I'm not sure why it isnt working. There is nothing non-standard about my installation, AFAIK.
Sorry, I misread the output messages: g77 was in /usr/local but that shouldn't matter. I tested on Linux, if python executable is /usr/bin/python then sys.executable.startswith('/usr/bin') returns True, so the above codelet should be correct. Try installing scipy_core (from CVS) first and then build scipy.
Do people really use fink python?
I don't know. Yes, I guess as I have recieved patches from fink users. But why shouldn't they, fink is existing and so there must be also users.. Regards, Pearu
Do people really use fink python?
I don't know. Yes, I guess as I have recieved patches from fink users. But why shouldn't they, fink is existing and so there must be also users..
Yes. At least one package, vpython, runs only on fink python.
On Mar 13, 2004, at 9:49 AM, Pearu Peterson wrote:
On Fri, 12 Mar 2004, Christopher Fonnesbeck wrote:
For some reason, stats/statlib refuses to build for me anymore. I did not make any changes to this file, yet on the last few build attempts I get the error below, which is obviously related to not seeing the python framework. However, I have the updated gnufcompiler.py, which contains the following for OSX:
opt.extend(["-Wl,-framework","-Wl,Python","-lcc_dynamic","-bundle"])
So, I'm completely at a loss as to why these do not get appended to the compile options.
Any ideas?
Acctually, the latest CVS version of gnufcompiler.py contains
if sys.platform=='darwin': if sys.executable.startswith('/usr/bin'): # This is when Python is from Apple framework opt.extend(["-Wl,-framework","-Wl,Python"]) #else we are running in Fink python. opt.extend(["-lcc_dynamic","-bundle"]) else: ...
which means that in your case Python is assumed to be Fink Python but obviously (?) you are using Apple Python that is just installed to nonstandard (?) location. Could you guys and girls running on OSX find out what is the most robust way to determine that Python is either of Apple or Fink one? May be sys.version should be used instead of sys.executable for that?
It's possible that sys.executable could also start with /System if you use a pythonw shell script. [crack:~/src/stackless/Stackless] bob% pythonw -c "import sys; print sys.executable" /System/Library/Frameworks/Python.framework/Versions/2.3/Resources/ Python.app/Contents/MacOS/Python [crack:~/src/stackless/Stackless] bob% python -c "import sys; print sys.executable" /usr/bin/python [crack:~/src/stackless/Stackless] bob% python -c "import sys,os; print os.path.realpath(sys.executable)" /System/Library/Frameworks/Python.framework/Versions/2.3/bin/python I guess it should be changed to os.path.realpath(sys.executable).startswith('/System') -bob
On Sat, 13 Mar 2004, Bob Ippolito wrote:
Could you guys and girls running on OSX find out what is the most robust way to determine that Python is either of Apple or Fink one? May be sys.version should be used instead of sys.executable for that?
I guess it should be changed to os.path.realpath(sys.executable).startswith('/System')
Thanks! It's in CVS now. Pearu
participants (4)
-
Bob Ippolito -
Christopher Fonnesbeck -
Gary Pajer -
Pearu Peterson