Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help required for TCL 8.6.10 32 bits compile on Centos Linux

114 views
Skip to first unread message

JP C

unread,
Jan 15, 2021, 8:52:59 PM1/15/21
to
Hi,
so, got to have a 32bit version of TCL to run on 64 bits machines (Centos). So, downloaded everything, did

 ./configure --disable-64bit -prefix=/temp/tcl8.6.10
make CFLAGS="-m32 -D_USE_32BIT_TIME_T=1" LDFLAGS="-m32"

It created the 32 bits executable, but there is a problem with the "clock format command" (for exmaple):

$ tclsh
% clock format [clock seconds]
integer value too large to represent
%

The errors comes from file tclObj.c, line 3127. So, is missing something in my configure/make line or this is a bug ?

JP C

unread,
Jan 18, 2021, 11:56:23 PM1/18/21
to
Since I am doing a cross-compile, that is where the problem seems to be. After a bug of debugging (a.k.a. prints), I got to the bottom of it.

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. 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.

Now I did add '--build=i686 ' to the configure line and still got the 64-bit integer set to long and TCL_WIDE_INT_IS_LONG to 1. I would consider this incorrect since the 32 bit instruction set cannot not be using a long for 64 bits. There is a workaround (and may be an option I am not aware). Just set
export tcl_cv_type_64bit="long long"
before calling the configure and it will cache the 64-bits integer as a long long and works....

Final recipe (on Centos):
export tcl_cv_type_64bit="long long"
./configure --disable-64bit -prefix=/home/public/RND/AFW/tcl8.6.10

Harald Oehlmann

unread,
Jan 19, 2021, 5:29:01 AM1/19/21
to
Dear JP C,

thank you for the findings.
May I ask you for the following actions:

a) Test the just released 8.6.11 distribution
b) Report it as a bug ticket on core.tcl-lang.org/tcl

You may get a better audience there and your findings are not lost.

Thanks,
Harald

JP C

unread,
Jan 19, 2021, 11:27:03 AM1/19/21
to
Thanks Harald. It fails also on tcl 6.8.11. I opened ticket UUID 8c025f8f0d72af49e8b10d12744c2f380861fdc9.
0 new messages