Install gcc

Jonathan Wakely jwakely.gcc@gmail.com
Fri Mar 6 12:08:00 GMT 2020


On Fri, 6 Mar 2020 at 11:49, yilu@bupt.edu.cn <yilu@bupt.edu.cn> wrote:
>
> Hi, everybody.
> I'm trying install gcc, with command:
>
> ./gcc/configure --prefix=/gccobj --disable-checking --enable-languages=all --disable-multilib --disable-bootstrap --with-gmp=/gmp --with-mpfr==/mpfr --with-mpc==/mpc

This is a really really bad idea. The build will create a
sub-directory called 'gcc' which is the directory where you have the
source tree.

https://gcc.gnu.org/install/configure.html says
"First, we **highly** recommend that GCC be built into a separate
directory from the sources which does **not** reside within the source
tree."

> (I've installed mpfr,mpc,gmp in the corresponding directory)

My recommendation is that you don't do that either.
See https://gcc.gnu.org/wiki/InstallingGCC


> and I got this two information after a lot of checkings:
>
> configure: creating ./config.status
> config.status: creating Makefile
>
> and then I try the command
>
> make -j4
>
> and I got
>
> make[1]: Leaving directory '/root'
> Makefile:959: recipe for target 'all' failed
> make: *** [all] Error 2

This is completely usleless information. The error happened much
earlier but you've just shown the very end of the output which says
"there was an error">

>
> I searched for FAQ, but cannot find an approach. What can I do in this situation?

See https://gcc.gnu.org/wiki/InstallingGCC



More information about the Gcc-help mailing list