This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
GCC 2.95.2 and GLIBC 2.1.93, broken streambuf.h
- To: libc-alpha at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org
- Subject: GCC 2.95.2 and GLIBC 2.1.93, broken streambuf.h
- From: Ben Collins <bcollins at debian dot org>
- Date: Fri, 1 Sep 2000 23:14:01 -0400
- Cc: doko at debian dot org
I saw this posted about 2 weeks ago to the libc-alpha list, and Ulrich's
answer was basically that gcc was at fault. I never saw it come up on the
gcc lists, and a web search shows nothing in the gcc-bugs archives.
Basically installing glibc 2.1.9[123] built with gcc-2.95.2 will not allow
C++ applications to compile. Here's the error:
/usr/lib/gcc-lib/powerpc-linux/2.95.2/../../../../include/g++-3/streambuf.h: In method `struct streampos streambuf::pubseekoff(long long int, ios::seek_dir, int = 3)':
/usr/lib/gcc-lib/powerpc-linux/2.95.2/../../../../include/g++-3/streambuf.h:362: conversion from `__off64_t' to non-scalar type `streampos' requested
/usr/lib/gcc-lib/powerpc-linux/2.95.2/../../../../include/g++-3/streambuf.h: In method `struct streampos streambuf::pubseekpos(_G_fpos64_t, int = 3)':
/usr/lib/gcc-lib/powerpc-linux/2.95.2/../../../../include/g++-3/streambuf.h:364: `struct streampos' used where a `long long int' was expected
/usr/lib/gcc-lib/powerpc-linux/2.95.2/../../../../include/g++-3/streambuf.h:364: warning: control reaches
end of non-void function `streambuf::pubseekpos(_G_fpos64_t, int)'
This occurs on i386 and sparc too, so there's nothing special about the
architecture. Now, when I try to recompile gcc 2.95.2 with glibc 2.1.93
installed, I get this:
/usr/src/gcc/gcc-2.95.2/build/gcc/xgcc -B/usr/src/gcc/gcc-2.95.2/build/gcc/ -B/usr/powerpc-linux/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates -I. -I/usr/src/gcc/gcc-2.95.2/src/libio -nostdinc++ -D_IO_MTSAFE_IO -fPIC /usr/src/gcc/gcc-2.95.2/src/libio/filebuf.cc -o pic/filebuf.o
/usr/src/gcc/gcc-2.95.2/src/libio/filebuf.cc: In method `class filebuf * filebuf::open(const char *, int,
int = 436)':
/usr/src/gcc/gcc-2.95.2/src/libio/filebuf.cc:119: no match for `streampos == int'
Now, I'm not a C++ person. I can see the problem, but the resolution is
beyond my know how. Is there a fix for this? This is in regard to moving
Debian's current (6 archs) unstable to glibc 2.2pre. We want to do this in
phases for several reasons, not the least of which is the extreme overhead
in recompiling things that need to be (soname change for libstdc++ etc..),
but also to actually not break upgradability from previous releases of
Debian, and to ensure we can easily differentiate problems caused by the
gcc and glibc upgrades. This is why we aren't going to just drop current
gcc CVS and glibc 2.1.93 in at the same time.
Help appreciated,
Ben
--
-----------=======-=-======-=========-----------=====------------=-=------
/ Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'