http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48621

           Summary: Can't install gcc because Ada doctool installation
                    process uses wrong gcc, thus producing incompatible
                    ALI file
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: ada
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bauh...@futureapps.de


When running
# make install
after running
$ make check (successfully),

the installation process stops, and importantly,
before having installed /usr/local/bin/gcc,
at:

make[3]: Entering directory `/opt/build/gcc'
mkdir -p ada/doctools
cp -p ../../src/gcc/ada/xgnatugn.adb ada/doctools
cd ada/doctools && gnatmake -q xgnatugn
gnatmake: "xgnatugn.ali" incompatible ALI file, please recompile
gnatmake: "xgnatugn.adb" compilation error

Indeed,
$ head -1 xgnatugn.ali 
will show GNAT Lib v4.4, not v4.6.

My guess is that the above step is effectively assuming that
a compatible (new) gcc is called, in effect the one /usr/bin---but
the new gcc isn't installed until the installation of gcc has succeeded
(into /usr/local). The gcc/xgcc does not seem to be used, either.
Catch 22.

A workaround seems to be to

# make -k install   # after which -e /usr/local/bin/gcc
# rm gcc/ada/doctools/xgnatugn.ali
# make install

Hints:

# make -n gcc/ada/doctools/xgnatugn
gcc   gcc/ada/doctools/xgnatugn.o   -o gcc/ada/doctools/xgnatugn

# CC=gcc/xgcc make -e -n gcc/ada/doctools/xgnatugn
gcc/xgcc   gcc/ada/doctools/xgnatugn.o   -o gcc/ada/doctools/xgnatugn

# cd gcc
# CC=./xgcc make -e -n ada/doctools/xgnatugn
mkdir -p ada/doctools
cp -p ../../src/gcc/ada/xgnatugn.adb ada/doctools
cd ada/doctools && gnatmake -q xgnatugn

I saw CC = cc ; COMPILER = $(CC) in ada/Makefile.
Is GNAT's make process such that is assumes a
compatible GNAT already installed when compiling
ada/doctools/xgnatugn?

After installation as per the workaround above,

$  /usr/local/bin/gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.7.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../src/configure --enable-languages=c,ada --disable-nls
Thread model: posix
gcc version 4.7.0 20110411 (experimental) (GCC)

Reply via email to