Tcl Source Code

View Ticket
Login
Ticket UUID: e4d394cd2419171024b9af78bc3ed96984e3ce28
Title: mingw builds fail for pkgs
Type: Bug Created on: 2024-05-02 05:05:05
Submitter: apnadkarni Assigned to: nobody
Subsystem: 53. Configuration and Build Tools Severity: Minor
Priority: 5 Medium Last modified: 2026-10-21 09:36:26
Status: Open Closed by: nobody
Resolution: None Closed on:
Version: 9.0b2
Description:

Using mingw on Windows, while Tcl itself builds fine, building of the pkgs directory fails, at least on my system.

The 64-bit build fails in thread

make[1]: Entering directory '/c/src/tcltk/9.0b2/tcl/win/build/x64/pkgs/thread3.0b2'
creating libthread.vfs/thread_library (prepare compression)
creating libthread3.0b2.zip from libthread.vfs/thread_library
cd libthread.vfs && /c/src/tcltk/9.0b2/tcl/win/build/x64/pkgs/thread3.0b2/minizip -o -r ../libthread3.0b2.zip *
/bin/sh: line 5: /c/src/tcltk/9.0b2/tcl/win/build/x64/pkgs/thread3.0b2/minizip: No such file or directory
make[1]: *** [Makefile:233: libthread3.0b2.zip] Error 127

config.log shows "minizip not found in path". However, I do have minizip in the path. Not having found minizip, it builds it but the thread invokes it from the wrong directory.

The 32-bit build fails in that it does not seem to try to build pkgs at all.

It's possible something wrong with my mingw configuration as I do not use it often so someone else should verify.

Note it's not a Windows issue as the nmake builds (which is what I normally use) work fine.

Not a reason to hold up beta 2 imo.

User Comments:
jan.nijtmans added on 2024-05-02 07:12:19:

I wouldn't be surprised if some path setting is missing there. I'm normally working in an environment where "zip" is in the path, then there is no need for minizip.

Thread 9.0 zips it's companion "ttrace.tcl", being part of libthread.so, in the same way Tk zips its tk_library into libtk.so as well. Is that necessary? No! But it makes searching for "ttrace.tcl" in the filesystem more robust. The nmake build was never adapted to do that, but it would be nice for extensions to be able to do that as well.


apnadkarni added on 2024-05-04 14:57:50:
Yes, installing zip fixed the problem. Keeping open though because the underlying minizip fallback bug still exists.

serhiy.storchaka added on 2026-10-21 09:36:26:

Rechecked with main and Thread 3.0.7 in pkgs/, on Windows 11 with MSYS2 and no zip or minizip on PATH. Both a 32-bit MINGW32 (i686) and a 64-bit UCRT64 build configure and build pkgs/thread during make; make packages gives tcl9thread307.dll, and package require thread, package require Ttrace (from the attached zip) and thread::send work in both. The Thread part was fixed by Thread itself, which now builds its zip with zipfs mkzip (Thread check-in 37b67651e1).

For the remaining minizip fallback in the TEA tcl.m4: proposed fix in tclconfig branch zipfs-no-minizip. With no zip on PATH, TEA_ZIPFS_SUPPORT no longer sets ZIP_PROG=./minizip and ZIP_INSTALL_OBJS=minizip (a package has no minizip to build), but leaves them empty; packages should create the archive with zipfs mkzip of a Tcl 9 tclsh, as Tk does since Tk 130949dafe.