summaryrefslogtreecommitdiffstats
path: root/macosx/README
diff options
context:
space:
mode:
authordas <das>2005-11-27 02:33:48 (GMT)
committerdas <das>2005-11-27 02:33:48 (GMT)
commit869ae625bcbb07adbc4ebdbea88b0997540c0eb4 (patch)
tree0b3ddbb9d4e905eaba0c0baa102ace44b84277a5 /macosx/README
parent4108d5e746022cd525e93215aeb41eb0a1ab3b7a (diff)
downloadtcl-869ae625bcbb07adbc4ebdbea88b0997540c0eb4.zip
tcl-869ae625bcbb07adbc4ebdbea88b0997540c0eb4.tar.gz
tcl-869ae625bcbb07adbc4ebdbea88b0997540c0eb4.tar.bz2
* unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),
add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes (dist): add new macosx files. * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixFCmd.c: * macosx/tclMacOSXFCmd.c: ppc64 and endian (i386) fixes. (TclMacOSXCopyFileAttributes): add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: * macosx/Tcl.xcode/default.pbxuser (new file): * macosx/Tcl.xcode/project.pbxproj (new file): * macosx/Tcl.xcodeproj/default.pbxuser (new file): * macosx/Tcl.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tcltest targets and support for universal (fat) compiles. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * unix/dltest/Makefile.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tcl/macosx, add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tcl.decls: add Tcl_Main declaration as comment to avoid 'checkstubs' target complaining about it missing from stubs. * generic/regex.h: * generic/tclDate.c: * generic/tclEnv.c: * generic/tclGetDate.y: * generic/tclIOUtil.c: * generic/tclObj.c: * generic/tclStubInit.c: * generic/tclStubLib.c: * generic/tclPathObj.c: * generic/tclThreadAlloc.c: * generic/tclThreadStorage.c: * generic/tclTrace.c: * generic/tclVar.c: * generic/tommath.h: * tools/fix_tommath_h.tcl: * unix/tclUnixFCmd.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file). These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclNamesp.c (NamespaceEnsembleCmd): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/tclExecute.c (TclExecuteByteCode): fix unused variable warning when NO_WIDE_TYPE is defined. * generic/regguts.h: only #define NDEBUG if not already #defined. * unix/tclUnixNotfy.c: * macosx/tclMacOSXNotify.c: sync whitespace & comments. * unix/tclUnixPort.h: * win/tclWinPort.h: remove declaration of obsolete&unused TclpMutex API. * unix/configure: * unix/tclConfig.h.in: regen.
Diffstat (limited to 'macosx/README')
-rw-r--r--macosx/README167
1 files changed, 104 insertions, 63 deletions
diff --git a/macosx/README b/macosx/README
index 17554ac..561c468 100644
--- a/macosx/README
+++ b/macosx/README
@@ -1,107 +1,148 @@
-Tcl MacOSX README
+Tcl Mac OS X README
-----------------
-RCS: @(#) $Id: README,v 1.5 2005/05/23 20:21:02 das Exp $
+RCS: @(#) $Id: README,v 1.6 2005/11/27 02:33:49 das Exp $
-This is the README file for the Mac OS X native version of Tcl (framework build).
+This is the README file for the Mac OS X/Darwin version of Tcl.
-1. General
-----------
+1. Where to go for support
+--------------------------
-- The tcl-mac mailing list on sourceforge is the canonical place for questions
+- The tcl-mac mailing list on sourceforge is the best place to ask questions
specific to Tcl & Tk on Mac OS X:
http://lists.sourceforge.net/lists/listinfo/tcl-mac
(this page also has a link to searchable archives of the list, please check them
before asking on the list, many questions have already been answered).
-- For general tcl/tk questions, the newsgroup comp.lang.tcl is your best bet,
-but also check the Tcl'ers Wiki for a wealth of information:
- http://wiki.tcl.tk/
+- For general Tcl/Tk questions, the newsgroup comp.lang.tcl is your best bet:
+ http://groups.google.com/group/comp.lang.tcl/
-- The wiki has a page listing known bugs in Mac OS X Tcl/Tk (and other tips)
- http://wiki.tcl.tk/MacOS%20X
-as well as a page with info on building Tcl/Tk on Mac OS X
- http://wiki.tcl.tk/Steps%20to%20build%20Tcl/Tk%208.4.0%20on%20MacOS%20X
+- The Tcl'ers Wiki also has many pages dealing with Tcl & Tk on Mac OS X, see
+ http://wiki.tcl.tk/references/3753!
+ http://wiki.tcl.tk/references/8361!
-- You should report bugs to the sourceforge bug trackers as usual:
- Tcl: https://sourceforge.net/tracker/?func=add&group_id=10894&atid=110894
- Tk: https://sourceforge.net/tracker/?func=add&group_id=12997&atid=112997
-please make sure that your report Tk specific bugs to the tktoolkit bug
-tracker and not the tcl one.
+- Please report bugs with Tcl or Tk on Mac OS X to the sourceforge bug trackers:
+ Tcl: http://sf.net/tracker/?func=add&group_id=10894&atid=110894
+ Tk: http://sf.net/tracker/?func=add&group_id=12997&atid=112997
+please make sure that your report Tk specific bugs to the tktoolkit project bug
+tracker rather than the tcl project bug tracker.
+Mac OS X specific bugs should usually be assigned to 'das' or 'wolfsuit'.
-2. Using Tcl on MacOSX
-----------------------
+2. Using Tcl on Mac OS X
+------------------------
-- Mac OS X 10.2 (or higher) is required to run Tcl on MacOSX.
+- 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).
-- Tcl built on Mac OS X 10.3 or higher will not run on 10.2 due to missing
-symbols in libSystem, however Tcl built on 10.2 will run on 10.3 (but without
-prebinding and other optimizations).
+- Tcl built on Mac OS X 10.x will not run on 10.y for y < x, on the other hand
+Tcl built on 10.y will run on 10.x for y < x (but without any of the fixes and
+optimizations that would be available in a binary built on 10.x).
-- Tcl extensions will be found in any of:
+- 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).
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.
+This allows building extensions as frameworks with all script files contained in
+the Resources/Scripts directory of the framework.
-- The Tcl framework contains documentation in html format in the
-standard location for frameworks:
+- [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).
+
+- The 'deploy' target of macosx/GNUmakefile installs the html manpages into the
+standard documentation location in the Tcl framework:
Tcl.framework/Resources/Documentation/Reference/Tcl
-No manpages are installed by default.
+No nroff manpages are installed by default by the GNUmakefile.
-- the framework Tcl.framework can be placed in any of the system's standard
+- 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
-and /usr/bin/tclsh will work.
-
-- the format of binary extensions expected by [load] is that of ordinary shared
-libraries (.dylib) and not MachO bundles, at present loading of MachO bundles is
-not supported.
-3. Building Tcl.framework
--------------------------
+3. Building Tcl on Mac OS X
+---------------------------
-- Mac OS X 10.2 (or higher) is required to build Tcl on MacOSX.
-
-- Apple's Developer Tools CD needs to be installed (the most recent version
-matching your OS release, but no earlier than December 2002). This CD should
-have come with Mac OS X retail or should be present as a disk image on new macs
-that came with OSX preinstalled. It can also be downloaded from
+- 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).
-- Tcl is built as a Mac OS X framework via the Makefile in tcl/macosx, but can
-but can also be built directly with the standard unix configure and make
-buildsystem in tcl/unix.
-
-- It is still possible to build with Apple's Xcode IDE using the Tcl.pbproj
-project but this is not recommended anymore (currently Tcl.pbproj calls through
-to the tcl/macosx/Makefile so there should be no build differences).
+- 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
+and make buildsystem in tcl/unix as on any other unix platform (indeed, the
+GNUmakefile is just a wrapper around the unix buildsystem).
+The Mac OS X specifc configure flags are --enable-framework and
+--disable-corefoundation (which disables CF and notably reverts to the standard
+select based notifier, you will only need this if your require use of naked fork
+(i.e. not followed by execve) in an unthreaded core).
+
+- 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 ProjectBuilder on 10.2 and earlier, this has a 'Tcl' target
+ that simply calls through to the tcl/macosx/GNUMakefile.
+ * Tcl.xcode for Xcode 1.5 on 10.3, this additionally has a native 'tcltest'
+ target useful for debugging, this target's 'Development' buildstyle
+ has ZeroLink and Fix&Continue enabled, use the 'DevelNoFixZL' buildstyle
+ if you need a debug build without these features.
+ * Tcl.xcodeproj for Xcode 2.2 on 10.4, this additionally has a
+ 'ReleaseUniversal'configuration which builds both the 'Tcl' and the
+ 'tcltest' targets as universal binaries for ppc, ppc64 and i386.
+Notes about the native targets of the Xcode projects:
+ * the Xcode projects refer to the tcl source directory with a relative path
+ of ../../tcl to the project location, if your source directory is named
+ differently you'll need to enter the correct path in the info panel of
+ the 'Tcl Sources' group.
+ * XCode 1.5 has a bug that causes Fix&Continue and the Build menu items
+ Compile/Preprocess/ShowAssembly to fail in presence of relative paths to
+ source files, as a workaround change the Path Type of the 'Tcl Sources'
+ group to 'Absolute Path' in the group's Info panel. (fixed in Xcode 2.2)
+ * 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 this requires 2.59 versions of autoconf & autoheader,
+ which are not available on on Mac OS X 10.3 by default, and so 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
+ env vars AUTOCONF and AUTOHEADER to their true locations if necessary.
+
+- To build universal binaires outside of Tcl.xcodeproj, set CFLAGS as follows:
+ export CFLAGS="-arch ppc -arch ppc64 -arch i386 \
+ -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
+This requires Mac OS X 10.4 and Xcode 2.2 (_not_ Xcode 2.1) and will work on any
+of the architectures (on i386 DTKs, the -isysroot is not required). Note that it
+is not possible to configure correctly if the current architecture is not
+present in CFLAGS (i.e. -arch `arch` must always be there). 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.
+
+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.2').
+- 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.2" ;: if your shell is csh
- ver="8.4.2" ;: if your shell is sh
+ 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
+ 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:
+- The following steps will build Tcl from the Terminal, assuming you are located
+in the directory containing the tcl source tree:
make -C tcl${ver}/macosx
-and the following will then install Tcl onto the root volume (admin password
+and the following will then 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,
@@ -109,8 +150,8 @@ 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 Tcl.framework/Tcl_debug.
+the Tcl framework with the standard convention of naming the debug library
+Tcl.framework/Tcl_debug.
This allows you to dynamically link to the debug libraries at runtime by setting
setenv DYLD_IMAGE_SUFFIX _debug
(c.f. man dyld for more details)