delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/05/21/15:14:40

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:mime-version; q=dns; s=default; b=VIZY/Uf3bWwM/lp4lWHrpnqO1N2zs
zDOeykLyMm8Xpp/5LBcNmVrPDM4yirSHwOuxPKGqK8Sw1D9kBCJfZdoupXF1jT3O
J5VZXTUSCRZUvwHnF07Tpi54HPLP3F2Ia8oQ4o4Boyi4h9jqytSai8Yd6t3CQCFZ
pvnayddA1u22Cw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:mime-version; s=default; bh=joVTeEFYNwYLzjmZVcFcNDWds38=; b=Zs4
QjgZDlmF9KFJW7hLkZn057GqveZPaW+FQI1XFqlvJ2+HjuLCr15xuuAqQTs1RbD1
wWDAlcpyx8OOoxmIMM1jThwxfvkAzpE9kychVoVunSEB7mfHgXk6Ab2XG+CKYieY
NDWFuBjXnFfolhMAMCL2uxdfJeGGTg8/sJN/ZkAQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: Yes, score=6.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS,ZIP_ATTACHED autolearn=no version=3.3.2
X-HELO: mail2.consinto.com
From: Resch Reinhard <R DOT RESCH AT secop DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Problem with python ctypes module
Date: Wed, 21 May 2014 19:14:13 +0000
Message-ID: <C62B25A8BA18044BAD2079B4CA8429DD395350@secexnue01>
MIME-Version: 1.0
X-IsSubscribed: yes

--_002_C62B25A8BA18044BAD2079B4CA8429DD395350secexnue01_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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 cty=
pes 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 =3D> /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c910000)
        kernel32.dll =3D> /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c80=
0000)
        cygwin1.dll =3D> /usr/bin/cygwin1.dll (0x61000000)
        cyggfortran-3.dll =3D> /usr/bin/cyggfortran-3.dll (0x69980000)
        cygquadmath-0.dll =3D> /usr/bin/cygquadmath-0.dll (0x62600000)
        cyggcc_s-1.dll =3D> /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

--_002_C62B25A8BA18044BAD2079B4CA8429DD395350secexnue01_
Content-Type: application/gzip; name="pyfor.tar.gz"
Content-Description: pyfor.tar.gz
Content-Disposition: attachment; filename="pyfor.tar.gz"; size=420;
	creation-date="Wed, 21 May 2014 19:00:34 GMT";
	modification-date="Wed, 21 May 2014 19:00:34 GMT"
Content-Transfer-Encoding: base64

H4sIAOrzfFMAA+3WXWuCUBgHcG934HyHByl6YTmPZrJYsJdixMqGGbsbWGrJ
nIqdXfTtd7SXbRej3VgMnh+Ces5zfMO/R+6vuRJcG1KJVME0jHzNzI5WrMVS
tOeYziSm6brJTGbouqQyZnSYBGqZF7X3seZuBiDZfhiv3Mz7re5J9J/iek5s
POnPRgNwBlOHkoeJ5dwNrSkl09m9PZk5Q2sA9syqNyh5toeWA81LqIkGa2g9
1igZWH34qtzubw9IyblvDP0Jz/Ofbko9x/H8tw/5b2ssz39HNTD/pxBkyTss
+Cb11xC+p0nGoUlJmoUxBzlKXC+Ml6AoMiVROIceLLwoUkaifRTOMzfb1GXl
qniHRLvcOIz0ktiXz31v6Lix++YHYeSXeY5j+deY+S3/xfxvairm/xTcKOrC
PsCUUJJvd8HNdy7SDV8lMezmiH1vXrkbk4iiZSA+GpkbQ2stnp/vQeUVWglU
bkUfJVUl6VbzH8wflS/i+KKeez3RA60FVG62Y879OBBCCCGEEEIIIYQQQggh
hBBC6N/6BH7uNwQAKAAA


--_002_C62B25A8BA18044BAD2079B4CA8429DD395350secexnue01_
Content-Type: text/plain; charset=us-ascii

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019