Skip to content
Tcl Source Code History Of Ticket 8c025f8f0d
Login

History Of Ticket 8c025f8f0d

Artifacts Associated With Ticket 8c025f8f0d

  1. Ticket change [1f72e35faa] (rid 191162) by anonymous on 2021-01-19 16:26:15:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      I am trying to get a 32bits tcl while compiling on a Linux Centos 6.9 64-bits system.
      I did:
      
      ./configure --disable-64bit --build=i686 -prefix=/home/xx/yy/zz/tcl8.6.11
      make CFLAGS="-m32 -D_USE_32BIT_TIME_T=1" LDFLAGS="-m32"
      make install
      cd ../bin
      ln -s tclsh8.6 tclsh
      
      And then:
      [jpcaron@dev2-71 bin]$ ./tclsh
      % info patchlevel
      8.6.11
      % clock format [clock seconds]
      integer value too large to represent
      %
      
      I traced back the issue to the configure file.
      The configure determines the system support long for the 64-bits integer and set TCL_WIDE_INT_IS_LONG to 1 to be used by gcc.
      :
      checking for required early compiler flags...  _LARGEFILE64_SOURCE
      checking for 64-bit integer type... using long
      checking whether byte ordering is bigendian... no
      :
      
       When the compile comes with -m32, it is too late already since TCL_WIDE_INT_IS_LONG is set (via -D on the gcc command line). Since -DTCL_WIDE_INT_IS_LONG=1, the header file will force the use of long.
      
      As a workaround, I set an environment variable before I run the configure:
      export tcl_cv_type_64bit="long long"
      
      When I try again...
      :
      checking for 64-bit integer type... (cached) long long
      :
      
      [jpcaron@dev2-71 bin]$ ./tclsh
      % info patchlevel
      8.6.11
      % clock format [clock seconds]
      Tue Jan 19 11:15:19 EST 2021
      %
      
      Would be nice if you could either update the configure file to take the build type in consideration or the TCL core overwrite the -DTCL_WIDE_INT_IS_LONG=1 when gcc is using -m32 or document the cross-compile workaround to get the 32-bits program.
      
      Thanks.
      
    5. foundin initialized to: "8.6.11"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "3010a758e9cda4cc2dc3eda98e1142ce5e951b01"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "53. Configuration and Build Tools"
    15. title initialized to:
      Run-time error on tcl 8.6.11 32 bits (from cross-compile Centos6.9 64-bits)
      
    16. type initialized to: "Bug"
  2. Ticket change [3303e28cb7] (rid 191182) by jan.nijtmans on 2021-01-20 08:56:37:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      Proposed fix here: [ad9ee07264c24678]. Can you please test if this works for you? Something better has to wait for 8.7, since 8.6 still uses autoconf-2.59 with very limited cross-compile support.
      
      Thanks for the report!
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "Fixed"
    6. status changed to: "Pending"
  3. Ticket change [da3ccc0427] (rid 191266) by chw on 2021-01-22 05:28:30:

    1. icomment:
      From the c.l.t. thread https://groups.google.com/g/comp.lang.tcl/c/SMkBjGBEUsY
      
      On CentOS 6 x86_64 with 32 bit development packages installed this sequence of
      commands produces a perfectly working 32 bit tclsh8.6:
      
      mkdir /tmp/tcl86
      cd /tmp/tcl86
      wget -c https://prdownloads.sourceforge.net/tcl/tcl8.6.11-src.tar.gz
      tar xzf tcl8.6.11-src.tar.gz
      cd tcl8.6.11/unix
      CC="cc -m32" ./configure --prefix=/tmp/tcl86
      make && make install
      
    2. login: "chw"
    3. mimetype: "text/plain"
  4. Ticket change [427f7e22f7] (rid 191289) by jan.nijtmans on 2021-01-22 15:43:55:

    1. closedate changed to: "2459237.15549788"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Thanks, Christian, for this info! Indeed, this isn't really a bug in Tcl, but it's true that the determination of TCL_WIDE_INT_IS_LONG is tricky. So, if a small change in tcl.h can correct (workaroud) a user's mistake, why not ....
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. status changed to: "Closed"
  5. Ticket change [de2a1db748] (rid 191319) by chw on 2021-01-23 00:08:14:

    1. closedate changed to: "2459237.50572565"
    2. closer changed to: "chw"
    3. icomment:
      I'd prefer to present (if possible at all) an #error with
      some guidance on how to fix the root cause (passing problematic
      compiler flags after configure rendering configure lesser useful).
      
    4. login: "chw"
    5. mimetype: "text/plain"