On 14.04.2007, at 09:39, Jochen Küpper wrote:
I am trying to install py-scipy using MacPorts, but always end up with the errors listed below.
I have the following gcc-ports installed: gcc41 lang/gcc41 4.1.2 The GNU compiler collection gcc42 lang/gcc42 4.2-20070307 The GNU compiler collection, prerelease BETA
Ok, I have looked around a bit more and realized, that the py-numpy Portfiel uses different compilers for PPC and Intel: variant darwin powerpc { depends_build-append port:gcc41 post-patch { reinplace "s:MACPORTS_FORTRAN:gfortran-dp-4.1:g" $ {worksrcpath}/numpy/distutils/fcompiler/gnu.py reinplace "s:MACPORTS_PREFIX:${prefix}:g" $ {worksrcpath}/numpy/distutils/system_info.py reinplace "s:MACPORTS_GCCPORT:gcc41:g" $ {worksrcpath}/numpy/distutils/system_info.py } } variant darwin i386 { depends_build-append port:gcc41 post-patch { reinplace "s:MACPORTS_FORTRAN:gfortran-dp-4.2:g" $ {worksrcpath}/numpy/distutils/fcompiler/gnu.py reinplace "s:MACPORTS_PREFIX:${prefix}:g" $ {worksrcpath}/numpy/distutils/system_info.py reinplace "s:MACPORTS_GCCPORT:gcc42:g" $ {worksrcpath}/numpy/distutils/system_info.py } } Started wondering whay that is (why is it?), but also pragmatically decided to set i386 to gcc41 as well... This allowed me to build py-numpy and py-scipy, but using scipy does not work, i.e. when trying to "from scipy import *" the symbols, python crashes: Running it in gdb gives the following backtrace: #0 0x900dfb26 in strtod_l () #1 0x90030a66 in strtod () #2 0x002ac1b6 in PyOS_ascii_strtod (nptr=0xbfff7460 "1.", '0' <repeats 15 times>, "1e-05", endptr=0x0) at Python/pystrtod.c:159 #3 0x002ac461 in PyOS_ascii_atof (nptr=0xbfff7460 "1.", '0' <repeats 15 times>, "1e-05") at Python/pystrtod.c:257 #4 0x002a04c3 in r_object (p=0xbfffbb30) at Python/marshal.c:484 #5 0x002a077e in r_object (p=0xbfffbb30) at Python/marshal.c:581 #6 0x002a0539 in r_object (p=0xbfffbb30) at Python/marshal.c:651 #7 0x002a0d9d in PyMarshal_ReadLastObjectFromFile (fp=0xa000be50) at Python/marshal.c:804 #8 0x0029d3ff in load_source_module (name=0xbfffc4d7 "scipy.linalg.iterative", pathname=0xbfffc037 "/opt/local/lib/ python2.4/site-packages/scipy/linalg/iterative.py", fp=0xa000bdf8) at Python/import.c:723 #9 0x0029e22f in import_submodule (mod=0x1371910, subname=0xbfffc4e4 "iterative", fullname=0xbfffc4d7 "scipy.linalg.iterative") at Python/ import.c:2266 #10 0x0029e461 in load_next (mod=0x1371910, altmod=0x2e0160, p_name=0xbfffc4e4, buf=0xbfffc4d7 "scipy.linalg.iterative", p_buflen=0xbfffc8d8) at Python/import.c:2086 #11 0x0029e915 in PyImport_ImportModuleEx (name=0x143d69c "iterative", globals=0x595d0, locals=0x595d0, fromlist=0x1366bd0) at Python/import.c:1921 #12 0x00271adb in builtin___import__ (self=0x0, args=0x50ab0) at Python/bltinmodule.c:45 #13 0x0020e213 in PyObject_Call (func=0xf260, arg=0x50ab0, kw=0x0) at Objects/abstract.c:1795 #14 0x00279a86 in PyEval_CallObjectWithKeywords (func=0xf260, arg=0x50ab0, kw=0x0) at Python/ceval.c:3430 #15 0x0027c63b in PyEval_EvalFrame (f=0x635370) at Python/ceval.c:2020 #16 0x00280c62 in PyEval_EvalCodeEx (co=0x143b6a0, globals=0x595d0, locals=0x595d0, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2736 #17 0x00280ea2 in PyEval_EvalCode (co=0x143b6a0, globals=0x595d0, locals=0x595d0) at Python/ceval.c:484 #18 0x0029ce90 in PyImport_ExecCodeModuleEx (name=0xbfffdae7 "scipy.linalg", co=0x143b6a0, pathname=0xbfffcd4f "/opt/local/lib/ python2.4/site-packages/scipy/linalg/__init__.pyc") at Python/ import.c:631 #19 0x0029d246 in load_source_module (name=0xbfffdae7 "scipy.linalg", pathname=0xbfffcd4f "/opt/local/lib/python2.4/site-packages/scipy/ linalg/__init__.pyc", fp=0xa000bda0) at Python/import.c:909 #20 0x0029dd53 in load_package (name=0xbfffdae7 "scipy.linalg", pathname=0x1374a20 "\003") at Python/import.c:965 #21 0x0029e22f in import_submodule (mod=0x57290, subname=0x57634 "linalg", fullname=0xbfffdae7 "scipy.linalg") at Python/import.c:2266 #22 0x0029e7c2 in ensure_fromlist (mod=0x57290, fromlist=0x585d0, buf=0xbfffdae7 "scipy.linalg", buflen=5, recursive=1) at Python/ import.c:2177 #23 0x0029e726 in ensure_fromlist (mod=0x57290, fromlist=0x2b490, buf=0xbfffdae7 "scipy.linalg", buflen=5, recursive=0) at Python/ import.c:2156 #24 0x0029ec09 in PyImport_ImportModuleEx (name=0x572b4 "scipy", globals=0x20a50, locals=0x20a50, fromlist=0x2b490) at Python/import.c: 1948 #25 0x00271adb in builtin___import__ (self=0x0, args=0x1fb10) at Python/bltinmodule.c:45 #26 0x0020e213 in PyObject_Call (func=0xf260, arg=0x1fb10, kw=0x0) at Objects/abstract.c:1795 #27 0x00279a86 in PyEval_CallObjectWithKeywords (func=0xf260, arg=0x1fb10, kw=0x0) at Python/ceval.c:3430 #28 0x0027c63b in PyEval_EvalFrame (f=0x608c30) at Python/ceval.c:2020 #29 0x00280c62 in PyEval_EvalCodeEx (co=0x4ede0, globals=0x20a50, locals=0x20a50, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2736 #30 0x00280ea2 in PyEval_EvalCode (co=0x4ede0, globals=0x20a50, locals=0x20a50) at Python/ceval.c:484 #31 0x002a7736 in PyRun_InteractiveOneFlags (fp=0xa0001be0, filename=0x2d1648 "<stdin>", flags=0xbfffe508) at Python/pythonrun.c: 1265 #32 0x002a7851 in PyRun_InteractiveLoopFlags (fp=0xa0001be0, filename=0x2d1648 "<stdin>", flags=0xbfffe508) at Python/pythonrun.c:695 #33 0x002a8590 in PyRun_AnyFileExFlags (fp=0xa0001be0, filename=0x2d1648 "<stdin>", closeit=0, flags=0xbfffe508) at Python/ pythonrun.c:658 #34 0x002b18b8 in Py_Main (argc=0, argv=0xbfffe58c) at Modules/main.c: 493 #35 0x000018ee in _start () #36 0x00001815 in start () Why do we need gcc42 for py-numpy? I'll now try to reinstall gcc42 and py-numpy and see where I get this time;/ Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen- Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll