[ python-Bugs-978662 ] can't compile _localemodule.c w/o --enable-toolbox-glue

SourceForge.net noreply at sourceforge.net
Fri Jun 25 23:41:31 EDT 2004

Bugs item #978662, was opened at 2004-06-23 18:56
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 

Category: Macintosh
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Brett Cannon (bcannon)
Assigned to: Jack Jansen (jackjansen)
Summary: can't compile _localemodule.c w/o --enable-toolbox-glue

Initial Comment:
Line 412 of Modules/_localemodule.c calls PyMac_getscript() which 
is within a ``#if defined(__APPLE__)`` block.  Trouble is that the 
code is in Python/mactoolboxglue.c which is not compiled if --
disable-toolbox-glue is a compile option (which it was on my OS X 
10.3.4 box).  Probably shouldn't have a compile failure thanks to ld 
not finding the symbol; should probably either just not compile the 
module, change the #if block, or change the function.


>Comment By: Brett Cannon (bcannon)
Date: 2004-06-25 20:41

Logged In: YES 

grep agrees with you, Jack:

drifty at Bretts-Computer>grep -rl PyMac_getscript *

So we could just copy and paste it (and fix the spelling of Fredrik's last 
name  =).  But will those CF* functions be linked properly w/o a 
framework build?

I didn't see any macro definitions or anything to signal when a toolbox 
glue build was being done, but it would not hurt to define that.  I get a 
ton of linking errors for any module that has Carbon with this ``--
disable-framework --disable-toolbox-glue`` build that I have been 
fiddling with.  Should we try to make it so that those modules are built 
only if some flag is set somewhere signifying that the proper OS X-
specific build options are not turned off?

Or am I just being so totally non-standard with these build options (only 
done to try to build faster on my old iBook) that it is not worth the 


Comment By: Jack Jansen (jackjansen)
Date: 2004-06-25 04:56

Logged In: YES 

There are two solutions:
1) Move PyMac_getscript() to _localemodule.
2) Copy PyMac_getscript() to _localemodule.
3) #ifdef PyLocale_getdefaultlocale in _localemodule on something set by 

1) means we can't really put the external declaration in macglue.h any 
more (_localemodule needn't be configured), but I don't think it's used by 
anything but localemodule, so it's probably the best solution.

Still, this is an incompatible change, so we shouldn't backport it.


You can respond by visiting: 

More information about the Python-bugs-list mailing list