This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: disutils fails with GNU ld (GNU Binutils)
Type: compile error Stage:
Components: Distutils Versions: Python 2.5
Status: closed Resolution: duplicate
Dependencies: Superseder: fails for latest MinGW releases.
View: 2234
Assigned To: Nosy List: benjamin.peterson, georg.brandl, jameinel
Priority: high Keywords: easy, patch

Created on 2008-05-30 21:33 by jameinel, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
cygwinccompiler.diff jameinel, 2008-05-30 21:58 Patch changing regex
Messages (5)
msg67557 - (view) Author: John Arbash Meinel (jameinel) Date: 2008-05-30 21:33
I just upgraded my cygwin installation to the latest versions. Which
seems to include
GNU ld (GNU Binutils)
GNU dllwrap (GNU Binutils)

It seems that their version notation is now Major.Minor.Micro.Date
The problem is that in '' it does:

        result ='(\d+\.\d+(\.\d+)*)',out_string)
        if result:
            ld_version = StrictVersion(

Which matches the full version string. However "StrictVersion" only
supports A.B.CdE formats. So the .Date breaks the parser.

My workaround was to change the regex to be:
        result ='(\d+\.\d+(\.\d+)?)(\.\d+)*',out_string)

So it will still match an unlimited number of '.DDD' as it used to, but
now it only preserves the first 3 to pass to StrictVersion.

This may not be the correct fix, as a better fix might be to use
something else instead of StrictVersion (since these version numbers
explicitly *don't* match what StrictVersion expects.)
msg67561 - (view) Author: John Arbash Meinel (jameinel) Date: 2008-05-30 21:58
Quick patch that changes the regex
msg67641 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-06-02 22:02
Do you need the (\.\d+)* trailer in the regex at all?
msg67643 - (view) Author: John Arbash Meinel (jameinel) Date: 2008-06-02 22:14
Hash: SHA1

Georg Brandl wrote:
| Georg Brandl <> added the comment:
| Do you need the (\.\d+)* trailer in the regex at all?
| ----------
| nosy: +georg.brandl

Not sure. The actual revision is:

The code used to allow lots of version numbers, and I didn't know if we wanted
to require that or not.

Certainly just changing * => ? is a simpler fix. And since we don't end with $
or anything, it should still match.


Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla -

msg67927 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-06-10 21:26
This seems to be the same as #2234.
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47263
2008-06-12 06:02:04georg.brandlsetstatus: open -> closed
resolution: duplicate
2008-06-10 21:26:11benjamin.petersonsetnosy: + benjamin.peterson
superseder: fails for latest MinGW releases.
messages: + msg67927
2008-06-02 22:14:30jameinelsetmessages: + msg67643
2008-06-02 22:02:48georg.brandlsetnosy: + georg.brandl
messages: + msg67641
2008-05-30 21:58:40jameinelsetfiles: + cygwinccompiler.diff
keywords: + patch
messages: + msg67561
2008-05-30 21:50:53benjamin.petersonsetpriority: high
keywords: + easy
2008-05-30 21:34:06jameinelsetcomponents: + Distutils
2008-05-30 21:33:54jameinelcreate