ActiveTcl and Snack on Mac OS X 10.6

Posted by asimmons on 2009-08-18 13:46

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

$ ./
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.

ActiveState Staff
Wed, 2009-08-19 14: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 07: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?

ActiveState Staff
Thu, 2009-08-20 10:19

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

seadeer | Thu, 2011-05-12 16:16

I am having the exact same problem!

I don't think this is necessarily due to the shell script finding Apple's version of Tcl. I set the path to /usr/local/bin/, and it did not work in tkcon, wish, and tclsh.

kecyy | Mon, 2014-06-09 06:56

hi ~ i'm playing Snack on Mac OS 10.9
i found a workaround way to solve this error ( downgrade the wish version to 8.4)
please try this
% package require snack