[Python-bugs-list] [ python-Bugs-495875 ] pgen fails with unresolved symbols

noreply@sourceforge.net noreply@sourceforge.net
Fri, 21 Dec 2001 08:20:45 -0800


Bugs item #495875, was opened at 2001-12-21 07:43
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=495875&group_id=5470

Category: Build
Group: Python 2.2
Status: Open
Resolution: None
Priority: 8
Submitted By: Richard Moseley (rpmoseley)
Assigned to: Barry Warsaw (bwarsaw)
Summary: pgen fails with unresolved symbols

Initial Comment:
When compiling the release candidate 1 of version 2.2 
(2.2c1) on Tru64 4.x which does not have a version of 
snprintf natively. Attempting to compile the pgen 
program which generates the graminit.[hc] files 
results in unresolved PyMem_Malloc and PyMem_Free 
since the mysnprintf makes an assumption that the 
symbols are always available. This successfully worked 
in previous versions of 2.2.

Attempting to include the relavent object for the 
symbol then results in other unresolved symbols. 
Making a change to conditionally use PyMem_* or the 
standard malloc/free calls resolves the problem.

However this may lead to using two different memory 
heaps one used by the PyMem and one by the malloc 
routines.

The problem does not occur when the underlying O/S 
libraries provide support of the snprintf() routines.

----------------------------------------------------------------------

>Comment By: Barry Warsaw (bwarsaw)
Date: 2001-12-21 08:20

Message:
Logged In: YES 
user_id=12800

Attached is the patch that fixes the problem, which I
reproduced by commenting out HAS_SNPRINTF in pyconfig.h on
my Linux box.  All tests pass.  If you can test this
immediately, please let us know asap.


----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-12-21 08:09

Message:
Logged In: YES 
user_id=31435

Whew!  This was *just* in time for 2.2 final.  This is very 
easy to fix, and assigned to Barry who is doing so.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=495875&group_id=5470