ActiveState Community

ActiveTcl and Snack on Mac OS X 10.6

Posted by asimmons on 2009-08-18 14:46
OS: OS X

I'm trying to use ActiveTcl 8.5 with Snack on Mac OS X 10.6. I'm getting this error:

$ ./blackbird.sh 
Error in startup script: dlopen(/Library/Tcl/snack2.2/libsnack.dylib, 10): no suitable image found.  Did find:
	/Library/Tcl/snack2.2/libsnack.dylib: no matching architecture in universal wrapper
    while executing
"load /Library/Tcl/snack2.2/libsnack.dylib"
    ("package ifneeded snack 2.2" script)
    invoked from within
"package require snack"
    (file "blackbird.tcl" line 10)

I'm running in 32-bit mode, and the snack library contains x86 code:

$ uname -a
Darwin kit.local 10.0.0 Darwin Kernel Version 10.0.0: Sat Jul 18 23:35:54 PDT 2009; root:xnu-1456.1.22~1/RELEASE_I386 i386
$ 
$ 
$ lipo -info /Library/Tcl/snack2.2/libsnack.dylib
Architectures in the fat file: /Library/Tcl/snack2.2/libsnack.dylib are: ppc i386 
$

I don't understand why this is happening. It seems as if wish is running in 64-bit mode (event tho I'm booted into 32-bit mode) and wants to load a 64-bit version of snack.

jeffh | Wed, 2009-08-19 15:08

This is due to the shell script finding the core Apple wish, which is 64-bit by default, rather than the AT wish that is 32-bit fat.

asimmons | Thu, 2009-08-20 08:21

Apple's wish lives in /usr/bin/wish (which is a shell script running wish in /System/Library/Frameworks/Tk.framework). Where does ActiveState's Tcl get installed?

jeffh | Thu, 2009-08-20 11:19

/usr/local/bin/wish, in order to not conflict with the system wish.