python packages struggling with GCC 4.7

Gerald Pfeifer gerald at pfeifer.com
Sun Feb 23 05:47:56 UTC 2014


On Thu, 5 Dec 2013, Gerald Pfeifer wrote:
> On Wed, 4 Dec 2013, William Grzybowski wrote:
>> It looks like the build is not respecting FFLAGS, so no -Wl,rpath= for 
>> gfortran. As far as it working for gcc46, it looks like it fails to 
>> detect gfortran46 as a compiler and uses gcc46, which respects CFLAGS.
> 
> That is, hmm, interesting. =:-)  Nice analysis.
> 
>> Can you try http://people.freebsd.org/~wg/py-numpy.patch  ?
> 
> Thanks for the patch!  
> 
> Is there any chance that someone on python@ can give it a try?  That 
> would be great since I am traveling right now and hardly can test.

No takers? :-)  With some unplanned offline-ness on my side, this
has now taken far longer than I had hoped for, but I managed to test
this patch now (reproducing both the original failure and then a build
without) -- and this patch, once I got it to apply, works!

Thanks a lot.

Shall I go ahead and commit it, or would you prefer to?

Gerald

Index: math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py
===================================================================
--- math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py	(revision 345690)
+++ math/py-numpy/files/patch-numpy-distutils-fcompiler-gnu.py	(working copy)
@@ -17,7 +17,16 @@
 +    g2c = '%%FC%%'
  
      suggested_f90_compiler = 'gnu95'
+
+@@ -101,6 +101,8 @@
  
+     def get_flags_linker_so(self):
+         opt = self.linker_so[1:]
++        if 'FFLAGS' in os.environ:
++            opt.append(os.environ['FFLAGS'])
+         if sys.platform=='darwin':
+             target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', None)
+             # If MACOSX_DEPLOYMENT_TARGET is set, we simply trust the value 
 @@ -249,7 +249,7 @@
      #       GNU Fortran 95 (GCC) 4.2.0 20060218 (experimental)
      #       GNU Fortran (GCC) 4.3.0 20070316 (experimental)


More information about the freebsd-python mailing list