This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problems building GCC


I've been trying to compile GCC for the past few days without success.
My first attempts were with the 2.95.2 distribution, unmodified. I would
run the set of commands given by instructions (provided below) and the
compilation would proceed smoothly until reaching a certain point in the
build2 section, where it would fail abruptly, stating that "indstream.o"
was not found. After searching for a solution to the problem, I found a
patch on the GCC archives for something that seemed similar to my
problem, a fix to let the compilation work with glibc installed. I
applied the patch, and tried again, but it failed at the same place...
with a different error. Does anyone see if there's anything I can do?

****************************************
The command I've been running to compile
****************************************

mkdir /lfs/usr/src/gcc-build &&
     cd /lfs/usr/src/gcc-build &&
     ../gcc-2.95.2/configure --prefix=/usr \
        --with-gxx-include-dir=/usr/include/g++ \
        --enable-languages=c,c++ --disable-nls &&
     make -e LDFLAGS=-static bootstrap &&
     make prefix=/lfs/usr local_prefix=/lfs/usr/local \
        gxx_include_dir=/lfs/usr/include/g++ install

**************************
The new patch I downloaded
**************************

***************
*** 1,2 ****
--- 1,7 ----
+ 2000-08-22  Rodrigo Barbosa <rodrigob@conectiva.com.br>
+
+  * libio/indstream.cc (indirectbuf::seekoff): Change int ret_val to
+  streampos ret_val for compatibility with glibc 2.1.9X
+
  2000-08-22  Alexandre Oliva  <aoliva@redhat.com>

