[SciPy-user] SciPy with gcc4 and gfortran on OS X

Zachary Pincus zpincus at stanford.edu
Fri Apr 7 22:57:18 CDT 2006


Hi folks -

Several issues:
(1) I think that the cc_dynamic library is still needed for gcc3/g77,  
so it shouldn't be removed from numpy.distutils wholesale. Removing  
cc_dynamic from *just* gnu95 is the way to go.

(2) After applying the patches that I referred to earlier, I was able  
to compile and test SciPy. Unfortunately, several of the tests fail  
with gcc4/gfortran that do not fail when I build with gcc3/g77.  
(Failures noted below.) I can now understand why gfortran is still  
somewhat suspect. I will look into rebuilding with all optimizations  
disabled to see if this fixes things. Now, I'm using a PPC chip, so I  
can just revert easily to gcc3/g77, which I will do for any real  
work. However, I'm not sure if I would feel totally comfortable using  
scipy built with gfortran on an intel chip right now, regardless of  
whether the tests work or not.

Maybe for the time being scipy should disable gfortran optimization  
until the compiler gets a bit more stable?

I'll report back with more information and a complete patch when I  
get a chance.

Zach

scipy.test failures:

======================================================================
FAIL: check_dot (scipy.lib.tests.test_blas.test_fblas1_simple)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/scipy/lib/blas/tests/test_blas.py", line 76,  
in check_dot
     assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/numpy/testing/utils.py", line 148, in  
assert_almost_equal
     assert round(abs(desired - actual),decimal) == 0, msg
AssertionError:
Items are not equal:
DESIRED: (-9+2j)
ACTUAL: (-1.9985527992248535+3.2729130506728153e-37j)

======================================================================
FAIL: check_normal (scipy.stats.tests.test_morestats.test_anderson)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/scipy/stats/tests/test_morestats.py", line  
45, in check_normal
     assert_array_less(crit[:-1], A)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/numpy/testing/utils.py", line 255, in  
assert_array_less
     assert cond,\
AssertionError:
Arrays are not less-ordered (mismatch 100.0%):
         Array 1: [ 0.538  0.613  0.736  0.858]
         Array 2: nan


======================================================================
FAIL: check_dot (scipy.linalg.tests.test_blas.test_fblas1_simple)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/scipy/linalg/tests/test_blas.py", line 75, in  
check_dot
     assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j)
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/numpy/testing/utils.py", line 148, in  
assert_almost_equal
     assert round(abs(desired - actual),decimal) == 0, msg
AssertionError:
Items are not equal:
DESIRED: (-9+2j)
ACTUAL: (-1.9985527992248535+3.2744197267816573e-37j)

----------------------------------------------------------------------
Ran 1506 tests in 11.506s

FAILED (failures=3)




On Apr 7, 2006, at 8:22 PM, Robert Kern wrote:

> Rob Hetland wrote:
>> I found that I needed to simlink
>>
>> /usr/lib/gcc/i686-apple-darwin8/4.0.1/libgcc.a -> /usr/local/lib/
>> libcc_dynamic.a
>>
>> (Similar to the previous PPC gcc4 instructions.)  That fixes the
>> missing cc_dynamic library problem for me.
>
> cc_dynamic *shouldn't* be needed for gcc 4. The fact that  
> numpy.distutils
> requests it is purely a leftover from the pre-Tiger days that I  
> haven't yet fixed.
>
> -- 
> Robert Kern
> robert.kern at gmail.com
>
> "I have come to believe that the whole world is an enigma, a  
> harmless enigma
>  that is made terrible by our own mad attempt to interpret it as  
> though it had
>  an underlying truth."
>   -- Umberto Eco
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user



More information about the SciPy-user mailing list