Subject: | Installing Tcl under darwin |
Vadim,
I experienced difficulty building Tcl under Mac OS 10.3 against TclTkAquaBI 8.4.10 (http://tcltkaqua.sourceforge.net/) using the default invocation of Makefile.PL. It builds fine (AND passes the self-test) if you invoke Makefile.PL with --tclconfig /usr/lib/tclConfig.sh. Since this is the location reported by tclsh tclcfg.tcl, maybe the best way to deal with this is to force the Darwin build through the --tclconfig. I have appended the canonical information, and the output of some commands. The diff -u output at the end implements the suggested patch.
Please feel free to contact me for more information.
Thank you very much for your time and trouble,
Tom Wyant
Distribution: Tcl-0.87
Perl version: v5.8.6 built for darwin-2level
Os version: Darwin Wyants-White-iMac.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc
# tclsh tclcfg.tcl
tclsh=/usr/bin/tclsh
tclConfig.sh=/usr/lib/tclConfig.sh
tcl_library=/Library/Frameworks/Tcl.framework/Versions/8.4/Resources/Scripts
tcl_version=8.4
# perl Makefile.PL --tclconfig /usr/lib/tclConfig.sh
Using config data in /usr/lib/tclConfig.sh
LIBS = -L/System/Library/Frameworks/Tcl.framework/Versions/8.4 -ltclstub8.4
INC = -I/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers
DEFINE = -DUSE_TCL_STUBS -DLIB_RUNTIME_DIR=\"/System/Library/Frameworks/Tcl.framework\" -DTCL_LIB_FILE=\"Tcl\"
Checking if your kit is complete...
Looks good
Writing Makefile for Tcl
# perl Makefile.PL
tclsh=/usr/bin/tclsh
tclConfig.sh=/usr/lib/tclConfig.sh
tcl_library=/Library/Frameworks/Tcl.framework/Versions/8.4/Resources/Scripts
tcl_version=8.4
LIBS = -ltclstub8.4
Use of uninitialized value in concatenation (.) or string at Makefile.PL line 148.
INC =
DEFINE = -DUSE_TCL_STUBS -DTCL_LIB_FILE=\"libtcl8.4.so\"
Use of uninitialized value in string at Makefile.PL line 152.
Checking if your kit is complete...
Looks good
Writing Makefile for Tcl
# diff -u Makefile.{OLD,PL}
--- Makefile.OLD Wed Jan 12 12:40:15 2005
+++ Makefile.PL Sun Jul 24 12:25:12 2005
@@ -69,7 +69,14 @@
# If using stubs, we will set the LIB_RUNTIME_DIR and TCL_LIB_FILE
# to point to the install location as the default dll to load.
-if ($tclconfig) {
+if ($tclconfig || $^O eq 'darwin') {
+ unless ($tclconfig) {
+ open(TCLSH, "$tclsh tclcfg.tcl |") or die "error starting tclsh: $!\n";
+ my $tclcfg = join '', <TCLSH>;
+ close(TCLSH);
+ my %tclcfg = $tclcfg =~ /^([^=]+)=(.*?)\n/gm;
+ $tclconfig = $tclcfg{'tclConfig.sh'};
+ }
die "Tcl config file '$tclconfig' not found\n" unless (-f $tclconfig);
# Retrieve all info based on tclConfig.sh