Re: [f2py] mac os x: gcc issues when compiling

Timothy Duly <[email protected]> Tue, 21 Aug 2012 16:04:12 -0500
Newsgroups gmane.comp.python.f2py.user
Message-ID <CACxRaQ-snGb1912aDK3nnwgecdzJfkCXJeErzJZdehw5PKU8kQ@mail.gmail.com>
--===============8818023056158376934==
Content-Type: multipart/alternative; boundary=00235429dc24d886fc04c7ccf71c

--00235429dc24d886fc04c7ccf71c
Content-Type: text/plain; charset=ISO-8859-1

Curiously, the problem was solved by removing the --f77flags="-std=legacy"
option. So it looked like:

f2py -c sig_file_patched.pyf igrf11_modified.f

Thanks,
Tim

On Tue, Aug 21, 2012 at 1:27 PM, Timothy Duly <[email protected]> wrote:

> 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
>
>

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

Curiously, the problem was solved by removing the --f77flags=3D&quot;-std=
=3Dlegacy&quot; option. So it looked like:<div><br></div><div>f2py -c sig_f=
ile_patched.pyf igrf11_modified.f</div><div><br></div><div>Thanks,</div><di=
v>Tim<br>
<br><div class=3D"gmail_quote">On Tue, Aug 21, 2012 at 1:27 PM, Timothy Dul=
y <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_bl=
ank">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail=
_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:=
1ex">
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" ta=
rget=3D"_blank">https://gist.github.com/3418109</a></div><div><br></div><di=
v>which says that gcc-4.0 is not found. =A0gcc is on my machine, but not a =
gcc-4.0. =A0Why did 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" t=
arget=3D"_blank">https://gist.github.com/3418144</a></div><div><div><br></d=
iv><div>And I get this strange error:=A0</div><div><br></div><div>error: do=
n&#39;t know how to compile C/C++ code on platform &#39;posix&#39; with &#3=
9;gcc&#39; compiler</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>
</blockquote></div><br></div>

--00235429dc24d886fc04c7ccf71c--


--===============8818023056158376934==
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

--===============8818023056158376934==--