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

            Bug ID: 57606
           Summary: Failure in testing stage 3 of gcc-4.7.2
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ExtraLeveLInSoftware at ntlworld dot com

1 Introduction

    Trying to test recently built gcc-4.7.2.

    Running Mac OS X:

 System Version:    Mac OS X 10.5.8 (9L30)
 Kernel Version:    Darwin 9.8.0
 >uname -mpv
 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009;
root:xnu-1228.15.4~1/RELEASE_I386 i386 i386

    This bug report concerns the following point.

  - An error reported by make testing stage 3, concerning ada acats

    Background information about the state of the build is given.  Further
information about the reason for the failure had been determined, with the
effect of circumventing the problem.  See also "Summary of Bug" below for the
actual reason for the problem.


2 Report from configure etc.

    The existing compilation system for stage 1 was obtained as a
ready built version of ada-4.3 in /usr/local/ada-4.3/bin/ (however, it
reports that it is 4.4.0)

bash> gcc --version
gcc (GCC) 4.4.0 20080314 (experimental) [trunk revision 133226]
Copyright (C) 2008 Free Software Foundation, Inc.

    Building in /Gnu/gcc/obj.  Sources in /Gnu/gcc/src/gcc-4.7.2/.

    The configure command was
../src/gcc-4.7.2/gcc-4.7.2/configure --enable-languages=ada,c,c++ 

    This completed OK.


3 An error reported by make check

    Ran in /Gnu/gcc/obj/:
make -k check &> ../logs/makechk-1.log

    The make check failed, with messages described below.
First few lines of makechk-1log:
autogen -T ../../src/gcc-4.7.2/fixincludes/check.tpl
../../src/gcc-4.7.2/fixincludes/inclhack.def
make[2]: autogen: Command not found
make[2]: *** [check] Error 127
make[1]: *** [check-fixincludes] Error 2

Last few lines of makechk-1log:
make[3]: Target `check-am' not remade because of errors.
make[2]: *** [check-recursive] Error 1
make[2]: Target `check' not remade because of errors.
make[1]: *** [check-target-libitm] Error 2
make[1]: Target `check-target' not remade because of errors.
make: *** [do-check] Error 2
make: Target `check' not remade because of errors.

    The log has quite a lot of Errors, but there are many passes in various
sections.  As suggested, many failures involve libitm (see Information about
the
build state below).
        === libitm Summary ===

# of expected passes        1
# of unexpected failures    14
# of unresolved testcases    14
# of unsupported tests        1

    In the gnat tests, the summary has:
# of expected passes        1109
# of expected failures        14
# of unsupported tests        4

    But in the ada acats.log there are many messages:
i686-apple-darwin9-gcc-4.0.1: language ada not recognized
and nothing was compiled.  Final message:
**** Failed to compile macrosub
this was also in the .sum file.

    The makechk-1.log for acats has:
        === acats support ===
Generating support files...fatal error, run-time library not installed
correctly
cannot locate file system.ads
gnatmake: *** make failed.
**** Failed to compile macrosub

    Note that "gcc version 4.0.1 (Apple Inc. build 5465)" is /usr/bin/gcc
(which does not support Ada).  These tests are supposed to be using the just
built stage 3 compiler.

    Thus the Ada acats testing has been totally omitted.

    The "Installing GCC" information indicates the need for Prerequisites:
"In order to build the Ada compiler (GNAT) you must already have GNAT installed
because portions of the Ada frontend are written in Ada".  However, there is
nothing to say that an existing Ada compiler is also needed for testing.

    Consequently, although /usr/local/ada-4.3/bin/ was made available in
the PATH used at build time, it was not added for testing.  It was assumed that
testing the as yet uninstalled compilation system would be self-contained.


4 Information about the build state

4.1    The build has passed stage 3, but failed later.

    Completed stage3, got to
"Comparing stages 2 and 3", gave:
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Comparison successful.

    It continued after this, but gave final error:
ld: warning in ../../../src/gcc-4.7.2/libitm/clearcap.map, file is not of
required architecture
ld: pointer in read-only segment not allowed in slidable image, used in
_del_opvnt from .libs/alloc_cpp.o
collect2: error: ld returned 1 exit status
make[4]: *** [libitm.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libitm] Error 2
make: *** [all] Error 2

    The current situation seems to be that I have built the entire stage 3,
but that the step "Build runtime libraries using the stage3 compiler from the
previous step." has failed.

    This has been discussed on the gcc-help mailing list (see:
13 May 2013 , Re: Ongoing Error in make stage2 building gcc-4.7.2)


