FYI, I forward this mail from Daniel A. Steffen steffen@ics.mq.edu.au because it seems we had a temporal problem with the mailing list.
we will incorporate the changes for the next release of XOTcl
--uwe
---------- Forwarded Message ----------
Subject: XOTcl 1.1.0 changes for Mac OS X Date: Fri, 5 Dec 2003 20:26:11 +1100 From: "Daniel A. Steffen" steffen@ics.mq.edu.au To: uwe.zdun@uni-essen.de, gustaf.neumann@wu-wien.ac.at Cc: tcl-mac@lists.sourceforge.net
Hi,
the xotcl mailman url seems to be down at the moment, so I contact you directly and CC the tcl-mac mailing list
with the new TEA compliant buildsystem in XOTcl 1.1.0 in can finally build xotcl against the Tcl.framework build on Mac OS X. I will thus integrate a binary in my next release of the batteries-included TclTkAqua distribution http://tcltkaqua.sf.net/
I had to make a number of changes, c.f. attached patch or http://rutherglen.ics.mq.edu.au/~steffen/tcltk/patches/xotcl.diff
details on changes follow:
the changes to 'predefined.xotcl' fix a generic xotcl bug: if symbols from the ::xotcl:: namespace have not been imported into the global namespace, [self] is not defined as a global proc, which causes a variety of operations to fail, e.g. renaming objects (i.e. Object instproc move)
% package require XOTcl 1.1 % xotcl::Object o
::o
$ rename o p invalid command name "self" % namespace import xotcl::* $ rename o p
the fix is to replace all occurrences of [self] in predefined.xotcl by the fully qualified [::xotcl::self]
the changes to 'Makefile.in' deal with two problems:
1) not all installation happens in DESTDIR, e.g. 'make install DESTDIR=/tmp/' fails to install everything under /tmp/
2) a generic problem with TEA that affects extensions with stub libraries on platforms that require ranlib to be run on static libraries: when building a dynamic extension, RANLIB is set to : and thus ranlib is not run on the libxotclstub.a library the fix is to define a separate RANLIB_STUB in configure.in before RANLIB is reset to : and use that when building/installing the stub library. (This generic fix has been submitted as a bug to TEA as well)
the other changes to configure.in are:
1) --with-tclinclude is defined by TEA to give the directory containing _public_ tcl headers, in particular this is needed on Mac OS X with the framework build: ./configure --with-tcl=/Library/Frameworks/Tcl.framework --with-tclinclude=/Library/Frameworks/Tcl.framework/Headers hence the check for tclInt.h in the tclinclude directory is invalid, since this is not a public header.
the generic TEA machinery finding the tcl source directory takes care of finding a directory containing tclInt.h already, so I don't think this check is needed; if you want a configure option for the tcl private header directory anyway, it needs to be named something other than --with-tclinclude
2) the xotcl dynamic library needs to be linked with the tcl stub library on Mac OS X (and I suspect on other non-ELF platforms as well) otherwise the link fails due to undefined symbols from libtclstub, e.g. Tcl_InitStubs
There is one remaining problem with your buildsystem that I haven't fixed: it is still not fully possible to configure&build from outside the xotcl/unix directory; the TEA bits work fine but not your custom code for building library, test, docs etc c.f. sample run below.
you should use $(srcdir) to reference the source directory in the Makefile, and not assume that the Makefile is located in xotcl/unix, i.e. e.g. cd ../library; $(TCLSH_PROG) ./lib/make.xotcl -all will fail if configure has been run from somewhere other than xotcl/unix, use cd $(srcdir)../library; $(TCLSH_PROG) ./lib/make.xotcl -all instead. However, this is not sufficient since make.xotcl assumes relative directory locations as well
It should be possible to configure & build from outside xotcl/unix such that the xotcl source directory is not modified at all, this is e.g. necessary for buildscripts that build for several platforms from a common shared source directory. I know that ActiveState builds their distribution in this way, and my TclTkAqua distribution buildscript needs this as well. I currently cheat by rsyncing xotcl/{library,doc,tests,apps} from the source into the build location before configuring, but this is a hack and should be dealt with properly in the Makefile instead...
Cheers,
Daniel
-- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** mailto:steffen@maths.mq.edu.au ** NSW 2109 Australia ** http://www.maths.mq.edu.au/~steffen/ % mkdir -p /tmp/xotcl/unix % cd /tmp/xotcl/unix % ~/Development/TclTk/core-8-4-branch/xotcl/unix/configure --with-tcl=/Library/Frameworks/Tcl.framework --with-tclinclude=/Library/Frameworks/Tcl.framework/Headers Configuring XOTcl Version 1.1 checking for gcc... cc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ANSI C... none needed checking for a BSD-compatible install... /usr/bin/install -c checking how to run the C preprocessor... cc -E checking for egrep... grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking if 64bit support is enabled... no checking system version (for dynamic loading)... Darwin-6.8 checking for dlopen in -ldl... no checking whether make sets $(MAKE)... yes checking for ranlib... ranlib checking build system type... powerpc-apple-darwin6.8 checking host system type... powerpc-apple-darwin6.8 checking for Tcl configuration... found /Library/Frameworks/Tcl.framework/tclConfig.sh checking for existence of /Library/Frameworks/Tcl.framework/tclConfig.sh... loading checking for Tcl private include files... Using srcdir found in tclConfig.sh: /Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl checking for building with threads... no (default) checking how to build libraries... shared checking for build with symbols... no checking for tclsh... /usr/bin/tclsh8.4 configure: creating ./config.status config.status: creating Makefile config.status: creating xotclConfig.sh config.status: creating xotclsh config.status: creating xowish config.status: creating xotcl.spec config.status: creating ../library/pkgIndex.unix config.status: creating ../library/pkgIndex.win % make cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/xotcl.c` -o so/xotcl.o cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/xotclError.c` -o so/xotclError.o cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/xotclMetaData.c` -o so/xotclMetaData.o cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/xotclObjectData.c` -o so/xotclObjectData.o cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/xotclProfile.c` -o so/xotclProfile.o cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/xotclTrace.c` -o so/xotclTrace.o cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/xotclCompile.c` -o so/xotclCompile.o cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/aolstub.c` -o so/aolstub.o cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/xotclStubInit.c` -o so/xotclStubInit.o cc -DUSE_TCL_STUBS -DPACKAGE_NAME="" -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -DPACKAGE_BUGREPORT="" -DVERSION="1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DCOMPILE_XOTCL_STUBS=1 -DHAVE_TCL_COMPILE_H=1 -DTCL_SHLIB_EXT=".dylib" -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/generic -I/Volumes/Local/Users/steffen/Documents/Development/TclTk/core-8-4- branch/tcl/unix -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../generic" -I"/Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/ ../unix" -I/Library/Frameworks/Tcl.framework/Headers -Os -fno-common -g -DXOTCLVERSION="1.1" -DXOTCLPATCHLEVEL=".0" -c `echo /Local/Users/steffen/Development/TclTk/core-8-4-branch/xotcl/unix/../ generic/xotclStubLib.c` -o so/xotclStubLib.o rm -f libxotclstub1.1.a ar cr libxotclstub1.1.a so/xotclStubLib.o ranlib libxotclstub1.1.a rm -f libxotcl1.1.dylib cc -dynamiclib -o libxotcl1.1.dylib so/xotcl.o so/xotclError.o so/xotclMetaData.o so/xotclObjectData.o so/xotclProfile.o so/xotclTrace.o so/xotclCompile.o so/aolstub.o so/xotclStubInit.o -L/Library/Frameworks/Tcl.framework/Versions/8.4 -ltclstub8.4
: libxotcl1.1.dylib
(cd ../library; /usr/bin/tclsh8.4 ./lib/make.xotcl -all) couldn't read file "./lib/make.xotcl": no such file or directory make: *** [libraries] Error 1
-------------------------------------------------------