[SOLVED] Problem building gcc on solaris9: no rule to make target "all" in gcc-objects/gcc

Paul Duquennoy paul.duquennoy@wanadoo.fr
Tue Feb 5 18:01:00 GMT 2008


Hello,

On Jan 27, I was desperate and I wrote:

> Hello,
>
> I am trying to compile gcc on a Solaris 9 machine. I configure gcc  
> with the following script :
>
> ../../gcc-4.2.2/configure \
>        --prefix=/usr/local/sparc-solaris9-32 \
>        --with-gnu-as \
>        --with-gnu-ld \
>        --with-as=/usr/local/sparc-solaris9-32/bin/as \
>        --with-ld=/usr/local/sparc-solaris9-32/bin/ld \
>        --enable-languages="c,c++,ada" \
>        --with-gmp=/usr/local/sparc-solaris9-32 \
>        --with-mpfr=/usr/local/sparc-solaris9-32
>
> I compiled and installed  binutils-2.18.50, gmp 4.2.1, mpfr-2.2.0.
> The current version of gcc (the one I use to compile) is 4.2.0
>
> Configure runs fine. The I do "make" and everything works fine until  
> it enters the 'gcc' directory. Then it fails because there is no  
> Makefile in it.
>
> The content of gcc/ is :
>
> -rw-r--r--   1 paul     staff          0 janv 27 14:21 config.cache
> -rw-r--r--   1 paul     staff     248871 janv 27 14:22 config.log
> -rw-r--r--   1 paul     staff        522 janv 27 14:22 configargs.h
> -rwxr-xr-x   1 paul     staff     508808 janv 27 14:21  
> configure.lineno
> -rw-r--r--   1 paul     staff         24 janv 27 14:22 gthr-default.h
>
>
> I do not understand why the Makefile in 'gcc' is not generated. So I  
> need help, and I thank in advance those who will spend their time to  
> help me.
>

Eventualy, after some days of search, I found the problem.

I compiled binutils (I had to do so since Solaris ld had alignment  
problems).

Using these binutils, "as --version" replies :

Assembleur GNU (GNU Binutils) 2.18.50.20071204
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms  
of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
Cet assembleur a ?t? configur? pour la cible ? sparc-sun-solaris2.9 ?.

How did I generate this message in French ? I do not know! But this is  
the source of the problem

When gcc/configure runs, it checks this version to see if it is >  
2.11. It does that at line 14023. In the following lines, it tries to  
extract the version.

at line 14025, we get as_ver=Assembleur GNU (GNU Binutils)  
2.18.50.20071204
then as_major: Assembleur GNU (GNU Binutils) 2
and as_minor:  18

At line 14028, there is an error: test: too many arguments

so gcc/configure aborts ; the Makefile is not generates. The "make"  
continues its processing (so the message disapears in a lot of output).

I modified a little my gcc/configure so that it parses correctly the  
major version (but that is a quick and very very dirty fix).

I hope this will help some others...

Paul



More information about the Gcc-help mailing list