Now, one of the first things I have tried to do is get an
extension compiled and installed. Once I pointed the configure
script at the right place that went fine (compiling Tcl8.4a3
out-of-the-box was problematic - it couldn't figure out how to do
However, when I try to load my dynamic (shared) library I get the
error 'dyld: inappropriate Mach-O file'. The 'file' command indicates
that the library file is of the correct type, though.
Google searches, FAQs, etc, have not thrown any light on the subject.
Steve Ball | XSLT Standard Library | Training & Seminars
Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas
http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development
Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099
There is a patch for building on OS-X with the correct settings
to have the dlls work. This is certainly the first problem, and
is likely linked to the second. Check out the SF bug db for
more info. Tell me how it goes.
Jeff Hobbs The Tcl Guy
Senior Developer http://www.ActiveState.com/
Tcl Support and Productivity Solutions
> However, when I try to load my dynamic (shared) library I get the
> error 'dyld: inappropriate Mach-O file'. The 'file' command indicates
> that the library file is of the correct type, though.
Is this Tcl extension a Mac-type .shlb shared library or a unix-type
.dll shared library? The former won't work and I don't know anything
about doing the latter; see Jeff's comments about a patch on SF.
Jonathan E. Guyer
I'm trying to build a MacOS X-type .dylib dynamic library, which is
more like a Unix style .dll.
The patch seems to be close to what I need. Currently trying to apply
it to Tcl 8.4a3.
> The patch seems to be close to what I need. Currently trying to apply
> it to Tcl 8.4a3.
A while back, in connection with my update to patch 435258 on SF
file_id=8079&aid=435258), I had posted some instructions on how to
build Tcl 8.3.3 as close as possible to what Apple does so that you can
install on top of the Apple delivered Tcl easily:
this may help with compiling 8.4 as well
note that I had to make some changes to the patch just recently so that
it applies to the HEAD, as Vince Darley has checked in some changes to
tclLoadDyld.c, let me know if you need them.
The error you were seeing has to do with dyld binary formats, Fred
Sanchez' original code in tclLoadDyld.c used MachO bundles, which is
the binary format used for CFBundle et al (e.g. app. plugins), the new
patch changes this to standard .dylibs to be closer to other unices.
This will obviously break any extensions build with the old model...