classification
Title: Recursive variable definition causes sysconfig infinite loop
Type: behavior Stage:
Components: Distutils Versions: Python 3.1, Python 2.7, Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, lyren, schmir, tarek (4)
Priority: normal Keywords

Created on 2004-03-19 03:15 by lyren, last changed 2009-02-16 16:32 by akitada.

Files
File name Uploaded Description Edit Remove
backtrace.txt lyren, 2004-03-19 03:15 Backtrace after Control-C
issue919238_sysconfig_recursive_definition.txt schmir, 2008-01-12 23:13 patch against trunk which fixes this issue
issue919238_sysconfig_recursive_definition.txt schmir, 2008-01-13 00:03 patch against trunk which fixes this issue + test case
Messages (4)
msg20269 - (view) Author: Lyren Brown (lyren) Date: 2004-03-19 03:15
If you put the following line in Modules/Setup:

  SELF=$(SELF)

and then type "make", sysconfig.py's parse_makefile
function gets into an infinite loop.  Attached is a
backtrace after typing Control-C during the infinite loop.

Here is the (honest?) mistake that I made in Setup that
triggered this (Notice the extra "\"):

PURE_STUBLIBS=-lpurify_stubs -lquantify_stubs \
	-L/foo/lib \
	-R/foo/lib \
pure puremodule.c $(WHICH_PURE_PRODUCTS) $(PURE_INCLS)
$(PURE_STUBLIBS)
msg59843 - (view) Author: Ralf Schmitt (schmir) Date: 2008-01-12 23:12
This is still applies for trunk.

I've added the following lines to Makefile (in the top level directory).

SELF=$(SELFA)
SELFA=$(SELF)

Running make then hangs.
I'm attaching a patch, which fixes this issue (against trunk). Running
make now prints:

~/python-trunk/ make                                             
ralf@rat64 ok
sysconfig.py: warning: could not resolve names from makefile (recursive
definition?): {'SELFA': '$(SELF)', 'SELF': '$(SELFA)'}
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers

Failed to find the necessary bits to build these modules:
_bsddb            _tkinter          bsddb185       
dbm               dl                gdbm           
imageop           sunaudiodev                      
To find the necessary bits, look in setup.py in detect_modules() for the
module's name.

running build_scripts
msg62825 - (view) Author: Georg Brandl (georg.brandl) Date: 2008-02-23 22:38
Is a "print" really the right way to emit this warning?
msg62980 - (view) Author: Ralf Schmitt (schmir) Date: 2008-02-25 12:40
distutils.extension has:

            if warnings is not None:
                warnings.warn(msg)
            else:
                sys.stderr.write(msg + '\n')
History
Date User Action Args
2009-02-16 16:32:10akitadasetnosy: + tarek
type: behavior
versions: + Python 3.1, Python 2.7, - Python 2.5, Python 2.4, Python 2.3
2008-02-25 12:40:04schmirsetmessages: + msg62980
2008-02-23 22:38:46georg.brandlsetnosy: + georg.brandl
messages: + msg62825
2008-01-13 00:03:06schmirsetfiles: + issue919238_sysconfig_recursive_definition.txt
2008-01-12 23:13:50schmirsetfiles: + issue919238_sysconfig_recursive_definition.txt
2008-01-12 23:12:58schmirsetnosy: + schmir
messages: + msg59843
versions: + Python 2.6, Python 2.5, Python 2.4
2004-03-19 03:15:15lyrencreate