[Xotcl] experience installing xotcl on MacOsX ?

Uwe Zdun uwe.zdun at wu-wien.ac.at
Tue Sep 28 19:25:09 CEST 2004


Hi Catherine,

on Unix we have moved the build system as default to the style preferred 
by TEA: the shells
are not built anymore by default. Instead it is advisable to load XOTcl 
dynamically into the
ordinary tclsh or wish. I propose you simply use this style of using 
XOTcl as well:

% wish
 > package require XOTcl
 > namespace import xotcl::*

the shells, if build (what is optional) now do nothing else than this.

Uwe



Catherine Letondal wrote:

>
> Gustaf Neumann wrote:
>
>> On Friday 17 September 2004 19:19, Catherine Letondal wrote:
>>
>>> Dear members of xotcl the list,
>>>
>>> Has someone any experience in installing XOtcl on MacOsX ?
>>> I have found a "Portfile" but I don't know what to do with it?
>>
>>
>> Catherine,
>>
>> isn't the Mac OS X Tcl/Tk Aqua 8.4.7 Release something for
>> you to use, it contains XOTcl binaries.....
>>
>> http://groups.google.at/groups?q=xotcl&hl=de&lr=&ie=UTF 
>> -8&scoring=d&selm=pgpmoose.200408041618.26617%40despot.non.net&rnum=8
>
>
> Thanks for the advice!
>
> I have indeed installed the TclTkAquaBI and tried but it'svery  
> complicated.
> I don't know whether you can help ?
>
> 1) I need to build my own wish with shared objects (libtcl.dylib  
> etc...) which
> are not provided in TclTkAquaBI distribution - even using it together  
> with the native Tcl.framework
> you don't have the *.h files etc...).
> So I decided to use the Fink tcl/tk distribution which works fine.
>
> 2) Using the TclTkAquaBI (the one which includes xotcl-1.2) is also 
> not  easy when you
> want to link an xotcl shared object (called  
> /Library/Tcl/xotcl1.2/libxotcl1.2.dylib)
> First, because you need xotcl.h, so you have to download separately 
> the  sources
> that have been used for building the shared library (sources are 
> kindly  distributed
> from http://tcltkaqua.sourceforge.net/8.4.7.html). Even using  
> libxotcl.dylib file distributed in TclAquaBI not not make sense for a  
> simple reason: if I need another package (such as BLT), which is not  
> distributed in TclAquaBI, I will also
> have to compile it myself, which is very difficult when it is not  
> configured for this purpose (blt is also distributed in Fink).
>
> 3) So, sy conclusion was to compile Xotcl myself, which I did, I 
> think,  successfully.
>  configure;
> ./configure --with-tcl=/sw/lib --with-tclinclude=/sw/include  
> --with-tk=/sw/lib --with-tkinclude=/sw/include
>
>  I just got errors when building xowish:
>
>  gcc -pipe -rdynamic -o xowish tkAppInit.o \
>         xotcl.o xotclError.o xotclMetaData.o xotclObjectData.o  
> xotclProfile.o xotclTrace.o xotclUtil.o xotclShadow.o xotclCompile.o  
> aolstub.o xotclStubInit.o \
>         -O3 -Wall -Wconversion -Wno-implicit-int -fno-common  
> -L/sw/lib  -ltcl8.4  \
>
> gcc: unrecognized option `-rdynamic'
> ld: Undefined symbols:
> _Tk_Init
> _Tk_MainEx
> _Tk_SafeInit
>
> Apparently also:
>   ==> -ltk8.4 is missing ?
>
> But xotclsh was successfully built.
>
>
> 4) then, I built a very simple tkAppinit.c:
>
> #include "tk.h"
> #include <xotcl.h>
> int
> main(argc, argv)
>     int argc;                   /* Number of command-line arguments. */
>     char **argv;                /* Values of command-line arguments. */
> {
>     Tk_Main(argc, argv, Tcl_AppInit);
>     return 0;                   /* Needed only to prevent compiler  
> warning. */
> }
>
> int
> Tcl_AppInit(interp)
>     Tcl_Interp *interp;         /* Interpreter for application. */
> {
>     if (Tcl_Init(interp) == TCL_ERROR) {
>         return TCL_ERROR;
>     }
>     if (Tk_Init(interp) == TCL_ERROR) {
>         return TCL_ERROR;
>     }
>     Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit);
>     if (Xotcl_Init(interp) == TCL_ERROR) {
>       return TCL_ERROR;
>     }
>
>     Tcl_Import(interp, Tcl_GetGlobalNamespace(interp), "xotcl::*", 1);
>     if (Tcl_PkgRequire(interp, "XOTcl", XOTCLVERSION, 1) == NULL) {
>       return TCL_ERROR;
>     }
>
>     return TCL_OK;
> }
>
> I got an executable (miniwish) built with the following compile/link  
> commands (with some warnings):
>
> gcc -fno-common    -DXOTCLVERSION=\"1.3.1\"  -c -I/sw/include  
> -I/sw/include  -I/usr/include/X11 -I/sw/include  tkAppInit.c
> gcc -bind_at_load -o minibiokwish tkAppInit.o -L/sw/lib -ltk8.4  
> -L/sw/lib -ltcl8.4 -L/usr/X11R6/lib -lX11 -lXmu  -L/sw/lib/xotcl1.3.1  
> -lxotcl1.3.1 -lm
> ld: warning multiple definitions of symbol _tclPlatStubsPtr
> /sw/lib/libtcl8.4.dylib(tclStubLib.o) definition of _tclPlatStubsPtr
> /sw/lib/libtk8.4.dylib(tclStubLib.o) definition of _tclPlatStubsPtr
> ld: warning multiple definitions of symbol _tclIntStubsPtr
> /sw/lib/libtcl8.4.dylib(tclStubLib.o) definition of _tclIntStubsPtr
> /sw/lib/libtk8.4.dylib(tclStubLib.o) definition of _tclIntStubsPtr
> ld: warning multiple definitions of symbol _Tcl_InitStubs
> /sw/lib/libtcl8.4.dylib(tclStubLib.o) definition of _Tcl_InitStubs
> /sw/lib/libtk8.4.dylib(tclStubLib.o) definition of _Tcl_InitStubs
> ld: warning multiple definitions of symbol _tclIntPlatStubsPtr
> /sw/lib/libtcl8.4.dylib(tclStubLib.o) definition of _tclIntPlatStubsPtr
> /sw/lib/libtk8.4.dylib(tclStubLib.o) definition of _tclIntPlatStubsPtr
> ld: warning multiple definitions of symbol _tclStubsPtr
> /sw/lib/libtcl8.4.dylib(tclStubLib.o) definition of _tclStubsPtr
> /sw/lib/libtk8.4.dylib(tclStubLib.o) definition of _tclStubsPtr
> /sw/lib/xotcl1.3.1/libxotcl1.3.1.dylib(tclStubLib.o) definition of  
> _tclPlatStubsPtr
> /sw/lib/xotcl1.3.1/libxotcl1.3.1.dylib(tclStubLib.o) definition of  
> _tclIntStubsPtr
> /sw/lib/xotcl1.3.1/libxotcl1.3.1.dylib(tclStubLib.o) definition of  
> _tclStubsPtr
> /sw/lib/xotcl1.3.1/libxotcl1.3.1.dylib(tclStubLib.o) definition of  
> _tclIntPlatStubsPtr
> /sw/lib/xotcl1.3.1/libxotcl1.3.1.dylib(tclStubLib.o) definition of  
> _Tcl_InitStubs
>
> But this executable does not work correctly:
>
> ./minibiokwish
> dyld: ./minibiokwish can't open library: libxotcl1.3.1.dylib  (No 
> such  file or directory, errno = 2)
> Trace/BPT trap
>
> (executed from an X11 environment  - not Aqua - of course).
>
>
>
>
> -- 
> Catherine Letondal -- Pasteur Institute Computing Center
>
> _______________________________________________
> Xotcl mailing list  -  Xotcl at alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl







More information about the Xotcl mailing list