From: Joey Mukherjee on
Has anyone attempted to compile a TclKit for 64bit Mac on Snow Leopard?

I've been trying and haven't been successful. Possibly there is an easier
way to get this working? The X11 seems to build, but it is just the Aqua
one that fails.

Here are the errors:

gcc -c -Os -pipe -fpascal-strings -Wall -Wno-implicit-int -fno-common -I/Users/joey/mactcl/k85a/src/tk85/unix/../unix -I/Users/joey/mactcl/k85a/src/tk85/unix/../generic -I/Users/joey/mactcl/k85a/src/tk85/unix/../bitmaps -I/Users/joey/mactcl/k85a/src/tcl85/generic -I/Users/joey/mactcl/k85a/src/tcl85/unix -I/Users/joey/mactcl/k85a/src/tk85/unix/../macosx -I/Users/joey/mactcl/k85a/src/tk85/unix/../xlib -DPACKAGE_NAME=\"tk\" -DPACKAGE_TARNAME=\"tk\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tk\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -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 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DMAC_OSX_TCL=1 -DHAVE_COREFOUNDATION=1 -DTCL_SHLIB_EXT=\".dylib\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_PW_GECOS=1 -DMAC_OSX_TK=1 -DTCL_NO_DEPRECATED -DUSE_TCL_STUBS /Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c: In function TkpCreateNativeBitmap:
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:149: warning: implicit declaration of function QDSwapPort
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:156: warning: implicit declaration of function RGBForeColor
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:157: warning: implicit declaration of function PaintRect
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:158: warning: implicit declaration of function PlotIconID
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:160: warning: implicit declaration of function GetIcon
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:160: warning: initialization makes pointer from integer without a cast
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:166: warning: implicit declaration of function PlotIcon
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c: In function TkpGetNativeAppBitmap
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:261: warning: implicit declaration of function GetCIcon
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:261: warning: cast to pointer from integer of different size
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:262: warning: implicit declaration of function PlotCIcon
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:262: error: CIconHandle undeclared (first use in this function)
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:262: error: (Each undeclared identifier is reported only once
/Users/joey/mactcl/k85a/src/tk85/unix/../macosx/tkMacOSXBitmap.c:262: error: for each function it appears in.)
make: *** [tkMacOSXBitmap.o] Error 1

Thanks for any hints!

Joey


From: Donal K. Fellows on
On 29 Oct, 13:59, Joey Mukherjee <j...(a)swri.edu> wrote:
> Has anyone attempted to compile a TclKit for 64bit Mac on Snow Leopard?
>
> I've been trying and haven't been successful.  Possibly there is an easier
> way to get this working?  The X11 seems to build, but it is just the Aqua
> one that fails.

The problem you're having is due to the fact that the Carbon UI API
that Tk 8.5 uses is 32-bit only (thanks Apple!) Tk 8.6 uses Cocoa and
so shouldn't have this issue.

Donal.
From: Joey Mukherjee on
Donal K. Fellows <donal.k.fellows(a)manchester.ac.uk> wrote:
> On 29 Oct, 13:59, Joey Mukherjee <j...(a)swri.edu> wrote:
> > Has anyone attempted to compile a TclKit for 64bit Mac on Snow Leopard?
> >
> > I've been trying and haven't been successful. ?Possibly there is an easier
> > way to get this working? ?The X11 seems to build, but it is just the Aqua
> > one that fails.

> The problem you're having is due to the fact that the Carbon UI API
> that Tk 8.5 uses is 32-bit only (thanks Apple!) Tk 8.6 uses Cocoa and
> so shouldn't have this issue.

Thanks for the explanation! I attempted to hack build_mac_tclkits.tcl for
8.6 and it still didn't work.

Here are a sampling of the errors:

RUN: g++ -o kitsh kitInit.o pwb.o rechan.o tclAppInit.o zlib.o
../tcl/libtcl8.6.a ../vfs/libvfs1.3.a ../zlib/libz.a ../mk/Mk4tcl.a
-prebind -headerpad_max_install_names -Wl,-search_paths_first
-L/Users/joey/mactcl/k86a/install/joeymac.space.swri.edu/lib
-ltcl8.6 -framework CoreFoundation

Undefined symbols:
"_Tcl_InitStubs", referenced from:
_Vfs_Init in libvfs1.3.a(vfs.o)
"_tclStubsPtr", referenced from:
_VfsInternalError in libvfs1.3.a(vfs.o)
_VfsFullyNormalizePath in libvfs1.3.a(vfs.o)
_VfsFreeInternalRep in libvfs1.3.a(vfs.o)
_VfsDupInternalRep in libvfs1.3.a(vfs.o)
_VfsFilesystemPathType in libvfs1.3.a(vfs.o)
_VfsFilesystemSeparator in libvfs1.3.a(vfs.o)
....

Basically, it has an issue with vfs which it built successfully.

gcc -pipe -DPACKAGE_NAME=\"vfs\" -DPACKAGE_TARNAME=\"vfs\"
-DPACKAGE_VERSION=\"1.3\" -DPACKAGE_STRING=\"vfs\ 1.3\"
-DPACKAGE_BUGREPORT=\"\" -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 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1
-DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1
-DSTATIC_BUILD=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1
-I"/Users/joey/mactcl/k86a/src/tcl86/generic"
-I"/Users/joey/mactcl/k86a/src/tcl86/generic"
-I"/Users/joey/mactcl/k86a/src/tcl86/unix"
-Os -Wall -Wno-implicit-int -c `echo ../../../src/vfs/generic/vfs.c`
-o vfs.o
rm -f libvfs1.3.a
ar cr libvfs1.3.a vfs.o
ranlib libvfs1.3.a

Any ideas?

Thanks,
Joey
From: Donal K. Fellows on
On 2 Nov, 14:44, Joey Mukherjee <j...(a)swri.edu> wrote:
> Thanks for the explanation!  I attempted to hack build_mac_tclkits.tcl for
> 8.6 and it still didn't work.
[...]
> Undefined symbols:
>   "_Tcl_InitStubs", referenced from:
>   "_tclStubsPtr", referenced from:

That's because it's not linking the stubs support in from tclstub.a
(the name of which probably has a version number in it...) This is a
known issue IIRC, but I can't remember the issue id right now.

Donal.