Overview
| Artifact ID: | 78cc3f0448abb2e84ff66a13060175c6bcc32c1e35d49d1808ac187ec71a0828 |
|---|---|
| Ticket: | 4e812aadae68af384605a5e78845abe40206fbe9
package require msgcat fails |
| User & Date: | hypnotoad on 2018-11-21 13:13:04 |
Changes
- icomment:
Zipfs builds are generating a file system that is only readable from the version of Tcl that is running. We have our little "museum of Tcl" because in an install the latest Tcl is competing in a file system with whatever Tcls may have come before. Breaking /library up into chunks for zipfs builds is an unneeded complication. In testing zipfs was causing issues with safe Tcl interpreters because (depending on environment) there was some install foolery afoot to obscure core packages that were not Safe Tcl worthy. I assembled the spirit of those various install mechanism into a manifest file that tells the interpreter, for clear and for certain, which packages may be loaded in a normal interpreter and which packages may be loaded in a safe interpreter. Clearly the end of the init.tcl file was not the place for that because of the issue raised in this ticket. The solution I've come up with is to take what was in that manifest and move it out of init.tcl and into a file the installers and Tcl will ignore (but still maintained in the /library file system via scm) as manifest.txt. When building zipfs file systems, we copy /library into the VFS. Now there will be one extra step, after the copy is completed, to rename manifest.txt to pkgIndex.tcl. Because tcl_library is already in the auto_path of an unmodified Tcl interpreter, all of the packages we are looking to expose (either in a "real" interp or a "safe" interp) are not exposed in a way that make sense. And in the case of Nmake, you can continue to use your current install procedure and the manifest.txt file will simply be ignored. Though it would be nice to bring nmake up to speed on how to wrap /library into a vfs that is attached to the tcl.dll file. I see that we are deputizing Tcl for a couple of other steps in the nmake build process. Perhaps we could use the zip encoded in the core now to do the wrapping? What other platforms are doing is copying /library to libtcl.vfs, and then using a native zip program to build tclVERSION.zip. For static libraries, this zip file is copied next to the libtclVERSION.a file. For dynamic builds, tclVERSION.zip is concatenated onto the end of the libtclVERSION.(so|dll|dylib), and then we perform a call to zip to cleanup the offset. Inside the tip430 implementation we have a zip encoder that could do this entire process in one step I have put together a wrapper tcl script (checked into [core-8-branch]) and a provisional patch to makefile.vc to utilize it (in the [nmake-zipfs] branch). I'm a little rusty on my visual studio, so if Jan or fvogel could try that branch out that would be great. The patch eliminates installing files and instead wraps /library in a zipfs system attached to the tcl.dll (for dynamic builds) or tcl$(VERSION).zip, which is dropped in next to the tclsh.exe during install. I think I got it right, but it never hurts to test. I have tested that the wrapper script does indeed work on Mac. --Sean
- login: "hypnotoad"
- mimetype: "text/x-fossil-wiki"