I checked out the CVS main branch today. cd gcc && ./configure && make fails with the error message: ./config.status: line 909: ./../../config-ml.in: No such file or directory make: *** [configure-zlib] Error 1 cd gcc && mkdir builddir && cd builddir && ../configure && make works just fine.
Really nobody builds inside the source directory.
(In reply to comment #1) > Really nobody builds inside the source directory. Great answer! Is there ANY bug where this doesn't apply? "Yawn, nobody does that anyway, go away". I think a better solution would be if the configure script printed an appropriate error message and then died.
no, what I meant is that nobody usually does it that way but we do support it and try to fix all the problems with it. And it is documented the recommended way to build in seperate directory so ...
touch stamp-picdir make[1]: *** No rule to make target `../include/ansidecl.h', needed by `regex.o'. Stop. make: *** [all-build-libiberty] Error 2 Confirmed.
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00968.html>.
*** Bug 18290 has been marked as a duplicate of this bug. ***
(In reply to comment #1) > Really nobody builds inside the source directory. How does one actually build the compiler, then? gcc/doc/install.texi simply says # @section Building a native compiler # # For a native build issue the command @samp{make bootstrap} which fails (as shown in this bug). INSTALL/README tells me the directory has been obsoleted, and README points me to the doc directory (where I can't find anything else relevant, but maybe that's just me).
Read: <http://gcc.gnu.org/install/configure.html> for how people actually install/build GCC.
Paolo's patch looks good to me. Paolo, would you please check it in?
Subject: Re: [4.0 Regression] Building in src dir fails aoliva at gcc dot gnu dot org wrote: > ------- Additional Comments From aoliva at gcc dot gnu dot org 2004-12-23 21:03 ------- > Paolo's patch looks good to me. Paolo, would you please check it in? Yes; will you please take a look at the comment at http://gcc.gnu.org/ml/gcc-patches/2004-10/msg01079.html ? Thanks, Paolo
Subject: Bug 17383 CVSROOT: /cvs/gcc Module name: gcc Changes by: bonzini@gcc.gnu.org 2004-12-28 17:40:41 Modified files: . : ChangeLog Makefile.def Makefile.in Makefile.tpl Log message: 2004-12-28 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/17383 * Makefile.def (target_modules): Remove stage parameter, it is always true now. * Makefile.tpl (configure-build-[+module+], configure-target-[+module+]): Always build symlink tree for the directory and for include. BUILD_SUBDIR and TARGET_SUBDIR cannot be . anymore. * Makefile.in: Regenerate. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.1040&r2=1.1041 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.def.diff?cvsroot=gcc&r1=1.43&r2=1.44 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.251&r2=1.252 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.tpl.diff?cvsroot=gcc&r1=1.121&r2=1.122
Patch applied.
Nope, my patch is not sufficient. I am testing a better fix, but I fear it is too invasive for 4.0. It is a variant of the often-proposed "build out of srcdir without telling the user" trick.
I have considered doing this in the truly parallel way: namely, introducing HOST_SUBDIR to go along with BUILD_SUBDIR and TARGET_SUBDIR. It requires mangling of '..'s in many subdirectories, which is why I haven't done it. But if it's done it allows some genuine, major simplifications.
Subject: Re: [4.0 Regression] Building in src dir fails > I have considered doing this in the truly parallel way: namely, introducing > HOST_SUBDIR to go along with BUILD_SUBDIR and TARGET_SUBDIR. I already have a patch for this queued for 4.1 and posted to gcc-patches. DJ however has a hackish fix that will go in once 4.0 branches. Paolo
Subject: Bug 17383 CVSROOT: /cvs/gcc Module name: gcc Changes by: bonzini@gcc.gnu.org 2005-02-28 13:26:36 Modified files: . : Makefile.def Makefile.in Makefile.tpl configure configure.in ChangeLog gcc : ChangeLog Makefile.in configure config : ChangeLog acx.m4 libjava : ChangeLog Makefile.in configure configure.ac libjava/external: Makefile.in libjava/external/sax: Makefile.in libjava/external/w3c_dom: Makefile.in libjava/gcj : Makefile.in libjava/include: Makefile.in libjava/testsuite: Makefile.in libada : ChangeLog Makefile.in libobjc : ChangeLog Makefile.in configure configure.ac Log message: 2005-05-25 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/17383 * Makefile.def (target_modules): Remove "stage", now unnecessary. * Makefile.tpl (HOST_SUBDIR): New substitution. (STAGE_HOST_EXPORTS, EXPECT, HOST_LIB_PATH, USUAL_AR_FOR_TARGET, USUAL_AS_FOR_TARGET, USUAL_DLLTOOL_FOR_TARGET, USUAL_GCC_FOR_TARGET, USUAL_LD_FOR_TARGET, USUAL_NM_FOR_TARGET, USUAL_OBJDUMP_FOR_TARGET, USUAL_RANLIB_FOR_TARGET, USUAL_WINDRES_FOR_TARGET): Use it. (Host modules, Bootstrapped modules): Use it. (Build modules, Target modules): Do not create symlink trees, always configure out-of-srcdir. (distclean): Try removing $(host_subdir) with rm before using rm -rf. * configure.in (FLAGS_FOR_TARGET, CC_FOR_TARGET, GCJ_FOR_TARGET, GFORTRAN_FOR_TARGET, CXX_FOR_TARGET, RAW_CXX_FOR_TARGET): Use $(HOST_SUBDIR). Create a symlink for host_subdir. * Makefile.in: Regenerate. * configure: Regenerate. config: 2005-05-25 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/17383 * config/acx.m4 (GCC_TOPLEV_SUBDIRS): Set HOST_SUBDIR if an in-src gcc build is going. gcc: 2005-05-25 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/17383 * gcc/Makefile.in (host_subdir): New. (build_objdir): New. Replace ../$(build_subdir) with it throughout. * gcc/configure: Regenerate. libada: 2005-05-25 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/17383 * Makefile.in (GCC_DIR): Add $(HOST_SUBDIR) to the definition. libjava: 2005-05-25 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/17383 * configure.ac: Call GCC_TOPLEV_SUBDIRS. (COMPPATH): Removed. (ZIP, GCJH): Replace it with ../$(host_subdir). (built_gcc_dir): Add $(host_subdir). * configure: Regenerate. * Makefile.in, include/Makefile.in, testsuite/Makefile.in, gcj/Makefile.in, external/Makefile.in, external/sax/Makefile.in, external/w3c_dom/Makefile.in: Regenerate. libobjc: 2005-05-25 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/17383 * configure.ac: Call GCC_TOPLEV_SUBDIRS. (Determine CFLAGS for gthread): Use $host_subdir. * configure: Regenerate. * Makefile.in (host_subdir): New. (INCLUDES): Use it. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.def.diff?cvsroot=gcc&r1=1.47&r2=1.48 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.255&r2=1.256 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/Makefile.tpl.diff?cvsroot=gcc&r1=1.124&r2=1.125 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.diff?cvsroot=gcc&r1=1.205&r2=1.206 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.in.diff?cvsroot=gcc&r1=1.342&r2=1.343 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.1058&r2=1.1059 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7608&r2=2.7609 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&r1=1.1448&r2=1.1449 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/configure.diff?cvsroot=gcc&r1=1.886&r2=1.887 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/config/ChangeLog.diff?cvsroot=gcc&r1=1.59&r2=1.60 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/config/acx.m4.diff?cvsroot=gcc&r1=1.10&r2=1.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3391&r2=1.3392 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/Makefile.in.diff?cvsroot=gcc&r1=1.485&r2=1.486 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/configure.diff?cvsroot=gcc&r1=1.253&r2=1.254 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/configure.ac.diff?cvsroot=gcc&r1=1.19&r2=1.20 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/external/Makefile.in.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/external/sax/Makefile.in.diff?cvsroot=gcc&r1=1.2&r2=1.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/external/w3c_dom/Makefile.in.diff?cvsroot=gcc&r1=1.2&r2=1.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/gcj/Makefile.in.diff?cvsroot=gcc&r1=1.62&r2=1.63 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/include/Makefile.in.diff?cvsroot=gcc&r1=1.64&r2=1.65 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/testsuite/Makefile.in.diff?cvsroot=gcc&r1=1.73&r2=1.74 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libada/ChangeLog.diff?cvsroot=gcc&r1=1.13&r2=1.14 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libada/Makefile.in.diff?cvsroot=gcc&r1=1.9&r2=1.10 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libobjc/ChangeLog.diff?cvsroot=gcc&r1=1.157&r2=1.158 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libobjc/Makefile.in.diff?cvsroot=gcc&r1=1.44&r2=1.45 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libobjc/configure.diff?cvsroot=gcc&r1=1.56&r2=1.57 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libobjc/configure.ac.diff?cvsroot=gcc&r1=1.12&r2=1.13
Fixed on mainline. As I said in comment #15, DJ has patches for the 4.0 branch, so I am assigning it to him.
*** Bug 20500 has been marked as a duplicate of this bug. ***
DJ, any update on fixing this on the 4.0 branch?
*** Bug 21158 has been marked as a duplicate of this bug. ***
*** Bug 21176 has been marked as a duplicate of this bug. ***
*** Bug 21186 has been marked as a duplicate of this bug. ***
*** Bug 21187 has been marked as a duplicate of this bug. ***
*** Bug 21431 has been marked as a duplicate of this bug. ***
I'm used ./configure --prefix=/usr I've the make error : (...) updating cache ./config.cache configure: creating ./config.status config.status: creating Makefile config.status: executing default-1 commands ./config.status: line 910: ./../../config-ml.in: No such file or directory make: *** [configure-zlib] Erreur 1
Subject: Bug 17383 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: echristo@gcc.gnu.org 2005-06-22 20:42:06 Modified files: . : ChangeLog configure.in configure Log message: 2005-06-22 Eric Christopher <echristo@redhat.com> PR bootstrap/17383 * configure.in: Reject building in the source directory. * configure: Regenerate. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1057.2.15&r2=1.1057.2.16 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.in.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.341.2.4&r2=1.341.2.5 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/configure.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.204.2.5&r2=1.204.2.6
*** Bug 22193 has been marked as a duplicate of this bug. ***
We're not going to support building 4.0 in the source directory. Closing.