summaryrefslogtreecommitdiffstats
path: root/macosx/README
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/README')
-rw-r--r--macosx/README190
1 files changed, 83 insertions, 107 deletions
diff --git a/macosx/README b/macosx/README
index 06e797e..bcffde3 100644
--- a/macosx/README
+++ b/macosx/README
@@ -26,8 +26,7 @@ before asking on the list, many questions have already been answered).
2. Using Tcl on Mac OS X
------------------------
-- At a minimum, Mac OS X 10.1 is required to run Tcl, but OS X 10.3 or higher is
-recommended (certain [file] operations behave incorrectly on earlier releases).
+- At a minimum, Mac OS X 10.3 is required to run Tcl.
- Unless weak-linking is used, Tcl built on Mac OS X 10.x will not run on 10.y
with y < x; on the other hand Tcl built on 10.y will always run on 10.x with
@@ -37,18 +36,19 @@ Weak-linking is available on OS X 10.2 or later, it additionally allows Tcl
built on 10.x to run on any 10.y with x > y >= z (for a chosen z >= 2).
- Tcl extensions can be installed in any of:
- $HOME/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl
- $HOME/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks
- /System/Library/Frameworks (searched in that order).
+ $HOME/Library/Tcl /Library/Tcl /System/Library/Tcl
+ $HOME/Library/Frameworks /Library/Frameworks /System/Library/Frameworks
+ (searched in that order).
Given a potential package directory $pkg, Tcl on OSX checks for the file
$pkg/Resources/Scripts/pkgIndex.tcl as well as the usual $pkg/pkgIndex.tcl.
This allows building extensions as frameworks with all script files contained in
the Resources/Scripts directory of the framework.
- [load]able binary extensions can linked as either ordinary shared libraries
-(.dylib) or as MachO bundles (since 8.4.10/8.5a3); only bundles can be unloaded,
-and bundles are also loaded more efficiently from VFS (no temporary copy to the
-native filesystem required).
+(.dylib) or as MachO bundles (since 8.4.10/8.5a3); bundles have the advantage
+that they are [load]ed more efficiently from a tcl VFS (no temporary copy to the
+native filesystem required), and prior to Mac OS X 10.5, only bundles can be
+[unload]ed.
- The 'deploy' target of macosx/GNUmakefile installs the html manpages into the
standard documentation location in the Tcl framework:
@@ -57,19 +57,18 @@ No nroff manpages are installed by default by the GNUmakefile.
- The Tcl framework can be installed in any of the system's standard
framework directories:
- $HOME/Library/Frameworks /Library/Frameworks
- /Network/Library/Frameworks /System/Library/Frameworks
+ $HOME/Library/Frameworks /Library/Frameworks /System/Library/Frameworks
3. Building Tcl on Mac OS X
---------------------------
-- At least Mac OS X 10.1 is required to build Tcl, and Apple's Developer Tools
-need to be installed (only the most recent version matching your OS release is
-supported). The Developer Tools installer is available on Mac OS X retail disks
-or is present in /Applications/Installers on Macs that came with OS X
-preinstalled. The most recent version can be downloaded from the ADC website
-http://connect.apple.com (after you register for free ADC membership).
+- At least Mac OS X 10.3 is required to build Tcl.
+Apple's Xcode Developer Tools need to be installed (only the most recent version
+matching your OS release is supported), the Xcode installer is available on Mac
+OS X install media or may be present in /Applications/Installers on Macs that
+came with OS X preinstalled. The most recent version can always be downloaded
+from the ADC website http://connect.apple.com (free ADC membership required).
- Tcl is most easily built as a Mac OS X framework via GNUmakefile in tcl/macosx
(see below for details), but can also be built with the standard unix configure
@@ -79,68 +78,50 @@ The Mac OS X specific configure flags are --enable-framework and
--disable-corefoundation (which disables CF and notably reverts to the standard
select based notifier).
-- It is also possible to build with Apple's IDE via the projects in tcl/macosx,
-take care to only use the project matching your DevTools and OS version:
- * Tcl.pbproj for Xcode or ProjectBuilder on 10.3 and earlier, this has a
- 'Tcl' target that simply calls through to the tcl/macosx/GNUMakefile.
- * Tcl.xcode for Xcode 2.4 on 10.4 and Xcode 2.5 on 10.4 and later, which
- additionally has native 'tcltest' and 'tests' targets for debugging and
- running the testsuite, these targets' 'Debug' build configuration has
- ZeroLink and Fix&Continue enabled, use the 'DebugNoFixZL' build
- configuration if you need a debug build without these features. The
- following build configurations are available:
- 'DebugUnthreaded': debug build with threading turned off.
- 'DebugNoCF': debug build with corefoundation turned off.
- 'DebugNoCFUnthreaded': debug build with corefoundation & threading off.
- 'DebugMemCompile': debug build with memory and bytecode debugging on.
- 'DebugLeaks': debug build with PURIFY defined.
- 'DebugGCov': debug build with generation of gcov data files enabled.
- 'Debug64bit': builds the targets as 64bit with debugging enabled,
- requires a 64bit capable processor (i.e. G5 or Core2/Xeon).
- 'ReleaseUniversal': builds the targets as universal binaries for the
- ppc, ppc64, i386 and x86_64 architectures.
- 'ReleaseUniversal10.4uSDK': same as 'ReleaseUniversal' but builds
- against the 10.4u SDK, required to build universal binaries on
- PowerPC Tiger (where the system libraries are not universal).
- 'ReleasePPC10.3.9SDK': builds for PowerPC against the 10.3.9 SDK, useful
- for verifying on Tiger that building on Panther would succeed.
- 'ReleasePPC10.2.8SDK': builds for PowerPC with gcc-3.3 against the
- 10.2.8 SDK, useful to verify on Tiger that building on Jaguar
- would succeed.
- * Tcl.xcodeproj for Xcode 3.1 on 10.5 and later, which has the following
- additional build configurations:
- 'ReleaseUniversal10.5SDK': same as 'ReleaseUniversal' but builds
- against the 10.5 SDK on Leopard (with 10.5 deployment target).
- 'Debug gcc42': same as 'Debug' but builds with gcc 4.2.
- 'Debug llvmgcc42': same as 'Debug' but builds with llvm-gcc 4.2.
- 'ReleaseUniversal gcc42': same as 'ReleaseUniversal' but builds with
- gcc 4.2.
- 'ReleaseUniversal llvmgcc42': same as 'ReleaseUniversal' but builds
- with llvm-gcc 4.2.
- Note that all non-SDK configurations have 10.5 deployment target.
-
-Notes about the native targets of the Xcode projects:
- * the Xcode projects refer to the toplevel tcl source directory through the
- TCL_SRCROOT user build setting, by default this is set to the
- project-relative path '../../tcl', if your tcl source directory is named
- differently, e.g. '../../tcl8.5', you'll need to manually change the
- TCL_SRCROOT setting by editing your ${USER}.pbxuser file (located inside
- the Tcl.xcodeproj bundle directory) with a text editor.
- * the native targets need a version of the unix configure script with config
- headers enabled, this is automatically generated as tcl/macosx/configure
- by the project but that requires 2.59 versions of autoconf & autoheader.
- These are not available on Mac OS X 10.5 by default and need to be
- installed manually. By default they are assumed to be installed as
- /usr/local/bin/autoconf-2.59 and /usr/local/bin/autoheader-2.59, set the
- AUTOCONF and AUTOHEADER build settings in ${USER}.pbxuser to their true
- locations if necessary.
-
-- To build universal binaries outside of Tcl.xcodeproj, set CFLAGS as follows:
- export CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 \
- -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
+- It is also possible to build with the Xcode IDE via the projects in
+tcl/macosx, take care to use the project matching your DevTools and OS version:
+ Tcl.xcode: for Xcode 3.1 on 10.5
+ Tcl.xcodeproj: for Xcode 3.2 on 10.6
+These have the following targets:
+ Tcl: calls through to tcl/macosx/GNUMakefile.
+ tcltest: static build of tcltest for debugging.
+ tests: build tcltest target and run tcl testsuite.
+The following build configurations are available:
+ Debug: debug build for the active architecture,
+ with Fix & Continue enabled.
+ Debug clang: use clang compiler.
+ Debug llvm-gcc: use llvm-gcc compiler.
+ Debug gcc40: use gcc 4.0 compiler.
+ DebugNoFixAndContinue: disable Fix & Continue.
+ DebugUnthreaded: disable threading.
+ DebugNoCF: disable corefoundation.
+ DebugNoCFUnthreaded: disable corefoundation an threading.
+ DebugMemCompile: enable memory and bytecode debugging.
+ DebugLeaks: define PURIFY.
+ DebugGCov: enable generation of gcov data files.
+ Debug64bit: configure with --enable-64bit (requires
+ building on a 64bit capable processor).
+ Release: release build for the active architecture.
+ ReleaseUniversal: 32/64-bit universal build.
+ ReleaseUniversal clang: use clang compiler.
+ ReleaseUniversal llvm-gcc: use llvm-gcc compiler.
+ ReleaseUniversal gcc40: use gcc 4.0 compiler.
+ ReleaseUniversal10.5SDK: build against the 10.5 SDK (with 10.5
+ deployment target).
+ Note that the non-SDK configurations have their deployment target set to
+ 10.5 (Tcl.xcode) resp. 10.6 (Tcl.xcodeproj).
+The Xcode projects refer to the toplevel tcl source directory via the
+TCL_SRCROOT user build setting, by default this is set to the project-relative
+path '../../tcl', if your tcl source directory is named differently, e.g.
+'../../tcl8.6', you need to manually change the TCL_SRCROOT setting by editing
+your ${USER}.pbxuser file (located inside the Tcl.xcodeproj bundle directory)
+with a text editor.
+
+- To build universal binaries outside of the Xcode IDE, set CFLAGS as follows:
+ export CFLAGS="-arch i386 -arch x86_64 -arch ppc"
This requires Mac OS X 10.4 and Xcode 2.4 (or Xcode 2.2 if -arch x86_64 is
-omitted, but _not_ Xcode 2.1) and will work on any of the architectures (the
--isysroot flag is only required on PowerPC Tiger).
+omitted, but _not_ Xcode 2.1) and will work on any architecture (on PowerPC
+Tiger you need to add "-isysroot /Developer/SDKs/MacOSX10.4u.sdk").
Note that configure requires CFLAGS to contain a least one architecture that can
be run on the build machine (i.e. ppc on G3/G4, ppc or ppc64 on G5, ppc or i386
on Core and ppc, i386 or x86_64 on Core2/Xeon).
@@ -148,51 +129,46 @@ Universal builds of Tcl TEA extensions are also possible with CFLAGS set as
above, they will be [load]able by universal as well as thin binaries of Tcl.
- To enable weak-linking, set the MACOSX_DEPLOYMENT_TARGET environment variable
-to the minimal OS version (>= 10.2) the binaries should be able to run on, e.g:
- export MACOSX_DEPLOYMENT_TARGET=10.2
-This requires Mac OS X 10.2 and gcc 3.1; if you have gcc 4 or later you can set
-CFLAGS instead:
- export CFLAGS="-mmacosx-version-min=10.2"
-The Tcl.xcode project is setup to produce binaries that can run on 10.2 or
-later (except for the Universal and SDK configurations).
-Support for weak-linking was added to the code for 8.4.14/8.5a5.
+to the minimal OS version the binaries should be able to run on, e.g:
+ export MACOSX_DEPLOYMENT_TARGET=10.4
+This requires at least gcc 3.1; with gcc 4 or later, set/add to CFLAGS instead:
+ export CFLAGS="-mmacosx-version-min=10.4"
+Support for weak-linking was added with 8.4.14/8.5a5.
Detailed Instructions for building with macosx/GNUmakefile
----------------------------------------------------------
-- Unpack the tcl source release archive.
-
-- The following instructions assume the tcl source tree is named "tcl${ver}",
-where ${ver} is a shell variable containing the tcl version number (for example
-'8.4.12').
-Setup the shell variable as follows:
- set ver="8.4.12" ;: if your shell is csh
- ver="8.4.12" ;: if your shell is sh
-The source tree will be named this way only if you are building from a release
-archive, if you are building from CVS, the version numbers will be missing; so
-set ${ver} to the empty string instead:
- set ver="" ;: if your shell is csh
- ver="" ;: if your shell is sh
-
-- The following steps will build Tcl from the Terminal, assuming you are located
-in the directory containing the tcl source tree:
+- Unpack the Tcl source release archive.
+
+- The following instructions assume the Tcl source tree is named "tcl${ver}",
+(where ${ver} is a shell variable containing the Tcl version number e.g. '8.6').
+Setup this shell variable as follows:
+ ver="8.6"
+If you are building from CVS, omit this step (CVS source tree names usually do
+not contain a version number).
+
+- Setup environment variables as desired, e.g. for a universal build on 10.5:
+ CFLAGS="-arch i386 -arch x86_64 -arch ppc -mmacosx-version-min=10.5"
+ export CFLAGS
+
+- Change to the directory containing the Tcl source tree and build:
make -C tcl${ver}/macosx
-and the following will then install Tcl onto the root volume (admin password
-required):
+
+- Install Tcl onto the root volume (admin password required):
sudo make -C tcl${ver}/macosx install
-if you don't have the admin password, you can install into your home directory,
+if you don't have an admin password, you can install into your home directory
instead by passing an INSTALL_ROOT argument to make:
make -C tcl${ver}/macosx install INSTALL_ROOT="${HOME}/"
-- The default Makefile targets will build _both_ debug and optimized versions of
-the Tcl framework with the standard convention of naming the debug library
+- The default GNUmakefile targets will build _both_ debug and optimized versions
+of the Tcl framework with the standard convention of naming the debug library
Tcl.framework/Tcl_debug.
This allows switching to the debug libraries at runtime by setting
export DYLD_IMAGE_SUFFIX=_debug
(c.f. man dyld for more details)
If you only want to build and install the debug or optimized build, use the
-'develop' or 'deploy' target variants of the Makefiles, respectively.
+'develop' or 'deploy' target variants of the GNUmakefile, respectively.
For example, to build and install only the optimized versions:
make -C tcl${ver}/macosx deploy
sudo make -C tcl${ver}/macosx install-deploy