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: pgen fails with unresolved symbols
Type: Stage:
Components: Build Versions: Python 2.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: barry Nosy List: barry, rpmoseley, tim.peters
Priority: release blocker Keywords:

Created on 2001-12-21 15:43 by rpmoseley, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
495875.txt barry, 2001-12-21 16:20
Messages (5)
msg8424 - (view) Author: Richard Moseley (rpmoseley) Date: 2001-12-21 15:43
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.
msg8425 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-12-21 16:09
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.
msg8426 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2001-12-21 16:20
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.
msg8427 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2001-12-21 16:23
Logged In: YES 
user_id=31435

Barry, this is fine -- check it in.
msg8428 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2001-12-21 16:32
Logged In: YES 
user_id=12800

Patch applied to both the trunk and release-22 branch.
History
Date User Action Args
2022-04-10 16:04:49adminsetgithub: 35812
2001-12-21 15:43:01rpmoseleycreate