Teapot on OS X

Posted by alanfolsom on 2010-08-04 05:59

I recently downloaded ActiveTCL for Mac OS X (Snow Leopard on a macbook pro).

I then tried to install the upd extension using teacup:

"sudo teacup install udp"

That appeared to install correctly, but when I package require udp I get:

"dlopen(/Library/Tcl/udp1.0.8/libudp1.0.8.dylib, 10): no suitable image found. Did find /Library/Tcl/udp1.0.8/libudp1.0.8.dylib: mach-o, but wrong architecture."

Does teacup not work on Snow Leopard, or is there some magic I need to do?


Al F.

ActiveState Staff
Wed, 2010-08-04 07:53

Which version of AT have you installed, and for what machine architectures ?

Snow Leopard system are, AFAIK, 64bit systems.

I wonder which of the two OSX udp packages you installed:

package udp 1.0.9 macosx-universal (*)
package udp 1.0.9 macosx10.5-i386-x86_64

The (*)d one is i386-ppc.

Run the 'file command with /Library/Tcl/udp1.0.8/libudp1.0.8.dylib as argument to see which architectures are present.

The run your 'tclsh' and either look at the contents of tcl_platform, or run 'platform::identify' to determine what architecture the tclsh is, exactly.

I suspect that your tclsh is 64bit, and the udp the (*) version, which only has 32bit intel.

alanfolsom | Wed, 2010-08-04 09:04

as you suspected, platform::identify identified me as X86_64, while the udp was mach-o.

In the process, I also discovered that I was using the system supplied TCL in /usr/bin instead of the activeTCL installed in /usr/local/bin.

Running /usr/local/bin/tclsh8.5 I was able to load the udp package with no problems.

There is only one mac osx install for 8.5, which gives me the universal version. Is there a version for X86_64, or do I need 8.6 for that?

Assuming I can get a version of TCL from ActiveState with the X86_64 architecture, is there any reason not to rename or delete the version supplied with Snow Leopard?

Finally ( hope), one more question - where is the documentation installed on OS X?

Thank you very much for your help.


ActiveState Staff
Wed, 2010-08-04 14:35

You need AT 8.6 for x86_64.


where 8.x is your version of ActiveTcl

Deleting the version of Tcl supplied by OS X: I do not know if there are tools which are hardwired to use the OS supplied version, so I personally would not delete it, just ensure that ActiveTcl is earlier in the PATH.

alanfolsom | Thu, 2010-08-05 05:14

Thank you