Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150490 - sys-devel/gcc-4.1.1: c++ using stream fails
Summary: sys-devel/gcc-4.1.1: c++ using stream fails
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-08 10:37 UTC by Morten Bøgeskov
Modified: 2006-10-08 11:19 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 Morten Bøgeskov 2006-10-08 10:37:51 UTC
program (along many others) fails:
$ cat test.cc
#include <iostream>

using namespace std;

int main(int argc, char* argv[]) {
        cerr << "ARGHH!\n";
        return 0;
}

$ c++ test.cc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1479: error: '_InIteb' was not declared in this scope
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1479: error: template argument 2 is invalid
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1480: error: template declaration of '_InIter std::do_get'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1480: error: 'iter_type' was not declared in this scope
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1480: error: 'iter_type' was not declared in this scope
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1480: error: expected primary-expression before 'bool'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1480: error: expected primary-expression before '&' token
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1480: error: '__io' was not declared in this scope
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1481: error: expected primary-expression before '&' token
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1481: error: '__err' was not declared in this scope
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc:1481: error: expected primary-expression before 'long'


This patch fixes it:

$ cat patch
--- /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc.orig   2006-10-08 18:58:04.000000000 +0000
+++ /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc        2006-10-08 19:34:43.000000000 +0000
@@ -1476,7 +1476,7 @@
 
   template<typename _CharT, typename _InIter>
     _InIter
-    money_get<_CharT, _InIteb>::
+    money_get<_CharT, _InIter>::
     do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io,
           ios_base::iostate& __err, long double& __units) const
     {
$





$ emerge --info:
Portage 2.1.1-r1 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r7 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: 2.6.17-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.5
Last Sync: Sun, 08 Oct 2006 16:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.2.11-r1
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://ds.thn.htu.se/linux/gentoo http://mirror.uni-c.dk/pub/gentoo/ http://ftp.du.se/pub/os/gentoo/ "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac acpi alsa apache2 audiofile bash-completion berkdb bitmap-fonts bonobo bzip2 cdparanoia cdr cli crypt cups curl dbus dga dlloader dri dts dv dvb dvd dvdr elibc_glibc emacs emacs-w3 encode exif expat fam ffmpeg firefox flac fortran gd gdbm gif gimp gimpprint glut gnome gnutls gtk gtk2 hal iconv icq idn imagemagick imap innodb input_devices_kbd input_devices_keyboard input_devices_mouse input_devices_wacom isdnlog jabber java javascript jpeg jpeg2k kernel_linux libg++ libwww mad matroska mhash mime mmap mng mp3 mpeg mysql ncurses nls nptl nptlonly nsplugin ogg pam pcntl pcre perl php png ppds pppd python quicktime readline reflection samba scanner session sharedmem sndfile spl ssl svg tcl tcltk tcpd theora threads tiff tk truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i810 video_cards_mga video_cards_neomagic video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vorbis wmf xine xml xmms xorg xprint xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Danny van Dyk (RETIRED) gentoo-dev 2006-10-08 10:50:35 UTC
Have you yet tried to reinstall gcc-4.1.1? Does it still fail?

I say this, because a bitswitch from 'r' to 'b' is possible with only
one bit switching. I really think you got a faulty driver there.

Besides, it's 'r' on my system.
Comment 2 Malcolm Lashley (RETIRED) gentoo-dev 2006-10-08 11:01:36 UTC
<mid air collision>

Ditto - Unable to reproduce here - on either ~amd64 or amd64 systems. (gcc-4.1.1-r1 and gcc-4.1.1 respectively)

grep money.*InIter /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/bits/locale_facets.tcc
on both stable and unstable boxes returns the correct form 'Iter'

I've checked our gcc patchsets and can't see anything related to this.
Comment 3 Morten Bøgeskov 2006-10-08 11:16:05 UTC
I've Just started compiling gcc again. And the "locale_facets.tcc" file is in the buildtree where it is correct (no _InIteb), which must mean that I have either faulty ram or disk (compiling on tmpfs).

Sorry to have waisted peoples time.

Yours
 Bogeskov
Comment 4 SpanKY gentoo-dev 2006-10-08 11:19:39 UTC
the vanilla gcc-4.1.1 tarball has InIter and we dont have any patches that change this ...