Hi! I need some help in investigating the recent FTBFS of tcl8.5 (8.5.8-1). The relevant part of buildd log is the following:
mipsel-linux-gnu-gcc -c -g -O2 -fno-unit-at-a-time -Wall -fPIC -I"." -I/build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../unix -I/build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../generic -I/build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../libtommath -DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.5\" -DPACKAGE_STRING=\"tcl\ 8.5\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_GETATTR_NP=1 -DGETATTRNP_NOT_DECLARED=1 -DTCL_THREADS=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DTCL_SHLIB_EXT=\".so\" -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_OPEN64=1 -DHAVE_LSEEK64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_WAITPID=1 -DHAVE_GETADDRINFO=1 -DHAVE_GETPWUID_R_5=1 -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 -DHAVE_GETGRNAM_R=1 -DHAVE_GETHOSTBYNAME_R_6=1 -DHAVE_GETHOSTBYNAME_R=1 -DHAVE_GETHOSTBYADDR_R_8=1 -DHAVE_GETHOSTBYADDR_R=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_UNLOAD_DLLS=1 /build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../generic/tclStrToD.c /build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../generic/tclStrToD.c:77:21: error: sys/fpu.h: No such file or directory /build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../generic/tclStrToD.c: In function 'TclInitDoubleConversion': /build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../generic/tclStrToD.c:2170: error: storage size of 'mipsCR' isn't known /build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../generic/tclStrToD.c:2172: warning: implicit declaration of function 'get_fpc_csr' /build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../generic/tclStrToD.c:2174: warning: implicit declaration of function 'set_fpc_csr' /build/buildd-tcl8.5_8.5.8-1-mipsel-AP2enj/tcl8.5-8.5.8/unix/../generic/tclStrToD.c:2170: warning: unused variable 'mipsCR' make[1]: *** [tclStrToD.o] Error 1 The changes which make build fail on mipsel (and likely on mips) were introduced by upstream in 8.5.8 via the following patch which apparently fixes bug reported at http://sourceforge.net/tracker/?func=detail&aid=2819200&group_id=10894&atid=110894 : Index: generic/tclStrToD.c =================================================================== RCS file: /cvsroot/tcl/tcl/generic/tclStrToD.c,v retrieving revision 1.33.2.1 diff -u -r1.33.2.1 tclStrToD.c --- generic/tclStrToD.c 1 Apr 2008 20:12:01 -0000 1.33.2.1 +++ generic/tclStrToD.c 9 Jul 2009 19:44:04 -0000 @@ -68,6 +68,14 @@ #if defined(__sun) && defined(__i386) && !defined(__GNUC__) #include <sunmath.h> #endif + +/* + * MIPS floating-point units need special settings in control registers + * to use gradual underflow as we expect. + */ +#if defined(__mips) +#include <sys/fpu.h> +#endif /* * HP's PA_RISC architecture uses 7ff4000000000000 to represent a quiet NaN. * Everyone else uses 7ff8000000000000. (Why, HP, why?) @@ -2158,6 +2166,14 @@ } bitwhack; #endif +#if defined(__mips) + union fpc_csr mipsCR; + + mipsCR.fc_word = get_fpc_csr(); + mipsCR.fc_struct.flush = 0; + set_fpc_csr(mipsCR.fc_word); +#endif + /* * Initialize table of powers of 10 expressed as wide integers. */ The bugreport above mentions 'many test suite failures', though I've tried to revert the patch and run the test suite on mips (in Qemu as all mips and mipsel DD machines are down currently) which was passed successfully (apt-get source tcl8.5; cd tcl8.5-8.5.8/unix; ./configure --enable-threads; make; make test). Should I assume that this patch isn't necessary for Linux and should be reverted (and reported back to upstream)? Or is this some Debian-specific difference? Cheers! -- Sergei Golovan PS: Please, cc me as I'm not subscribed to debian-mips. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

