[SciPy-user] Compilein debug version of extension using numpy.distutils

David Cournapeau cournape@gmail....
Fri Jun 26 05:11:04 CDT 2009


2009/6/25 Berthold "Höllmann" <berthold.hoellmann@gl-group.com>:
>
> I have a set of python extension modules bundled into one
> project. Trying to compile a debug version of these extensions i run
> into a strange problem:
>
>  $ /cygdrive/c/Python25_d/python_d.exe setup.py config_fc --fcompiler=intelv --f77flags=/fpp --f90flags=/fpp --debug build_ext
>  ...
>  LINK : fatal error LNK1104: Datei 'python25.lib' kann nicht geöffnet werden
>  ...
>  (error says: can't open 'python25.lib', it shoud use 'python25_d.lib' instead)
>
>  $ /cygdrive/c/Python25_d/python_d.exe setup.py config_fc --fcompiler=intelv --f77flags=/fpp --f90flags=/fpp --debug build_ext  --debug
>  ...
>  ifort: command line error: option '/g' is ambiguous
>  ...
>
>  $ ifort
>  Intel(R) Visual Fortran Compiler Professional for applications running on IA-32, Version 11.0    Build 20090318 Package ID: w_cprof_p_11.0.074
>  Copyright (C) 1985-2009 Intel Corporation.  All rights reserved.
>
>  $ cl
>  Microsoft (R) 32-Bit C/C++-Standardcompiler Version 13.10.3077 f?r 80x86
>  Copyright (C) Microsoft Corporation 1984-2002. Alle Rechte vorbehalten.
>
>  $ python -c "import numpy;print numpy.version.version;import sys; print sys.version"
>  1.3.0
>  2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
>
> What am I supposed to do to get a debug version of my extensions?
>

You can get a debug version of your extensions without using a debug
version of python - using a debug version of python for your
extensions is a lot of work (especially on windows), and you will have
to dig in the code yourself to do it, most likely.

To build a debug extension of an extension with the normal python
interpreter, use the -g option, e.g.:

python setup.py build_ext -g

cheers,

David


More information about the SciPy-user mailing list