This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with python ctypes module


Hello,

I have found the following problem on Windows XP with Cygwin 1.7.29:
If I build a Fortran dll and try to load it from Python by means of the ctypes module, python.exe crashes after LoadLibrary returned.
That problem may be reproduced with the files in the attachment.

Just type
tar -zxvf pyfor.tar.gz
make test

I have installed the following software:

Betriebssystemname	Microsoft Windows XP Professional
Version	5.1.2600 Service Pack 3 Build 2600
Python 2.7.3
ctypes 1.1.0
GNU Fortran (GCC) 4.8.2

Here is the output of the following commands:

$ uname -a
CYGWIN_NT-5.1 P5915 1.7.29(0.272/5/3) 2014-04-07 13:44 i686 Cygwin

$ ldd test.dll
        ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c910000)
        kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c800000)
        cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
        cyggfortran-3.dll => /usr/bin/cyggfortran-3.dll (0x69980000)
        cygquadmath-0.dll => /usr/bin/cygquadmath-0.dll (0x62600000)
        cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll (0x6fae0000)

$ make test
python test.py
loading ..
done
Makefile:4: recipe for target 'test' failed
make: *** [test] Aborted (Speicherauszug erstellt)

The problem seems to be related to the Fortran runtime libraries.
If the PRINT statement in test.f95 is removed, the problem disappears:

MODULE TEST
CONTAINS
SUBROUTINE RUN()
!~ PRINT *, 'RUNNING'
END SUBROUTINE
END MODULE

Best regards,
R. Resch

Attachment: pyfor.tar.gz
Description: pyfor.tar.gz

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]