Skip to content
Tcl Source Code History Of Ticket 62e693e66887d373
Login

History Of Ticket 62e693e66887d373

Artifacts Associated With Ticket 62e693e66887d373

  1. Ticket change [67f60c8538] (rid 183628) by bll on 2020-05-29 17:50:37:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Platform: windows / msys
      Compiler: gcc 10.1.0 / 32-bit
      
      Building 8.6.10 with windows/msys/gcc 10.1.0/32-bit segfaults due to some
      imcompatibility with the compat/zlib/win32/zdll.lib and .../zlib1.dll file.
      
      I built zlib (make -f win32/Makefile.gcc), copied libz.dll.a to win32/
      and adjusted the Tcl Makefile to link against libz.dll.a for win32.
      
    5. foundin initialized to: "8.6.10"
    6. is_private initialized to: "0"
    7. login: "bll"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "bll"
    13. subsystem initialized to: "53. Configuration and Build Tools"
    14. title initialized to:
      windows: msys: gcc version 10.1.0 32-bit build fails due to zlib incompatibility
      
    15. type initialized to: "Bug"
  2. Ticket change [1ae78a32ec] (rid 183640) by bll on 2020-05-29 21:24:22:

    1. comment changed to:
      Platform: windows / msys
      Compiler: gcc 10.1.0 / 32-bit
      
      Building 8.6.10 with windows/msys/gcc 10.1.0/32-bit segfaults due to some
      imcompatibility with the compat/zlib/win32/zdll.lib and .../zlib1.dll file.
      
      I built zlib (make -f win32/Makefile.gcc), copied libz.dll.a and zlib1.dll 
      to win32/ and adjusted the Tcl Makefile to link against libz.dll.a for win32.
      
      2020-5-29: but still not working right.
      
    2. login: "bll"
    3. mimetype: "text/plain"
  3. Ticket change [8cd6f36f42] (rid 183641) by bll on 2020-05-29 23:07:58:

    1. comment changed to:
      Platform: windows / msys
      Compiler: gcc 10.1.0 / 32-bit
      
      Building 8.6.10 with windows/msys/gcc 10.1.0/32-bit segfaults due to some
      imcompatibility with the compat/zlib/win32/zdll.lib and .../zlib1.dll file.
      
      I built zlib (make -f win32/Makefile.gcc), copied libz.dll.a and zlib1.dll 
      to win32/ and adjusted the Tcl Makefile to link against libz.dll.a for win32.
      
      a) If the shipped files in compat/zlib/win32 are used, tclsh86.exe segfaults
         (at cfg[0].value = zlibVersion(); ).
      b) If a new zlib1.dll is created using the gcc 10.1.0 compiler, the 
         zlib1.dll file is not recognized as valid (on a system without msys2).
      
      I cannot find a method to link that works.
      
    2. login: "bll"
    3. mimetype: "text/plain"
  4. Ticket change [060d354423] (rid 183642) by bll on 2020-05-30 15:26:31:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      a) Build compat/zlib using gcc 10.1.0:
         make -f win32/Makefile.gcc LDFLAGS=-static-libgcc
      
      b) Copy the files:
         cp libz.dll.a zlib1.dll win32
      
      c) Change 'configure' to link with libz.dll.a for win32:
      
      $ diff configure-orig configure
      4414c4414
      <     ZLIB_LIBS=\${ZLIB_DIR_NATIVE}/win32/zdll.lib
      ---
      >     ZLIB_LIBS=\${ZLIB_DIR_NATIVE}/win32/libz.dll.a
      
      d) Fix Makefile.in to copy the correct zlib1.dll:
      
      $ diff Makefile.in-orig Makefile.in
      516,521d515
      <       @if test "@ZLIB_LIBS@set" != "${ZLIB_DIR_NATIVE}/win32/zdll.libset" ; then \
      <               $(COPY) $(ZLIB_DIR)/win64/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
      <       else \
      <               $(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
      <       fi;
      <
      522a517
      >     $(COPY) `dirname @ZLIB_LIBS@`/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}
      
      
      I tried creating a new zdll.lib and linking with it, but that did not work.
      
      I did not test keeping the original zlib1.dll and linking with the new
      libz.dll.a.
      
    3. login: "bll"
    4. mimetype: "text/plain"
  5. Ticket change [8ff7ed9405] (rid 183643) by bll on 2020-05-30 15:27:32:

    1. icomment:
      That should probably be:
      
      $(COPY) `dirname "@ZLIB_LIBS@"`/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}
      
      with quotes.
      
    2. login: "bll"
    3. mimetype: "text/plain"
  6. Ticket change [10472ad717] (rid 183655) by jan.nijtmans on 2020-05-31 15:42:17:

    1. icomment:
      Did you consider the possibility that this is a bug in your toolchain somewhere. Do you - by any chance - have binutils version 2.34 (which is the latest upstream version). Well, this one contains a fatal bug, which prevents it to build Tcl at all for win32. See:
      
      [https://www.mail-archive.com/[email protected]/msg32696.html]
      
      The description of this bug:
      
      PR 25447
              * coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
              syms and keep strings flags as these may have been set in order to
              prevent a bogus call to free.
      
      You could try to downgrade binutils to an earlier version and see if this helps. This bug is already fixed upstream, but no new binutils release is done yet which contains it.
      
      For now, I'll mark this bug as 'Invalid', because I think it's not a bug in Tcl but somewhere else (most likely in binutils). If you have proof that I'm wrong, or a way Tcl could provide a workaround, feel free to re-open this ticket.
      
      Hope this helps.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Invalid"
    5. status changed to: "Pending"
  7. Ticket change [d6b475cb03] (rid 183656) by bll on 2020-05-31 16:00:53:

    1. icomment:
      My 32-bit toolchain worked fine until I upgraded msys2.
      
      It could be most anything at this point.
      
      I did provide a work-around for the zlib .dll.
      
      I'm not having a not-build-at-all problem, the build is working now once
      I resolved the .dll issue.   I am having a problem with Tk images not working
      (crashes) now.
      
      Unfortunately, msys2 has no downgrade path.
      
    2. login: "bll"
    3. mimetype: "text/plain"
  8. Ticket change [a62f03b05e] (rid 183657) by jan.nijtmans on 2020-05-31 16:22:52:

    1. icomment:
      > My 32-bit toolchain worked fine until I upgraded msys2.
      
      Did you report this tot the msys2 people? I did report it to cygwin:
      [https://www.mail-archive.com/[email protected]/msg164105.html]
      That's how I noted the problem. Downgrading binutils (which is easy on Cygwin) helped, so I just wait until they pick it up, providing a binutils version which works again. Until then, I'm keeping binutils downgraded to  2.13.1, that's one known to work.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  9. Ticket change [bcb245e3e0] (rid 183662) by bll on 2020-05-31 17:00:11:

    1. icomment:
      Reported.  I have no idea how responsive they are.  We shall see.
      
    2. login: "bll"
    3. mimetype: "text/plain"
  10. Ticket change [076b619d6f] (rid 183669) by bll on 2020-06-01 18:51:08:

    1. closedate changed to: "2459002.28551248"
    2. closer changed to: "bll"
    3. login: "bll"
    4. mimetype: "text/plain"
    5. status changed to: "Closed"
  11. Ticket change [df0d8cac26] (rid 183670) by sebres on 2020-06-02 14:33:45:

    1. closedate changed to: "2459003.10677851"
    2. closer changed to: "sebres"
    3. icomment:
      I don't use msys2/packman (to upgrade a toolchain), I use own mingw-w64 selector (path and/or mount) instead, that allows to target different gcc (mingw) versions.
      
      I can successful built 32-bit 8.6 using gcc 10.1.0 (MinGW-W64 i686-posix-dwarf, built by Brecht Sanders), downloaded from https://github.com/brechtsanders/winlibs_mingw/releases/tag/10.1.0-10.0.0-7.0.0-r3 (see "winlibs.com").
      
      No extra zlib built has been required here, no issue by build (<code>../configure && make tcltest</code>). Test of zlib succeeds too:
      <pre>
          ./tcltest.sh -file zlib*.test
          ...
          zlib.test
          all.tcl:        Total   65      Passed  64      Skipped 1       Failed  0
      </pre>
      
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
  12. Ticket change [69c07a32a0] (rid 183671) by bll on 2020-06-02 16:50:05:

    1. closedate changed to: "2459003.2014477"
    2. closer changed to: "bll"
    3. icomment:
      Interesting that that works, as it looks that he is also using binutils 2.34.
      
    4. login: "bll"
    5. mimetype: "text/plain"
  13. Ticket change [b07a6422ba] (rid 183678) by sebres on 2020-06-02 17:13:10:

    1. closedate changed to: "2459003.21748645"
    2. closer changed to: "sebres"
    3. icomment:
      Perhaps it has been built after some patches are applied (it is already 3rd release of 10.1 - tagged as 10.1.0-10.0.0-7.0.0-r3).
      
      Anyway it looks indeed like it were 2.34:
      <pre>
      $ ld --version
      GNU ld (Binutils for MinGW-W64 i686, built by Brecht Sanders) 2.34
      </pre>
      
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
  14. Ticket change [4a291b2f76] (rid 183679) by bll on 2020-06-02 17:31:03:

    1. closedate changed to: "2459003.22989677"
    2. closer changed to: "bll"
    3. icomment:
      I will try building with his build within a day or two.
      
    4. login: "bll"
    5. mimetype: "text/plain"
  15. Ticket change [648f1edfb6] (rid 183680) by bll on 2020-06-02 18:24:14:

    1. closedate changed to: "2459003.26683716"
    2. icomment:
      His build looks good.   I did not get the immediate segfault upon installation.
      I will build all my tools and test my application and see how things look.
      
    3. login: "bll"
    4. mimetype: "text/plain"
  16. Ticket change [6f2f2e8bf2] (rid 183681) by bll on 2020-06-02 18:34:18:

    1. closedate changed to: "2459003.27382532"
    2. icomment:
      I spoke too soon.
      
      It doesn't segfault, but it doesn't run either (exits immediately).
      The difference is that I build with -static-libgcc.
      
      I believe the bug that is causing issues has problems with loading dynamic 
      libraries when built with -static-libgcc.
      
    3. login: "bll"
    4. mimetype: "text/plain"
  17. Ticket change [e0997eb697] (rid 183682) by bll on 2020-06-02 19:20:57:

    1. closedate changed to: "2459003.30622571"
    2. icomment:
      But thanks for giving me a pointer as to where I can download older versions
      of the mingw gcc compiler.  I am building my application with an older version
      of gcc now.
      
    3. login: "bll"
    4. mimetype: "text/plain"
  18. Ticket change [2edd7e5568] (rid 183683) by bll on 2020-06-03 13:55:02:

    1. closedate changed to: "2459004.07988688"
    2. icomment:
      msys binutils got updated with the two patches that jan pointed out.
      I finished building my application with 9.2.0.
      I'll test 10.1.0 some other day when I'm not tired of windows development.
      
    3. login: "bll"
    4. mimetype: "text/plain"