Crosscompiliation issue with recent releases (8.6.16/9.0.1)
Dear TCL-Team, since several years I crosscompile TCL/TK as part of Maxima Windows installer from Linux to Windows (using x86_64-w64-mingw32-gcc (or i686-w64-mingw32-gcc)). This worked perfectly - including 8.6.15; the recent 8.6.16 (or 9.0.1) release breaks when using mkdir b cd b ../win/configure --host=x86_64-w64-mingw32 make in the tcl-9.0.1 source directory with: creating libthread.vfs/thread_library (prepare compression) creating libthread3.0.1.zip from libthread.vfs/thread_library rm -f tcl9thread301.dll x86_64-w64-mingw32-gcc -shared -o tcl9thread301.dll threadNs.o threadCmd.o threadSvCmd.o threadSpCmd.o threadPoolCmd.o psGdbm.o psLmdb.o threadSvListCmd.o threadSvKeylistCmd.o tclXkeylist.o "/tmp/tcl9.0.1/b/libtclstub.a" -static-libgcc cat: libthread3.0.1.zip: No such file or directory make[1]: *** [Makefile:311: t--enable-zipfs=nocl9thread301.dll] Error 1 make[1]: Leaving directory '/tmp/tcl9.0.1/b/pkgs/thread3.0.1' There seems to be an issue with the (new) ZIPFS-feature, it works with the option: --enable-zipfs=no (and is --enable-64bit really necessary when (cross)compiling to 64 bit? (x86_64-w64-mingw32 in my case)? 64 bit should be the default nowadays?? Best regards, Wolfgang Dautermann
I'll take a look at 9.0.1. For 8.6.16, you should be using the thread 2.8.x release stream, not 3.x
Confirmed it all works in a msys environment but of course that is different from cross-compilation.
The cause is probably the fix I put in for this bug. The zip creation requires a native tclsh while I suspect in a cross-compile environment, the target tclsh is being invoked.
Possible fixes are
require a native tclsh (not sure if the current autoconf build system already as a TCLSH_NATIVE defined as in the nmake system), or
use the minizip from the Tcl directory.
go back to the use of an external zip program.
I am not in favour of 3. In addition to the bug referenced earlier, while building with BAWT I experienced failures which Paul O. diagnosed as failures with zip's built with certain options.
- and 2. will require additional autoconf machinery.
Opinions from Jan or others?
BTW, this is not a Tcl core issue and should probably be moved to the thread repository but not sure as to how to do that.
A proposed solution is in branch bug-cb338c130b8f in the Thread repository.
For cross-compilation, you need to either have a Tcl9 shell in your PATH or set TCLSH_NATIVE to point to it. For example, when building the core distribution with included packages.
TCLSH_NATIVE=/home/apn/tcl/trunk/bin/tclsh9.0 make
(Above, the Tcl make invokes the pkgs configure scripts)
Or if building thread directly
TCLSH_NATIVE=/home/apn/tcl/trunk/bin/tclsh9.0 ../configure --with-tcl=/data/home/apn/src/9.0.1/tcl/win/build-mingw64 --with-tclinclude=/data/home/apn/src/9.0.1/tcl/generic --host=x86_64-w64-mingw32 --enable-shared
make
Above is for cross-compilation. Otherwise build as usual.
Moved to thread