On 13 May 2013, at 14:43, Ian Lance Taylor wrote:

It looks like the code is trying to use a linker map, which is not going to
work with the Darwin linker.  This looks like a bug in the libitm configury.
I don't see it in the current bug database; please consider filing a bug
report.


On 13 May 2013, at 15:43, Richard Henderson wrote:

That linker map is for Solaris.  I have no idea how that might have come to be
used for Darwin.

r~

    Bug 57292 "Failure in build after stage 3, concerning libitm.la" was
reported.

    This is not believed to be connected, but is stated just in case.
On 15 May 2013, Ian Lance Taylor said
    "It sounds like everything is working but libitm."
so testing was tried.


4.2    Other related Information

    In order to complete the stages 2 and 3 builds, it was necessary to
modify libcpp/config.h in both stages 2 and 3 to circumvent a problem in
libcpp/lex.c with "Unknown pseudo-op: .balign".  (Subject of a separate bug
report, Bug 57291.)

    This is not believed to be connected, but is stated just in case.


5 Investigation of Testing Problem

5.1 Use of Existing Host Ada Compiler

    It can be seen from the acats.log messages:
i686-apple-darwin9-gcc-4.0.1: language ada not recognized
that the testing has tried to compile Ada using the existing gcc compiler
(which does not support Ada).  Various test scripts were examined to establish
why this happened.

5.2 Test scripts

    In /Gnu/gcc/src/gcc-4.7.2/gcc/testsuite/ada/acats/ there are scripts
run_all.sh and run_acats.  These produce and use scripts in directory
/Gnu/gcc/obj/gcc/testsuite/ada/acats/ host_gnatmake and host_gnatchop.  These
are produced using "type -p", and further processing to make a shell script.

    After the failure, they contained:
#!/bin/sh
PATH=:$PATH
unset ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_EXEC_PREFIX
export PATH
exec gnatmake "$@"

with the last line for host_gnatchop changing to:
exec gnatchop "$@"

    In run_all.sh it states:
# These tools are used to preprocess some ACATS sources
# they need to be compiled native on the host.

so the testing uses the host compiler to adapt the sources - presumably not
the compiler under test in case it is not the host.

    Script host_gnatmake (not host_gnatchop) seems to be what has tried to
use the Apple gcc.  The generation of the commands in run_acats is faulty if
there is no available host gnat.  The directory name it tries to extract
using dirname from $host_gnatmake (obtained through type -p) is empty, so this
has failed to prefix a directory name to PATH - this will use the current
directory, preceding the default paths.

    It is not clear (not knowing what the current directory is) how this:
  -    finds a gnatmake or gnatchop at all
  -    and how this ends up calling /usr/bin/gcc

Presumably this calls the new stage3 gnatmake, but this in turn must be using
the native gcc.

5.3 Completion of test

    The above suggests that testing would be improved by making the old Ada
compiler available as for stage1.

    With /usr/local/ada-4.3/bin/ in PATH ran in obj/:
make -k check-ada &> ../logs/makechk-2.log

    This completed OK.  The end of acats.sum and acats.log is:
        === acats Summary ===
# of expected passes        2320
# of unexpected failures    0
/Gnu/gcc/src/gcc-4.7.2/gcc/testsuite/ada/acats/run_all.sh completed at Thu Jun
13 12:58:32 BST 2013

    The summary for gnat tests is as before:
        === gnat Summary ===

# of expected passes        1109
# of expected failures        14
# of unsupported tests        4
/Gnu/gcc/obj/gcc/gnatmake version 4.7.2


6 Summary of Bugs

6.1 Error in testing

    Following stage three, the Ada acats testing has been totally omitted:
gnatmake: *** make failed.
**** Failed to compile macrosub

    See also extra messages above.

    The Ada part of the testing of this host compilation system has tried
to utilise an existing (native) Ada compiler, as if it must avoid the software
under test (just as if it was a target version).


6.3 Effective Bugs

  -    Host testing of the stage 3 build should not require an existing Ada
    compiler, without this being stated in the "Installing GCC" information,
    under Testing.

  -    Where the build being tested is for the host, not a different target,
    then the tools used to preprocess ACATS sources could use the same Ada
    compiler that is being tested.

  -    In case the existing Ada compiler has not been made visible, the test
    scripts should be resilient, and not generate incorrect PATH values.
    Also, they should confirm whether or not the suitable Ada compiler is
    present.


6.2 Extra Information

    If extra information about the matters reported above would be of value
please contact:

    ExtraLeveLInSoftware at ntlworld dot com

Ellis N. Thomas/13-Jun-2013

Reply via email to