Artifacts Associated With Ticket e80478c91d17162d
Ticket change [3636803274] (rid 162715) by ralfixx on 2018-04-30 09:35:44:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Trying to compile tcl8.6.8 for windows-64bit via MSYS and configure fails due to old assumptions about where the required tools reside in the SDK. However, when setting up the compiler environment via the recommended vcvars64.bat, these checks are unneccesary. Steps to reproduce: - Visual Studio 2017 (I would expect the same to bve true for VS2015 and probably also VS2012) - start vcvars64.bat as provided by the compiler installation (Start menu, sets up the compiler environment. ********************************************************************** ** Visual Studio 2017 Developer Command Prompt v15.5.6 ** Copyright (c) 2017 Microsoft Corporation ********************************************************************** [vcvarsall.bat] Environment initialized for: 'x64' - from there, start MSYS bash (I'm still using msys, not msys-2, but I don't expect that to be relevant here) - run configure: $ ./configure --enable-64bit checking for gcc... no checking for cc... no checking for cc... no checking for cl... cl checking for C compiler default output file name... conftest.exe checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... .exe checking for suffix of object files... obj checking whether we are using the GNU C compiler... no checking whether cl accepts -g... yes checking for cl option to accept ANSI C... none needed checking for inline... inline checking how to run the C preprocessor... cl -E checking for egrep... grep -E checking for ANSI C header files... yes checking for ar... no checking for ranlib... no checking for windres... no checking whether make sets $(MAKE)... yes checking for building with threads... yes (default) checking how to build libraries... shared checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... no checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... no checking if 64bit support is requested... yes checking if Windows/CE build is requested... no checking for Windows/CE celib directory... NO_CELIB checking for cygpath... cygpath -m checking compiler flags... using shared flags configure: WARNING: Could not find 64-bit AMD64 SDK Using 64-bit AMD64 mode checking whether _WIN64 is declared... yes test: 4395: unexpected operator checking for intptr_t... yes checking for uintptr_t... yes checking for FINDEX_INFO_LEVELS in winbase.h... yes checking for intrinsics support in compiler... yes checking for wspiapi.h... no checking for FINDEX_INFO_LEVELS in winbase.h... (cached) yes checking for build with symbols... no checking whether to embed manifest... yes configure: creating ./config.status config.status: creating Makefile config.status: creating tclConfig.sh config.status: creating tcl.hpj config.status: creating tclsh.exe.manifest This creates a Makefile containing wrong pathes to the linker and rc tool. Consequently 'make' fails: $ make cl -c -nologo -O1 -MD -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DUNICODE -D_UNICODE -D_ATL_XP_TARGETING -W3 ---<snip-snip>-- "l:/ralf/si++aegis/si++.4.0.C822/src/tcltk/tcl8.6.8/generic/tclStubLib.c" -FotclStubLib.obj tclStubLib.c --<snip-snip>-- "C:/Progra~1/Microsoft Platform SDK/Bin/Win64/x86/AMD64/link.exe" -lib -nologo -MACHINE:AMD64 -LIBPATH:"C:/Progra~1/Microsoft Platform SDK/Lib/AMD64" -nodefaultlib -out:tclstub86.lib tclStubLib.obj tclTomMathStubLib.obj tclOOStubLib.obj /bin/sh: C:/Progra~1/Microsoft Platform SDK/Bin/Win64/x86/AMD64/link.exe: not found make: *** [tclstub86.lib] Error 127 The reason is some checks in tcl.m4, from which the configure script is created via autoconf. If I apply the appended patch for tcl.m4 and re-create 'configure', the makefile is generated correctly and compilation succeeds. The patch basically removes any second-guessing about compiler and SDK tools when compiling for win64. It also adjusts the CFLAGS to be what is in makefile.vc. ================================================= With tcl.m4 patch applied: $ autoconf $ CONFIG_SHELL=/bin/bash ./configure --enable-64bit checking for gcc... no checking for cc... no checking for cl.exe... cl.exe checking whether the C compiler works... yes checking for C compiler default output file name... conftest.exe checking for suffix of executables... .exe checking whether we are cross compiling... no checking for suffix of object files... obj checking whether we are using the GNU C compiler... no checking whether cl.exe accepts -g... yes checking for cl.exe option to accept ISO C89... none needed checking for inline... inline checking how to run the C preprocessor... cl.exe -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for ar... no checking for ranlib... no checking for windres... no checking whether make sets $(MAKE)... yes checking for building with threads... yes (default) checking how to build libraries... shared checking if 64bit support is requested... yes checking if Windows/CE build is requested... no checking for Windows/CE celib directory... NO_CELIB checking for cygpath... cygpath -m checking compiler flags... using shared flags checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... no checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... no checking for intptr_t... yes checking for uintptr_t... yes checking for FINDEX_INFO_LEVELS in winbase.h... yes checking for intrinsics support in compiler... ./configure: line 4804: ac_fn_c_try_link: command not found no checking for wspiapi.h... no checking for FINDEX_INFO_LEVELS in winbase.h... (cached) yes checking for build with symbols... no checking whether to embed manifest... yes configure: creating ./config.status config.status: creating Makefile config.status: creating tclConfig.sh config.status: creating tcl.hpj config.status: creating tclsh.exe.manifest $ make rc -fo tcl.res -r -i "l:/ralf/si++aegis/si++.4.0.C822/src/tcltk/tcl8.6.8/generic" -i "l:/ralf/si++aegis/si++.4.0.C822/src/tcltk/tcl8.6.8/win" "tcl.rc" Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384 Copyright (C) Microsoft Corporation. All rights reserved. link -dll -incremental:no -nologo -release -out:tcl86.dll --<snip-snip>-- tcl.res netapi32.lib kernel32.lib user32.lib advapi32.lib userenv.lib ws2_32.lib l:/ralf/si++aegis/si++.4.0.C822/src/tcltk/tcl8.6.8/compat/zlib/win64/zdll.lib Bibliothek "tcl86.lib" und Objekt "tcl86.exp" werden erstellt. if test -f tcl86.dll.manifest ; then mt.exe -nologo -manifest tcl86.dll.manifest -outputresource:tcl86.dll\;2 ; fi rc -fo tclsh.res -r -i "l:/ralf/si++aegis/si++.4.0.C822/src/tcltk/tcl8.6.8/generic" -i "l:/ralf/si++aegis/si++.4.0.C822/src/tcltk/tcl8.6.8/win" "tclsh.rc" Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384 Copyright (C) Microsoft Corporation. All rights reserved. cl.exe -nologo -O2 -MD -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DUNICODE -D_UNICODE -D_ATL_XP_TARGETING tclAppInit.obj tcl86.lib tclstub86.lib netapi32.lib kernel32.lib user32.lib advapi32.lib userenv.lib ws2_32.lib l:/ralf/si++aegis/si++.4.0.C822/src/tcltk/tcl8.6.8/compat/zlib/win64/zdll.lib \ tclsh.res -Fe"tclsh86.exe" -link -subsystem:console -nologo if test -f tclsh86.exe.manifest ; then mt.exe -nologo -manifest tclsh86.exe.manifest -outputresource:tclsh86.exe\;1 ; fi - foundin initialized to: "8.6.8, 8.5.19"
- is_private initialized to: "0"
- login: "ralfixx"
- priority initialized to: "5 Medium"
- private_contact initialized to: "1d3c95db24e116878d6afed7cf890a89a0effe62"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "ralfixx"
- subsystem initialized to: "53. Configuration and Build Tools"
- title initialized to: "configure fails on win-64 under msys bash"
- type initialized to: "Bug"
Add attachment "diff" [993ab489ca] (rid 162716) by ralfixx on 2018-04-30 09:37:24.
Ticket change [31b66d62fd] (rid 259681) by serhiy.storchaka on 2026-10-21 09:37:20:
- icomment:
The guessing of the Microsoft Platform SDK paths for 64-bit builds was removed in [4454ae265c] (8.6.11), so with the vcvars64 environment the plain <tt>link</tt> and <tt>rc</tt> are used; the <tt>test ... ==</tt> line that gave "unexpected operator" is also gone from win/configure. Closing.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [1e0dc340e1] (rid 259981) by serhiy.storchaka on 2026-10-22 17:19:29:
- closedate changed to: "2461334.900930116"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"