diff -c2pr gcc/libio/indstream.cc gcc-conectiva/libio/indstream.cc
*** gcc/libio/indstream.cc Tue Aug 22 17:38:46 2000
--- gcc-conectiva/libio/indstream.cc Tue Aug 22 18:05:49 2000
*************** int indirectbuf::uflow()
*** 75,79 ****
  streampos indirectbuf::seekoff(streamoff off, _seek_dir dir, int mode)

  {
!     int ret_val = 0;
      int select = mode == 0 ? (ios::in|ios::out) : mode;
      streambuf *gbuf = (select & ios::in) ? get_stream() :
(streambuf*)NULL;
--- 75,79 ----
  streampos indirectbuf::seekoff(streamoff off, _seek_dir dir, int mode)

  {
!     streampos ret_val = 0;
      int select = mode == 0 ? (ios::in|ios::out) : mode;
      streambuf *gbuf = (select & ios::in) ? get_stream() :
(streambuf*)NULL;
*************** streampos indirectbuf::seekoff(streamoff
*** 92,96 ****
  streampos indirectbuf::seekpos(streampos pos, int mode)
  {
!     int ret_val = EOF;
      int select = mode == 0 ? (ios::in|ios::out) : mode;
      streambuf *gbuf = (select & ios::in) ? get_stream() :
(streambuf*)NULL;
--- 92,96 ----
  streampos indirectbuf::seekpos(streampos pos, int mode)
  {
!     streampos ret_val = EOF;
      int select = mode == 0 ? (ios::in|ios::out) : mode;
      streambuf *gbuf = (select & ios::in) ? get_stream() :
(streambuf*)NULL;

*************************
End of compilation output
*************************
pc-linux-gnu/bin/ -c -g -O2 -I. -I../../../gcc-2.95.2/libio
-D_IO_MTSAFE_IO  ../../../gcc-2.95.2/libio/iogetline.c -o
pic/iogetline.o
/lfs/usr/src/gcc-build/gcc/xgcc -B/lfs/usr/src/gcc-build/gcc/
-B/usr/i586-pc-linux-gnu/bin/ -c -g -O2 -I. -I../../../gcc-2.95.2/libio
-D_IO_MTSAFE_IO ../../../gcc-2.95.2/libio/iogetline.c
rm -rf libio.a
ar rc libio.a iogetline.o
ranlib libio.a
test x"no" != xyes || \
  /lfs/usr/src/gcc-build/gcc/xgcc -B/lfs/usr/src/gcc-build/gcc/
-B/usr/i586-pc-linux-gnu/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE
-fno-implicit-templates -I. -I../../../gcc-2.95.2/libio -nostdinc++
-D_IO_MTSAFE_IO  ../../../gcc-2.95.2/libio/builtinbuf.cc -o
pic/builtinbuf.o
/lfs/usr/src/gcc-build/gcc/xgcc -B/lfs/usr/src/gcc-build/gcc/
-B/usr/i586-pc-linux-gnu/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE
-fno-implicit-templates -I. -I../../../gcc-2.95.2/libio -nostdinc++
-D_IO_MTSAFE_IO ../../../gcc-2.95.2/libio/builtinbuf.cc
test x"no" != xyes || \
  /lfs/usr/src/gcc-build/gcc/xgcc -B/lfs/usr/src/gcc-build/gcc/
-B/usr/i586-pc-linux-gnu/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE
-fno-implicit-templates -I. -I../../../gcc-2.95.2/libio -nostdinc++
-D_IO_MTSAFE_IO  ../../../gcc-2.95.2/libio/filebuf.cc -o pic/filebuf.o
/lfs/usr/src/gcc-build/gcc/xgcc -B/lfs/usr/src/gcc-build/gcc/
-B/usr/i586-pc-linux-gnu/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE
-fno-implicit-templates -I. -I../../../gcc-2.95.2/libio -nostdinc++
-D_IO_MTSAFE_IO ../../../gcc-2.95.2/libio/filebuf.cc
test x"no" != xyes || \
  /lfs/usr/src/gcc-build/gcc/xgcc -B/lfs/usr/src/gcc-build/gcc/
-B/usr/i586-pc-linux-gnu/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE
-fno-implicit-templates -I. -I../../../gcc-2.95.2/libio -nostdinc++
-D_IO_MTSAFE_IO  ../../../gcc-2.95.2/libio/fstream.cc -o pic/fstream.o
/lfs/usr/src/gcc-build/gcc/xgcc -B/lfs/usr/src/gcc-build/gcc/
-B/usr/i586-pc-linux-gnu/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE
-fno-implicit-templates -I. -I../../../gcc-2.95.2/libio -nostdinc++
-D_IO_MTSAFE_IO ../../../gcc-2.95.2/libio/fstream.cc
test x"no" != xyes || \
  /lfs/usr/src/gcc-build/gcc/xgcc -B/lfs/usr/src/gcc-build/gcc/
-B/usr/i586-pinux-gnu/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE
-fno-implicit-templates. -I../../../gcc-2.95.2/libio -nostdinc++
-D_IO_MTSAFE_IO  ../../../gcc-2.95.ibio/indstream.cc -o pic/indstream.o
/lfs/usr/src/gcc-build/gcc/xgcc -B/lfs/usr/src/gcc-build/gcc/
-B/usr/i586-pc-ux-gnu/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE
-fno-implicit-templates --I../../../gcc-2.95.2/libio -nostdinc++
-D_IO_MTSAFE_IO ../../../gcc-2.95.2/lo/indstream.cc
../../../gcc-2.95.2/libio/indstream.cc: In method `struct streampos
indirectb:seekoff(long long int, ios::seek_dir, int = 3)':
../../../gcc-2.95.2/libio/indstream.cc:77: conversion from `int' to
non-scalaype `_G_fpos64_t' requested
../../../gcc-2.95.2/libio/indstream.cc:86: no match for `streampos & !=
int'
../../../gcc-2.95.2/libio/indstream.cc: In method `struct streampos
indirectb:seekpos(_G_fpos64_t, int = 3)':
../../../gcc-2.95.2/libio/indstream.cc:94: conversion from `int' to
non-scalaype `_G_fpos64_t' requested
../../../gcc-2.95.2/libio/indstream.cc:103: no match for `streampos & !=
int'make[2]: *** [indstream.o] Error 1
make[2]: Leaving directory
`/lfs/usr/src/gcc-build/i586-pc-linux-gnu/libio'
make[1]: *** [all-target-libio] Error 2
make[1]: Leaving directory `/lfs/usr/src/gcc-build'
make: *** [bootstrap] Error 2



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]