[f2py] mac os x: gcc issues when compiling

Timothy Duly <[email protected]> Tue, 21 Aug 2012 13:27:08 -0500
Newsgroups gmane.comp.python.f2py.user
Message-ID <CACxRaQ-wp3KOqfvXkNkKrx087nSDR7_P9akLuaqdMFwP_xx+jA@mail.gmail.com>
--===============2983590342654241201==
Content-Type: multipart/alternative; boundary=00248c76907621483204c7cac614

--00248c76907621483204c7cac614
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I've been trying to build my python modules from fortran code on Mac OS X.
 This code works on a Linux machine, but not on Mac.

If I run:

f2py -c sig_file_patched.pyf igrf11_modified.f --f77flags="-std=legacy"

I get: https://gist.github.com/3418109

which says that gcc-4.0 is not found.  gcc is on my machine, but not a
gcc-4.0.  Why did it think I had gcc-4.0?

Ok, so the easy solution is just to add a --compiler="gcc", right?  So I
ran:

f2py -c sig_file_patched.pyf igrf11_modified.f --f77flags="-std=legacy"
--compiler="gcc"

output: https://gist.github.com/3418144

And I get this strange error:

error: don't know how to compile C/C++ code on platform 'posix' with 'gcc'
compiler

Anyone have any idea what's going on here?  I searched google specific to
f2py and could not find anything.  As I said, this code works on a Linux
machine.

Any help would be appreciated.

Thanks,
Tim

--00248c76907621483204c7cac614
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,<div><br></div><div>I&#39;ve been trying to build my python modules from=
 fortran code on Mac OS X. =A0This code works on a Linux machine, but not o=
n Mac. =A0</div><div><br></div><div>If I run:</div><div><br></div><div>f2py=
 -c sig_file_patched.pyf igrf11_modified.f --f77flags=3D&quot;-std=3Dlegacy=
&quot;</div>
<div><br></div><div>I get:=A0<a href=3D"https://gist.github.com/3418109">ht=
tps://gist.github.com/3418109</a></div><div><br></div><div>which says that =
gcc-4.0 is not found. =A0gcc is on my machine, but not a gcc-4.0. =A0Why di=
d it think I had gcc-4.0?</div>
<div><br></div><div>Ok, so the easy solution is just to add a --compiler=3D=
&quot;gcc&quot;, right? =A0So I ran:</div><div><br></div><div>f2py -c sig_f=
ile_patched.pyf igrf11_modified.f --f77flags=3D&quot;-std=3Dlegacy&quot; --=
compiler=3D&quot;gcc&quot;=A0</div>
<div><br></div><div>output:=A0<a href=3D"https://gist.github.com/3418144">h=
ttps://gist.github.com/3418144</a></div><div><div><br></div><div>And I get =
this strange error:=A0</div><div><br></div><div>error: don&#39;t know how t=
o compile C/C++ code on platform &#39;posix&#39; with &#39;gcc&#39; compile=
r</div>
</div><div><br></div><div>Anyone have any idea what&#39;s going on here? =
=A0I searched google specific to f2py and could not find anything. =A0As I =
said, this code works on a Linux machine.</div><div><br></div><div>Any help=
 would be appreciated.</div>
<div><br>Thanks,</div><div>Tim</div><div><br></div>

--00248c76907621483204c7cac614--


--===============2983590342654241201==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
http://cens.ioc.ee/mailman/listinfo/f2py-users

--===============2983590342654241201==--