|
From: Daniel A. S. <st...@ic...> - 2005-09-30 04:54:37
|
Donal, On Thursday, Sep 29, 2005, at 18:30 Australia/Sydney, Donal K. Fellows wrote: > Kevin Walzer wrote: >> Earlier, the build was dying after complaining that some defintions in >> tkMacOSXInt.h had errors. Looking at the code in question, I noticed >> that the lines began with the phrase "Module Scope," like this: >> ~ MODULE_SCOPE int TkMacOSXUseAntialiasedText(Tcl_Interp *interp, int >> enable); >> Commenting out those lines and replacing them without the phrase >> "module >> scope" allowed the build to proceed, and I built Tile and Tktreectrl >> successfully in the standard fashion (not as universal binaries). > > OK, that might indicate that TkMacOSXUseAntialiasedText may need to be > promoted from a module-scoped symbol (i.e. utterly Tk-internal) to Tk's > internal stubs table. No big deal if the symbol is needed. I think the problem was more that I had introduced MODULE_SCOPE to tkaqua headers without adding the conditional definition of MODULE_SCOPE to tkInt.h from tclInt.h (will fix that when I commit various other small changes) As MODULE_SCOPE is defined by tk configure on Mac OS X, this did not show up when building tk itself, only when using internal tkaqua headers from an extension where MODULE_SCOPE is not AC_DEFINEd... >> I'm not sure why commenting out the "module scope" bits worked; I'm >> sure >> that is there for a reason, but it's not clear to me. > > The module scope stuff is about trying to clean up the Tcl/Tk core so > that symbols are exactly as widely available as they need to be. This > really stems from the fact that its introducing a concept that > traditional Unix linkers didn't support; symbol visibility wider than > the file level but less than the application level. FWIW, it appears the NEXT MachO linker had supported this with __private_extern__ for a long time, and the Mac OS X linker continues to do so, hence our #define MODULE_SCOPE __private_extern__ The only issue is that prior to Mac OS X 10.4, MODULE_SCOPE has to be present both at function declaration and function definition for the symbol to be unexported, I've started doing that in macosx specific tcl/tk sources, but not in the generic sources Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |