tcl/tk 9.0.2 build error
Building tcl/tk under windows msys/mingw is successful.
The created binaries, tclsh90s.exe and wish90s.exe, are running.
But when I try to append an additional directory to build a BI executable
I got an error when running the zip command: "file structure invalid"
I could verify with renaming the .exe files to .zip an trying to open in zip.
This fails on both, tclsh and wish.
After inserting the following line (it was removed in 9.0.2) in the tcl/win/Makefile.in and tk/win/makefile.in
in the TCLSH and WISH targets everything is working as before:
${NATIVE_ZIP} -A ${TCLSH} \
|| echo 'ignore zip-error by adjust sfx process (not executable?)'; \
Is this an error or intended behaviour?
Do I have to change something?
In all likelihood, it is this. See the ticket as to why.
Your description is also not clear. Did you actually just append an additional archive? That will not work. The executable can have only one archive appended to it so you need to split the zip archive from the executable, merge in your own directory, zip it, and add it back to the archive.
See this sample.
You can just run
zip -A tclsh90s.exeThen you can use the zip tool to append any file to it you like.
Without this, the offsets within the zip-file don't follow the 'zip'-standard (whatever that is), "zip -A" corrects that. Tcl itself doesn't bother, but other tools do.
Indeed, you can look here for the reason of this change.
FWIW, also 7-zip is able to modify the bonded archive (from command line as well as from UI 7zFM).
I'm building under windows and until now it was possible to do just: zip -r -q tclsh|wish.exe <additional dirs> With the last changes I have to call before: zip -A tclsh|wish.exe I can do this but I do not see the reason for this change and it is not mentioned in the changes.md file. At least it is a visible change to created tclsh/wish executables.
I can do this but I do not see the reason for this change
The reason for the change was already linked in two earlier comments.
not mentioned in the changes.md file
Afaik, what you were doing was never a documented feature, visible or not. Nevertheless, the change was documented in the following entry in changes.md
- [zipfs info on mountpoint of executable returns zero offset in field 4"](https://core.tcl-lang.org/tcl/info/aaa84f)
It is not possible to list all possible ramifications of every change. Sorry.
In my view, it would be best to fix "zipfs info", such that it doesn't return 0 any more for a "zip -A"'d executable. Until that's done, you will have to do the ""zip -A" yourself, unfortunately. There's disagreement on this.
In the meantime I have chamged my workflow to add the additional -A flag. You can close this issue. Thanks.
Thanks for confirming that this can be closed.