View · Search · Index
No registered users in community xowiki
in last 10 minutes

Weblog Page

Filtered by date 2017-01-02, 441 - 450 of 1541 Postings (all, summary)

[Xotcl] Fwd: XOTcl 1.1.0 changes for Mac OS X

Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

From: Uwe Zdun <uwe.zdun_at_wu-wien.ac.at>
Date: Fri, 5 Dec 2003 10:56:33 +0100

FYI, I forward this mail from Daniel A. Steffen <steffen_at_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_at_ics.mq.edu.au>
To: uwe.zdun_at_uni-essen.de, gustaf.neumann_at_wu-wien.ac.at
Cc: tcl-mac_at_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_at_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
-------------------------------------------------------
-- 
Uwe Zdun
Department of Information Systems, Vienna University of Economics
Phone: +43 1 313 36 4796, Fax: +43 1 313 36 746
zdun_at_{xotcl,computer,acm}.org, uwe.zdun_at_wu-wien.ac.at




    Re: [Xotcl] "Cannot locate library"

    Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

    From: Uwe Zdun <uwe.zdun_at_wu-wien.ac.at>
    Date: Tue, 13 May 2003 12:22:35 +0200

    On Tuesday 13 May 2003 11:49, Gustaf Neumann wrote:
    >
    > > and use the local directory
    > > when you are in it so that you don't necessarily have to install.
    >
    > as stated in my last mail. extending the autopath or tcllibpath
    > should solve this.
    >

    and that (extending the autopath) is exactly what the method
    check_library_path essentially does. I think we can get rid
    of the part:

                foreach d $::auto_path {
                    set xl xotcl$::xotcl::version
                    foreach x [list [file join $d $xl] [file join $d .. $xl]] {
                        #puts stderr "check $x"
                        if {[file isdirectory $x]} {
                            set ::xotcl::lib $x
                            set success 1
                            break
                        }
                    }
                    if {[info exists success]} {break}
                }

    if we don't want the xotcl::lib variable ... the rest (except the ENV part) is
    needed somewhere, i think. I guess, if we code these things into the pkgindex
    files we would need a different version for the Win and unix installation.


    > there is code in the xotcl package "package" to determine
    > the name of the library directory. an application needing this
    > info can use this approach...

    I'm not sure, which method do you mean in package.xotcl??

    --uwe

    -- 
    Uwe Zdun
    Department of Information Systems, Vienna University of Economics
    Phone: +43 1 313 36 4796, Fax: +43 1 313 36 746
    zdun_at_{xotcl,computer,acm}.org, uwe.zdun_at_wu-wien.ac.at
    

    [Xotcl] getter

    Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

    From: Krzysztof Frukacz <frukacz.krzysztof_at_gmail.com>
    Date: Tue, 18 Jan 2011 15:32:45 +0100

    Hello,

    I need an example of implementation of a getter.
    I have an attribute in a class which now needs a customized getter.
    Class A -slots {
            Attribute attr -proc get {domain var} {
                    #how to get attr value here? if I do [my attr] I get recursive call.
    $attr says that there is no such variable
            }
    }

    Another question: should I use -proc get or -proc valuecmd? valuecmd
    does seems to be not called at all.

    Best Regards
    -- 
    Krzysztof Frukacz
    

    [Xotcl] Re: XOTcl 0.83 questions (continued...)

    Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

    From: <uwe.zdun_at_uni-essen.de>
    Date: Fri, 8 Dec 2000 12:57:35 +0100 (CET)

    Hi Zoran,

    ZV> The main problem is the ORDER! What I need to
    ZV> do is run a script against an initialized interpreter
    ZV> and construct another script which will replicate all
    ZV> XOTcl objects, classes etc,etc in an fresh interpreter.
    ZV> So the *ORDER* of commands is crucial.

    I've played around with ordering, when I've created the -- still very
    incomplete -- script creation for agents. So what I've done now is to
    extend the ScirptCreator component (in packages/script-creation) to
    support several classes & objects with a method makeScriptForAll. It
    then writes scripts with one possible order regarding the object &
    class hierarchy.

    It is still very incomplete ... but should already show how things
    could function. It only handles procs and instprocs, but not:

    -- adavanded features, like filters, mixins, etc. (for them ordering
       matters, too .. you cannot define a mixin without the class
       being defined)
    -- tcl namespaces
    -- indentation

    I'll hope to extend & test it ASAP to support more functionalities,
    but today I will not make it. Therefore, I send what I have so far.

    It already handles another crucial issue besides ordering: it can
    exclude certain objects & classes from re-creation. You surely do not
    want the script creator itself or the predefined stuff (like Object
    and Class)to be re-created.

    --Uwe

    Here's the example script:

    ###################################################################
    # load the ScriptCreator
    package require ScriptCreator
    ScriptCreator s

    # exclude everything defined so far
    s excludedObjs [s getAllInstances Object]
    puts "EXCLUDED [s excludedObjs]"

    # set up some classes for testing

    #
    # some meta classes
    #
    Class Meta -superclass Class
    Class Meta2 -superclass Meta
    Class Meta3 -superclass Meta2
    #
    # some classes
    #
    Class X
    Class Y
    Meta Z
    Meta2 A
    Meta2 B
    #
    # some objs
    #
    X x
    Object o
    Y y1
    Y y2
    A a1
    A a2



    puts [s makeScriptForAll]

    ###################################################################


    -- 
    Uwe Zdun
    Specification of Software Systems, University of Essen
    Phone: +49 201 81 00 332, Fax: +49 201 81 00 398
    zdun_at_xotcl.org, uwe.zdun_at_uni-essen.de
    
    



      [Xotcl] problem when having both a filter and a Tk callback returning a break

      Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

      From: Catherine Letondal <letondal_at_pasteur.fr>
      Date: Thu, 05 Jul 2001 16:54:23 +0200

      Hi,

      One problem I have when using Tk and Xotcl together (actually the only one for
      now), is that when I put a filter on a class (e.g for tracing purpose), the methods
      which are called by a callback (a Tk binding for example) cannot return a -break
      return code.

      Here is an example of an error message:

      invoked "break" outside of a loop
          while executing
      "$view validate o o"
          (command bound to event)

      This "validate" method is activated whenever the user enter something in a
      text widget:

          ::bind $textwidget <KeyPress> {
              set view [names object %W]
              $view validate %K %A
          }

      And this method does a return like this:
          return -code break

      The problem happens only when a filter is put on the class.

      What can I do to fix this?

      -- 
      Catherine Letondal -- Pasteur Institute Computing Center
      

      [Xotcl] "tie" command

      Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

      From: Kristoffer Lawson <setok_at_fishpool.com>
      Date: Fri, 24 Jan 2003 05:32:40 +0200 (EET)

      Been thinking if this would make sense:

      while {$stuff} {
        tie myVar [MyClass new]
        ...
      }

      And the instance created from MyClass would be automagically collected on
      each iteration. Ie. [tie] would tie an object to a variable: when the
      variable's value is changed, or when the variable is destroyed, the object
      is too -- or at least the refcount decreased. I often have Message objects
      which are used once (after some data is read from somewhere) and then
      destroyed. Quite often I forget the latter part ;-)

                                    / http://www.fishpool.com/~setok/

      RE: [Xotcl] Re: Status of the bugs I reported/could people resend their replies to those bugs

      Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

      From: Jeff Hobbs <jeffh_at_ActiveState.com>
      Date: Tue, 6 Apr 2004 11:51:40 -0700

      Jim,

      > As far as I've been able to determine, the tclsh which is
      > called has to be able to find the libxotcl thing. Apparantly,
      > not every tclsh I have is able to do that, so I looked closely at the
      > SC_PROG_TCLSH macro (having traced the problem down to that
      > macro) and noticed that it doesn't try to use the tclsh
      > specified in the supplied tclConfig.sh, which as far as I
      > know is the only correct choice (should use the tclsh linked
      > to the same libs that were
      > used in the build process of xotcl, and that can find the modules).

      This is not correct, and indicates a problem elsewhere in the
      xotcl make/test stuff. I see that it still uses the older TEA
      stuff though, which might be the core problem (SC_* macros were
      done away with a couple of years ago).

      The TEA_PROG_TCLSH looks at TCL_BIN_DIR (specified in
      tclConfig.sh), then the exec_prefix, prefix, and finally the
      regular path. This is the right ordering, as it is better to
      find the installed version first. It's still based off the
      tclConfig.sh.

        Jeff Hobbs, The Tcl Guy
        http://www.ActiveState.com/, a division of Sophos

      [Xotcl] make error

      Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

      From: Victor Mayevski <vitick_at_gmail.com>
      Date: Thu, 19 Jan 2012 11:33:41 -0800

      Hello Gustaf,

      Tried compiling NX today and it is failing. I am on Linux 64bit this
      time, 3.2.0-8-generic kernel, compiling against latest TCL 8.6 Fossil
      source. Make fails with the following error:

      .....
      gcc -DPACKAGE_NAME=\"nsf\" -DPACKAGE_TARNAME=\"nsf\"
      -DPACKAGE_VERSION=\"2.0b3\" -DPACKAGE_STRING=\"nsf\ 2.0b3\"
      -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -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
      -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_TCL_COMPILE_H=1
      -DNSF_WITH_ASSERTIONS=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1
      -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\
      __attribute__\(\(__visibility__\(\"hidden\"\)\)\)
      -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1
      -DCOMPILE_NSF_STUBS=1 -DNSF_VERSION=\"2.0\" -DNSF_PATCHLEVEL=\"2.0b3\"
           -I"/root/tcl-source/generic" -I"/root/tcl-source/unix"
      -I./generic -g -O2 -pipe -O2 -fomit-frame-pointer -Wall -fPIC -c
      `echo ./generic/nsfStubLib.c` -o nsfStubLib.o
      rm -f libnsfstub2.0b3.a
      ar cr libnsfstub2.0b3.a nsfStubLib.o
      ranlib libnsfstub2.0b3.a
      TclStackFree: incorrect freePtr (0x7fffc7179500 != 0xedabd0). Call out
      of sequence?
      /bin/bash: line 3: 19664 Aborted (core dumped)
      TCL_LIBRARY=`echo /root/tcl-source/library`
      LD_LIBRARY_PATH=".:/usr/local/lib:"
      PATH=".:/usr/local/lib:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
      TCLLIBPATH=". . " /usr/local/bin/tclsh8.6
      ./library/xotcl/library/lib/makeDoc.xotcl ./library/xotcl/doc $docs
      make: *** [library/xotcl/doc/langRef-xotcl.html] Error 134


      Thanks

      Re: [Xotcl] Dynamic dispatch and subclasses

      Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

      From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
      Date: Fri, 21 May 2004 21:12:24 +0200

      On Wednesday 19 May 2004 19:30, Neil Madden wrote:
      > I was kind of expecting the last to say "Foo in Base", as the method
      > call of "foo" was dispatched from the Base class level. This is an
      > interesting problem, as I can see reasons why you might want to do the
      > current behaviour. However, I'm worried about some of the implications
      > of implementation details and name clashes. Suppose I implement some
      > class Base, which as part of it's implementation has a (private) method
      > DoStuff.

       XOTcl has no private methods, every method is public.
       the evaluation context does not change the semantics of
       an invocation.

       OO breaks sometimes locality, and refining existing classes
       is not the best concept for components.

       without thinking long, i can offer two approaches.
       1) The first one is rather for fun, it changes the class
           of the object on the fly:

          Object instproc local args {
            set oldclass [my info class]
            my class [uplevel self class]
            set r [eval my $args]
            my class $oldclass
            return r
         }
         ...
         Base instproc bar {} {
           my local foo
         }
       
       since it might have some unwanted effects,
       when the "local" called method (here "foo")
       calls other methods, which should be dispatched
       based on the true objects class. The help in
       mixins is also rather limited.

       2) following your prefix approach:

         Object instproc own {} {
             namespace tail [uplevel self class]
         }
         Object instproc private {method name arguments body} {
            set prefix [namespace tail [self]]
            [self] $method $prefix-$name $arguments $body
         }

        one can define now:

         Class Base
         Base private instproc foo {} {
              puts "Foo in Base"
         }
         ....
       
       and call this via:

         Base instproc bar {} { my [my own]-foo }

       to avoid stuttering while reading, one can define a global funciton

         proc own {} { namespace tail [self class] }
         Base instproc bar {} { my [own]-foo }

       in genereal, instead of [own], [self class] could be used, but currently,
       the leading colons are not allowed in xotcl. i guess, we can change this.

      -gustaf neumann
      -- 
      Univ.Prof. Dr.Gustaf Neumann
      Abteilung für Wirtschaftsinformatik
      WU-Wien, Augasse 2-6, 1090 Wien
      

      Re: [Xotcl] two procs (-proc) for Attribute

      Created by hypermail2xowiki importer, last modified by Stefan Sobernig 02 Jan 2017, at 11:15 PM

      From: Mykhaylo Sorochan <msorc_at_bigmir.net>
      Date: Mon, 20 Jul 2009 13:57:23 +0300

      Stefan,

      I was interested in case a). I was a little wrong with the syntax and was not
      able to build the statement right.

      Thanks.

      > # ad a)
      > #
      > Class create C -slots {
      > Attribute create a1 -proc assign args {
      > puts "[self]->[self proc] called"
      > next
      > } -proc get args {
      > puts "[self]->[self proc] called"
      > next
      > }
      > }
      >
      > C create c
      > c a1 1
      > c a1
      >

      Next Page