Overview
| Artifact ID: | 1f72e35faa542e6fc1b3706e4679f0db79d6221ba0494a3a85bf474161b78b11 |
|---|---|
| Ticket: | 8c025f8f0d72af49e8b10d12744c2f380861fdc9
Run-time error on tcl 8.6.11 32 bits (from cross-compile Centos6.9 64-bits) |
| User & Date: | anonymous on 2021-01-19 16:26:15 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed 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.
- foundin changed to: "8.6.11"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "3010a758e9cda4cc2dc3eda98e1142ce5e951b01"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "53. Configuration and Build Tools"
- title changed to:
Run-time error on tcl 8.6.11 32 bits (from cross-compile Centos6.9 64-bits)
- type changed to: "Bug"