Skip to content
Tcl Source Code View Ticket
Login

View Ticket

tclConfig.h not installed on Mac OS X

Closed / Invalid3181878fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2011-02-15 07:52:12
Platform: Mac OS X, 10.4/10.5/10.6

In older Tcl versions, the TCL_DEFS variable in tclConfig.sh contained the full list of #defines. In recent versions, TCL_DEFS instead refers to tclConfig.h using the "-imacros" option of GCC:
TCL_DEFS='-DHAVE_TCL_CONFIG_H  -imacros tclConfig.h'

The problem is that tclConfig.h is listed as a private header and therefore not installed by default. This breaks compilation of a program against libtcl when the default installation options were used.
dkfplain2011-02-15 16:43:08
It should be noted here that it's not been recommended to use TCL_DEFS for some time; they represent Tcl's build configuration, not some extension's. That said, it used to work (at least somewhat) so this is a regression.
dasplain2011-02-15 16:50:25
This only happens when you use the incorrect buildsystem, specifically the configure in macosx. This enables use autoheader-generated tclConfig.h and is only there to support building tcltest from the Xcode project for debugging.

Please follow the instructions in tcl/macosx/README on how to build, i.e. either use macosx/GNUmakefile or the unix/configure directly.
mthuurneplain2011-02-15 17:37:33
@das: Indeed the problem does not occur when using the "unix" configure instead of the "macosx" one, as TCL_DEFS does not refer to tclConfig.h then. Thanks for the suggestion.

@dkf: I'm not compiling an extension, I'm compiling a program that embeds the Tcl interpreter. It is unclear to me exactly which variables I should use for that and I haven't been able to find any relevant documentation. Currently I'm using TCL_DEFS and TCL_INCLUDE_SPEC. If that is wrong, please tell me what I should use instead or point me to the docs.
Log in (anonymous is fine) to add a comment.