Obtained http://ftp.de.debian.org/debian/pool/main/g/gcc-4.6/gcc-4.6_4.6.0.orig.tar.gz from http://packages.debian.org/sid/gcc-4.6 Prerequisite libraries (gmp, mpfr, mpc) build ok without any problems. './configure' succeeds for gcc-4.6 'make' fails with: make[3]: Entering directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/host-x86_64-unknown-linux-gnu/gcc' build/genhooks \ ../.././gcc/doc/tm.texi.in > tmp-tm.texi (null): No place specified to document hook TARGET_ASM_OPEN_PAREN make[3]: *** [s-tm-texi] Error 1 make[3]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/host-x86_64-unknown-linux-gnu/gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0' make: *** [all] Error 2 How can this be corrected? Thanks.
Do not build in the source directory.
this is documented at http://gcc.gnu.org/install/configure.html and http://gcc.gnu.org/wiki/FAQ#configure
My apologies, I should know better to RTFM for something of GCC's complexity. Have gotten too used to packages for which only in place configure & make are neccessary. Will update upon building the correct way.
Followed the instructions for separate build directory. 'make' fails with the same error as before! Yes, I did a 'make distclean' before 'make'.
Building in a separate dir has the advantage you don't need to make clean, you just remove the whole dir and start with an empty dir again. I'm not sure 'make distclean' helps, does it make any difference if you start again extracting the source tarbal into an empty dir and build in an empty dir? If not please provide your exact configure command (just ../gcc-4.6.0/configure?) and the error.
I continue to get the originally reported error: make[3]: Entering directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/host-x86_64-unknown-linux-gnu/gcc' build/genhooks \ ../.././gcc/doc/tm.texi.in > tmp-tm.texi (null): No place specified to document hook TARGET_ASM_OPEN_PAREN make[3]: *** [s-tm-texi] Error 1 make[3]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/host-x86_64-unknown-linux-gnu/gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0' make: *** [all] Error 2 That's even with unpacking the source in an empty dir. Maybe there's something wrong with the packaging of the source?
(In reply to comment #6) > I continue to get the originally reported error: It looks as though you continue to build in the source dir, but I can't know for sure as you didn't say how you're running configure. > make[3]: Entering directory > `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/host-x86_64-unknown-linux-gnu/gcc' > build/genhooks \ > ../.././gcc/doc/tm.texi.in > tmp-tm.texi > (null): No place specified to document hook TARGET_ASM_OPEN_PAREN > > make[3]: *** [s-tm-texi] Error 1 > make[3]: Leaving directory > `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/host-x86_64-unknown-linux-gnu/gcc' > make[2]: *** [all-stage1-gcc] Error 2 > make[2]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0' > make[1]: *** [stage1-bubble] Error 2 > make[1]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0' > make: *** [all] Error 2 > > That's even with unpacking the source in an empty dir. > > Maybe there's something wrong with the packaging of the source? It works for everyone else.
(In reply to comment #7) > > > > Maybe there's something wrong with the packaging of the source? > > It works for everyone else. Actually maybe that's not true, you're not using the official sources, I have no idea what's in the Debian package.
(In reply to comment #7) > (In reply to comment #6) > > I continue to get the originally reported error: > > It looks as though you continue to build in the source dir, but I can't know > for sure as you didn't say how you're running configure. ../gcc-4.6.0/configure with_gmp_lib=/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/gmp-5.0.1/.libs with_mpfr_lib=/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/mpfr-3.0.0/.libs with_mpc_lib=/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/mpc-0.8.2/src/.libs > > > make[3]: Entering directory > > `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/host-x86_64-unknown-linux-gnu/gcc' > > build/genhooks \ > > ../.././gcc/doc/tm.texi.in > tmp-tm.texi > > (null): No place specified to document hook TARGET_ASM_OPEN_PAREN > > > > make[3]: *** [s-tm-texi] Error 1 > > make[3]: Leaving directory > > `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0/host-x86_64-unknown-linux-gnu/gcc' > > make[2]: *** [all-stage1-gcc] Error 2 > > make[2]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0' > > make[1]: *** [stage1-bubble] Error 2 > > make[1]: Leaving directory `/usr/src/gcc-4.6-4.6.0.orig/gcc-4.6.0' > > make: *** [all] Error 2 > > > > That's even with unpacking the source in an empty dir. > > > > Maybe there's something wrong with the packaging of the source? > > It works for everyone else.
(In reply to comment #9) > (In reply to comment #7) > > (In reply to comment #6) > > > I continue to get the originally reported error: > > > > It looks as though you continue to build in the source dir, but I can't know > > for sure as you didn't say how you're running configure. > > ../gcc-4.6.0/configure which is the directory you're building in too, right? i.e. the same as ./configure So you're still building in the source directory. You need TWO directories, one for the sources, and one you build in. And why are you using with_xxx_lib instead of using --with-gmp ? Try the makefile at http://advogato.org/person/redi/diary/229.html which will do it all for you correctly: make -f config-gcc.mk GCC_VERSION=4.6.0 GMP_VERSION=5.0.1
(In reply to comment #10) > (In reply to comment #9) > > (In reply to comment #7) > > > (In reply to comment #6) > > > > I continue to get the originally reported error: > > > > > > It looks as though you continue to build in the source dir, but I can't know > > > for sure as you didn't say how you're running configure. > > > > ../gcc-4.6.0/configure > > which is the directory you're building in too, right? > i.e. the same as ./configure > So you're still building in the source directory. NO!! gcc-4.6-4.6.0.orig/gcc-4.6.0 contains the source gcc-4.6-4.6.0.orig/build is the build directory > > You need TWO directories, one for the sources, and one you build in. > > And why are you using with_xxx_lib instead of using --with-gmp ? What's the difference? > > Try the makefile at http://advogato.org/person/redi/diary/229.html which will > do it all for you correctly: > make -f config-gcc.mk GCC_VERSION=4.6.0 GMP_VERSION=5.0.1 I am making progress. I downloaded the 3/25 snapshot from one of the mirrors and I'm not getting the "texi" error any more. It appears there is something amiss with the Debian packaging. However, now I get the "cannot compute suffix of object files" error. Hopefully that will go away by use of your advogato recommendation. Sigh. Why is this so convoluted?
(In reply to comment #11) > (In reply to comment #10) > > (In reply to comment #9) > > > (In reply to comment #7) > > > > (In reply to comment #6) > > > > > I continue to get the originally reported error: > > > > > > > > It looks as though you continue to build in the source dir, but I can't know > > > > for sure as you didn't say how you're running configure. > > > > > > ../gcc-4.6.0/configure > > > > which is the directory you're building in too, right? > > i.e. the same as ./configure > > So you're still building in the source directory. > > NO!! > gcc-4.6-4.6.0.orig/gcc-4.6.0 contains the source > gcc-4.6-4.6.0.orig/build is the build directory But the error you're getting shows you are in the gcc-4.6.0 directory. > > You need TWO directories, one for the sources, and one you build in. > > > > And why are you using with_xxx_lib instead of using --with-gmp ? > > What's the difference? One is the documented, supported way to build gcc, one isn't. > > Try the makefile at http://advogato.org/person/redi/diary/229.html which will > > do it all for you correctly: > > make -f config-gcc.mk GCC_VERSION=4.6.0 GMP_VERSION=5.0.1 > > I am making progress. I downloaded the 3/25 snapshot from one of the mirrors > and I'm not getting the "texi" error any more. It appears there is something > amiss with the Debian packaging. However, now I get the "cannot compute suffix > of object files" error. Hopefully that will go away by use of your advogato > recommendation. Sigh. Why is this so convoluted? http://gcc.gnu.org/wiki/FAQ#configure_suffix Yes, if you use my config-gcc.mk makefile that won't be a problem.
The docs for --with-gmp also point out you might need to use LD_LIBRARY_PATH so the gmp/mpfr/mpc libs will be found, which is the cause of the "cannot compute suffix" error, but I assume you didn't read those docs since you're not using --with-gmp I have no idea how you'll get the installed gcc to find those shared libs if you haven't bothered to install them and are giving the path to the build dir as with_gmp_lib, you're pretty much on your own if you don't want to follow the installation instructions. That's why you're finding it convoluted. I suggest just using my config-gcc.mk instead
what my makefile does is put the gmp sources in the gcc tree as gcc-4.6.0/gmp (not as gcc-4.6.0/gmp-5.0.1 as you seem to have it) and similarly for mpfr and mpc. Then just configure gcc, it will detect and build the prerequisite libs, and link to them statically. You seem to have put the source under the gcc tree, then built them there yourself? I don't think that will work.
(In reply to comment #13) > The docs for --with-gmp also point out you might need to use LD_LIBRARY_PATH so > the gmp/mpfr/mpc libs will be found, which is the cause of the "cannot compute > suffix" error, but I assume you didn't read those docs since you're not using > --with-gmp > > I have no idea how you'll get the installed gcc to find those shared libs if > you haven't bothered to install them and are giving the path to the build dir > as with_gmp_lib, you're pretty much on your own if you don't want to follow the > installation instructions. That's why you're finding it convoluted. > > I suggest just using my config-gcc.mk instead That doesn't work neither: make -f config-gcc.mk GCC_VERSION=4.6.0 GMP_VERSION=5.0.1 ln -s ../mpfr-3.0.0 gcc-4.6.0/mpfr ln -s ../mpc-0.8.2 gcc-4.6.0/mpc curl -O http://www.mpfr.org/mpfr-current/mpfr-3.0.0.tar.gz curl: (7) couldn't connect to host make: *** [mpfr-3.0.0.tar.gz] Error 7
you can tell it to use local copies of the files if you've already downloaded them, look at the LOCAL_SRC variable
(In reply to comment #16) > you can tell it to use local copies of the files if you've already downloaded > them, look at the LOCAL_SRC variable Thanks for your help. Your recommendation almost works (at least it got further than previous attempts). Since you claim it does everything for me (which presumably spares me several days of reading) I'm afraid to report it must be flawed: make[5]: Entering directory `/usr/src/gcc/advogato/objdir-4.6.0/x86_64-unknown-linux-gnu/32/libgcc' # If this is the top-level multilib, build all the other # multilibs. /usr/src/gcc/advogato/objdir-4.6.0/./gcc/xgcc -B/usr/src/gcc/advogato/objdir-4.6.0/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -g -O2 -m32 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../../.././gcc -I../../../../gcc-4.6.0/libgcc -I../../../../gcc-4.6.0/libgcc/. -I../../../../gcc-4.6.0/libgcc/../gcc -I../../../../gcc-4.6.0/libgcc/../include -I../../../../gcc-4.6.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../../gcc-4.6.0/libgcc/../gcc/libgcc2.c \ -fvisibility=hidden -DHIDE_EXPORTS In file included from /usr/include/features.h:378:0, from /usr/include/stdio.h:28, from ../../../../gcc-4.6.0/libgcc/../gcc/tsystem.h:87, from ../../../../gcc-4.6.0/libgcc/../gcc/libgcc2.c:29: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory compilation terminated. make[5]: *** [_muldi3.o] Error 1 make[5]: Leaving directory `/usr/src/gcc/advogato/objdir-4.6.0/x86_64-unknown-linux-gnu/32/libgcc' make[4]: *** [multi-do] Error 1 make[4]: Leaving directory `/usr/src/gcc/advogato/objdir-4.6.0/x86_64-unknown-linux-gnu/libgcc' make[3]: *** [all-multi] Error 2 make[3]: Leaving directory `/usr/src/gcc/advogato/objdir-4.6.0/x86_64-unknown-linux-gnu/libgcc' make[2]: *** [all-stage1-target-libgcc] Error 2 make[2]: Leaving directory `/usr/src/gcc/advogato/objdir-4.6.0' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/usr/src/gcc/advogato/objdir-4.6.0' make: *** [all] Error 2 make: Leaving directory `/usr/src/gcc/advogato/objdir-4.6.0' And why is it trying to build a 32 bit version when my architecture is obviously 64 bit??
because x86_64 builds a multilib compiler by default, which is what most people want. use CONFIGARGS=--disable-multilib if you don't want that, or install the 32buig glibc headers and libs if you want a compiler that can produce 32bit or 64bit output I think you should continue this on the gcc-help mailing list, there's no gcc bug here
(In reply to comment #18) > because x86_64 builds a multilib compiler by default, which is what most people > want. > > use CONFIGARGS=--disable-multilib if you don't want that, or install the 32buig > glibc headers and libs if you want a compiler that can produce 32bit or 64bit > output > > I think you should continue this on the gcc-help mailing list, there's no gcc > bug here After installing the 32 bit headers it built cleanly. Thanks for your help. I'll let the Debian folks know that they need to give the packaging a look.