[Numpy-discussion] F2PY error with G95 on Mac OS 10.5
cournape at gmail.com
Thu Jun 11 12:58:14 EDT 2009
On Fri, Jun 12, 2009 at 12:56 AM, Samir Unni<srunni at gmail.com> wrote:
> On Wed, Jun 10, 2009 at 8:32 PM, David Cournapeau<cournape at gmail.com> wrote:
>> On Thu, Jun 11, 2009 at 5:04 AM, Samir Unni<srunni at gmail.com> wrote:
>>> On Wed, Jun 10, 2009 at 2:59 PM, Adam Mercer<ramercer at gmail.com> wrote:
>>>> On Wed, Jun 10, 2009 at 12:44, Samir Unni<srunni at gmail.com> wrote:
>>>>> I'm trying to use F2PY on Mac OS 10.5 with G95, but I'm getting the
>>>>> error "g95: unrecognized option '-shared'". I tried modifying the
>>>>> NumPy code to use the correct "-dynamic" flag, rather than the
>>>>> "-shared" flag. While that does allow for F2PY to successfully
>>>>> execute, I get the error
>>>>> Traceback (most recent call last):
>>>>> File "<stdin>", line 1, in <module>
>>>>> ImportError: dlopen(/Users/srunni/src/pdb2pqr/pdb2pqr/tinker/src/tinker/source/ese.so,
>>>>> 2): no suitable image found. Did find:
>>>>> unknown file type, first eight bytes: 0x80 0xC0 0x4F 0x00 0xEB 0x57
>>>>> 0xE0 0x8F
>>>>> when I attempt to import the generated module. Any ideas on how to fix this?
>>>> AFAIK g95 is not supported by numpy distutils on Mac OS X.
>> No it is not, at least not in your configuration: g95 cannot build
>> universal binaries, and I think the OP error is caused by this.
>> Gfortran is certainly supported.
> Running diagnose.py gives me this error:
Ignore diagnose.py for the time being - what does f2py says ?
> Is this the source of the problem? I looked at
> numpy/distutils/tests/test_fcompiler_gnu.py, and I found this:
> gfortran_version_strings = [
> ('GNU Fortran 95 (GCC 4.0.3 20051023 (prerelease) (Debian 4.0.2-3))',
> ('GNU Fortran 95 (GCC) 4.1.0', '4.1.0'),
> ('GNU Fortran 95 (GCC) 4.2.0 20060218 (experimental)', '4.2.0'),
> ('GNU Fortran (GCC) 4.3.0 20070316 (experimental)', '4.3.0'),
> My GNU Fortran version string is "GNU Fortran (GCC) 4.3.3". However,
> even after adding it to that list and reinstalling, the issue
Yes, this just looks like a unit test, so it won't change anything to
More information about the NumPy-Discussion