Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4793 tclConfig.h not installed on Mac OS X

obsolete: 8.5.9
closed-invalid
5
2011-02-15
2011-02-15
No

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.

Discussion

  • 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.

     
    • assigned_to: hobbs --> das
     
    • status: open --> closed-invalid
     
  • 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.

     
  • @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.