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.

classification
Title: disutils fails with GNU ld (GNU Binutils) 2.18.50.20080523
Type: compile error Stage:
Components: Distutils Versions: Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: cygwinccompiler.py 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.

Files
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) 2.18.50.20080523
and
GNU dllwrap (GNU Binutils) 2.18.50.20080523

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

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

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 = re.search('(\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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

Not sure. The actual revision is:

2.18.50.20080523

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.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhEcLUACgkQJdeBCYSNAAPO8ACggCAEx1HWnfv3FD1KAnvyGzKg
tbwAn3D6xKEbQkHWrP1dKaO4tSsE6Ito
=DpMW
-----END PGP SIGNATURE-----
msg67927 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-06-10 21:26
This seems to be the same as #2234.
History
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: cygwinccompiler.py 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