From: Marc C. <cul...@gm...> - 2025-06-15 17:31:50
|
I have a lot of questions on this topic. I will ask them one at a time, to try to avoid overload. Before I ask the first one, I would like to draw attention to ticket c397574993 <https://core.tcl-lang.org/sampleextension/tktview/c397574993> on the sample extension repository. (I am not sure if anyone monitors that repository.) It is a glaring indication that the TEA sample extension is not really in a state where it can be used. Here is my first question. When you build a TEA compliant binary Tcl extension, say the sample extension, you end up with a .dylib file. The question is:* Why????* I don't think it makes sense. There are two types of shared libraries on macOS. They normally have different file extensions: *.so *for a so-called "bundle" and *.dylib* for a so-called "dynamic library". Both of these file types can be dynamically loaded by *dyld*. So either type should work for a binary Tcl extension. The difference is that a "dynamic library" can also be used by the static linker* ld*. Other languages, e.g. Python, use .so files for binary extension modules which are loaded by dyld. Tcl could do that as well. The only reason not to do that would be if you needed to statically link against the shared library in a Tcl binary extension. And that is why the Tk extension, i.e. the dynamic library named Tk (the .dylib filename extension is optional), uses the "dynamic library" format. Other extensions need to link against it. But for a normal TEA extension, the simpler "bundle" format would seem to make more sense. Does anyone here know anything about why TEA is doing this? - Marc |