Hi, Thanks to Phil's answer, I re-read the install notes, although I am not in the same situation as he was when he had similar trouble (for him it was because of an automounted home directory). And after trying once again, I found the cause of the problem. The install notes say: "First, we highly recommend that GCC be built into a separate directory than the sources which does not reside within the source tree. This is how we generally build GCC." So objdir must not be in srcdir, and I was already aware of that. But what I didn't know is that srcdir may not be in srcdir either! And I had created a "build_gcc" directory, untar'd gcc-3.3.2 into that directory (srcdir was thus build_cc/gcc-3.3.2), and run "gcc-3.3.2/configure" from within "build_gcc". Maybe the sentence I picked up from the install notes should be rephrased a little? Anyway, now gcc compiled. But I still get "string undeclared" when trying to compile a silly test file... :-( More about that when I give up retrying... See you, Pierric. On Sun, 25 Jan 2004 15:40:23 +0000 Pierric Descamps <pierric@xxxxxxxxxxxx> wrote: > Hi, > > I'm sorry if you find this a silly question. I tried to do some research, > but I could find nothing. I'm trying to compile a gcc > 3 version. I > downloaded the latest version, 3.3.2. I created a build_gcc directory in > which I extracted gcc-3.3.2. While in the build_gcc directory, I typed > > gcc-3.3.2/configure > > Then the trouble started, here's the beginning of the output (starting on > line 1): > > ----------- > Configuring for a i686-pc-linux-gnu host. > gcc-3.3.2/configure: [: /home/pierric/src/build_gcc/gcc-3.3.2: binary > operator e > xpected > Created "Makefile" in /home/pierric/src/build_gcc using "mt-frag" > gcc-3.3.2/configure: test: /home/pierric/src/build_gcc/gcc-3.3.2: binary > operato > r expected > Configuring libiberty... > ----------- > > The rest looked normal and the Makefiles were created. Well, there is > actually one line at the end that looks bad: > > ----------- > checking byte ordering... (cached) little-endian > grep: ../gcc-3.3.2/fastjar/version.c: No such file or directory > updating cache ../config.cache > creating ./config.status > creating Makefile > creating install-defs.sh > creating config.h > ------------ > > So I typed: > > make bootstrap > (note that "make" without bootstrap doesn't seem to avoid the problem) > And then, more trouble. After only 2 or 3 seconds, the following output > appears: > > ------------ > for f in atexit calloc memchr memcmp memcpy memmove memset rename strchr > strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf vfork > waitpid bcmp bcopy bzero; do \ > for g in mkstemps.o ; do \ > case "$g" in \ > *$f*) echo $g >> needed-list ;; \ > esac; \ > done; \ > done > echo regex.o cplus-dem.o cp-demangle.o md5.o alloca.o argv.o choose-temp.o > concat.o dyn-string.o fdmatch.o fibheap.o floatformat.o fnmatch.o getopt.o > getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o > make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o > physmem.o pexecute.o safe-ctype.o sort.o spaces.o splay-tree.o strerror.o > strsignal.o ternary.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o > xstrerror.o > required-list > /bin/sh: -c: line 1: unexpected EOF while looking for matching `"' > /bin/sh: -c: line 2: syntax error: unexpected end of file > make[1]: *** [all-subdir] Error 2 > make[1]: Leaving directory `/home/pierric/src/build_gcc/libiberty' > make: *** [all-libiberty] Error 2 > ------------ > > Just to check, I removed the libiberty directory, and then the same thing > happens with zlib (I think it's zlib, the point is, it happens). > > I tried to download version 3.2.3, and I got exactly the same symptoms. I'm > using an old slackware 8.0 with a glibc 2.2.3 and the latest coreutils (5.0, > I upgraded them because of the "test" error during the configure, but > nothing changed). Bash version is 2.05.0(1), and installed gcc is 2.95.3, > but I don't think that matters, given the error messages. Also not of > interest, but who knows, maybe you'll be able to explain it to me: I have a > /usr/include/g++-3 as well as a /usr/include/g++-v3, but my g++ is 2.95.3... > and I can't compile programs with #include <string> in them, because String > is then undeclared. It used to work, I don't know what broke it. > > Please do not hesitate to ask for more information. I hope you will be able > to help me out, I need g++-3 for a project at the university, and actually I > should already be compiling like a fool :-o > > Thanks in advance, > Pierric Descamps.