Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 36368032740b92d24973ae885c7d7c2dcc19261d798e43930cd09bf96902d97e
Ticket: e80478c91d17162d970dd0422a79fafc64bd1d35
configure fails on win-64 under msys bash
User & Date: ralfixx on 2018-04-30 09:35:44
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed 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
    
  5. foundin changed to: "8.6.8, 8.5.19"
  6. is_private changed to: "0"
  7. login: "ralfixx"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "1d3c95db24e116878d6afed7cf890a89a0effe62"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "ralfixx"
  14. subsystem changed to: "53. Configuration and Build Tools"
  15. title changed to: "configure fails on win-64 under msys bash"
  16. type changed to: "Bug"