Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 303132 - dev-lang/tcl: strange changes between LF and CRLF mode
Summary: dev-lang/tcl: strange changes between LF and CRLF mode
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-01 18:58 UTC by Harald van Dijk (RETIRED)
Modified: 2010-02-01 20:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald van Dijk (RETIRED) gentoo-dev 2010-02-01 18:58:46 UTC
$ echo 'puts "Hello, world"' | strace -e write -f tclsh | cat
Process 9676 attached
[pid  9675] write(1, "Hello, world\n", 13Hello, world
) = 13
[pid  9675] write(4, "q", 1)            = 1
Process 9676 detached

$ echo 'puts "Hello, world"' | strace -e write -f tclsh
Process 9671 attached
[pid  9670] write(1, "Hello, world\r\n", 14Hello, world
) = 14
[pid  9670] write(4, "q", 1)            = 1
Process 9671 detached

The former is correct, the latter probably isn't. This is causing bogus failures in the gcc testsuite. I've tested with tcl 8.4.19, 8.5.7, and 8.5.8, and in case this was a problem with the gcc I'm using, I've also retried with gcc 4.4.2 and cleared compiler flags.

Portage 2.2_rc62 (unavailable, gcc-4.5.0-alpha20100128, glibc-2.11-r1, 2.6.33-rc5 x86_64)
=================================================================
System uname: Linux-2.6.33-rc5-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4200+-with-gentoo-2.0.1
Timestamp of tree: Sun, 31 Jan 2010 01:15:01 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-util/cmake:      2.8.0-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -ggdb -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=athlon64 -ggdb -O2"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--noconfmem --oneshot --verbose --with-bdeps=y"
FEATURES="assume-digests autopatch fixpackages news notitles preserve-libs protect-owned sandbox sfperms sign splitdebug strict test test-fail-continue unmerge-logs unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://distfiles.gentoo.org/"
LANG="en_GB.UTF-8"
LDFLAGS="-Xlinker -O1 -Xlinker --as-needed"
LINGUAS="*"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/etc/portage/layman/java-overlay /etc/portage/layman/sunrise /etc/portage/layman/toolchain /etc/portage/crossdev /etc/portage/overlay /var/cvs/gentoo-x86"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac accessibility acl acpi ads alsa amd64 apache2 aspell berkdb bindist bzip2 cairo cdda cdparanoia cdr cjk cli consolekit cracklib crypt cups cvs dbus demo dri dts dvd dvdr eds emboss encode evo fam ffmpeg firefox flac fts3 gcj gdbm gif git gnome gnome-keyring gnutls gstreamer gtk iconv inotify ipv6 ithreads java java5 java6 javascript jit jpeg kvm latex lcms ldap mad mbox mikmod mmx mmxext mng mp3 mp4 mpeg mudflap multilib ncurses nls nocxx normalize nptl nptlonly nsplugin ntfs ogg opengl openmp optimized-qmake oss pam pcre pdf pdo perl pg_legacytimestamp pic png postgres ppds pppd preview-latex python qt3support qt4 quicktime radio rdp readline reflection samba samba4 sdl session smbclient spell spl sql sqlite sse sse2 ssl startup-notification subversion svg swat symlink sysfs tcl tcpd theora threads thunar tidy tiff timidity tk tokenizer toolkit-scroll-bars truetype udev unicode usb v4l v4l2 vhosts videos vim-syntax vorbis webkit x264 xattr xcomposite xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="*" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau nv vesa" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

[ebuild   R   ] dev-lang/tcl-8.5.8  USE="threads -debug" 0 kB
Comment 1 Harald van Dijk (RETIRED) gentoo-dev 2010-02-01 20:09:27 UTC
Bah, never mind for now. tcl intentionally uses CRLF line endings for non-file output, and the pipe marks it as file output. So I guess the problem then is what gcc's testsuite is doing that's causing a write to a file without tcl seeing it as file output, but that's not your problem...