classification
Title: Better error message for executables not found
Type: behavior Stage:
Components: Distutils, Windows Versions: Python 3.5, Python 3.4, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: tarek Nosy List: BreamoreBoy, amaury.forgeotdarc, cmcqueen1975, eric.araujo, tarek, techtonik
Priority: low Keywords: easy

Created on 2010-04-13 01:15 by cmcqueen1975, last changed 2014-06-29 00:04 by BreamoreBoy.

Messages (8)
msg103000 - (view) Author: Craig McQueen (cmcqueen1975) Date: 2010-04-13 01:15
I tried to build a C extension in Python 3.1.2.

    \Python31\python.exe setup.py build --compiler=mingw32

I got a stack-trace:

...
  File "C:\Python31\lib\distutils\cygwinccompiler.py", line 280, in __init__
    CygwinCCompiler.__init__ (self, verbose, dry_run, force)
  File "C:\Python31\lib\distutils\cygwinccompiler.py", line 124, in __init__
    if self.ld_version >= "2.10.90":
TypeError: unorderable types: NoneType() >= str()

This is Windows 2000 SP4, with MinGW 5.1.6.
msg103035 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-04-13 11:19
Can you run the following command:
   ld -v
and paste the result?
msg103094 - (view) Author: Craig McQueen (cmcqueen1975) Date: 2010-04-13 23:29
\MinGW\bin\ld.exe -v

GNU ld (GNU Binutils) 2.20
msg103109 - (view) Author: Craig McQueen (cmcqueen1975) Date: 2010-04-14 02:21
I just realised--I didn't have c:\mingw\bin in my path. Once I added that to the path, then the build worked fine.

So I guess the issue is only that the error message is somewhat cryptic.
msg103112 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2010-04-14 07:47
Ok thanks for you test.

If it can't get the ld version I'll display this message:

"could not detect the ld version. Make sure MinGW is installed and its bin directory is in the path"

I'll do this for 2.7/3.2
msg103421 - (view) Author: anatoly techtonik (techtonik) Date: 2010-04-17 18:21
To me a better option would be an ability to specify a path to compiler from command line.

--compiler-path=./mingw/bin/gcc.exe
msg121402 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-18 01:18
Anatoly: Please open a feature request for distutils2.  Thanks in advance.

Craig: This seems to have fallen out of the radar, sorry.  Someone may propose a patch during the upcoming bug week-end, or we’ll do it.
msg221824 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-29 00:04
@Éric can you put this on your todo list if it's not already there?
History
Date User Action Args
2014-06-29 00:04:04BreamoreBoysetnosy: + BreamoreBoy

messages: + msg221824
versions: + Python 3.4, Python 3.5, - Python 3.1, Python 3.2
2010-11-18 01:18:07eric.araujosetnosy: + eric.araujo
title: Distutils C extension build with MinGW on Windows fails -> Better error message for executables not found
messages: + msg121402

versions: + Python 3.1
2010-04-17 18:21:48techtoniksetnosy: + techtonik
messages: + msg103421
2010-04-14 07:47:33tareksetpriority: low
type: crash -> behavior
messages: + msg103112

versions: + Python 2.7, Python 3.2, - Python 3.1
2010-04-14 07:44:23amaury.forgeotdarcsetkeywords: + easy
2010-04-14 02:21:36cmcqueen1975setmessages: + msg103109
2010-04-13 23:29:46cmcqueen1975setmessages: + msg103094
2010-04-13 17:15:53sridsetcomponents: + Windows
2010-04-13 11:19:01amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg103035
2010-04-13 01:15:37cmcqueen1975create