From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13848 invoked by alias); 16 Jun 2002 22:42:02 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 13809 invoked from network); 16 Jun 2002 22:41:58 -0000 Received: from unknown (HELO siaag1ac.compuserve.com) (149.174.40.5) by sources.redhat.com with SMTP; 16 Jun 2002 22:41:58 -0000 Received: (from mailgate@localhost) by siaag1ac.compuserve.com (8.9.3/8.9.3/SUN-1.14) id SAA09635; Sun, 16 Jun 2002 18:41:01 -0400 (EDT) Date: Sun, 16 Jun 2002 15:42:00 -0000 From: Mark Butcher Subject: Tutorial 3 To: gcc-help Cc: gcc Message-ID: <200206161840_MC3-1-294-7AE@compuserve.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline X-SW-Source: 2002-06/txt/msg00138.txt.bz2 Hi All Here an update of my weary journey from innocent and gullable PC user to hardened, grey-haired GCC cross-compiler guru. Actually the journey probably has not yet reached further than the end of the garden path and I must still be making some kind of beginners errors - but its hope that drives me on. So what have I learned ? 1. I downloaded GCC 3.1 (instead of 3.0.4) and tried again with the Mcore target. This time the 'sjlj' error had disappeared and the build reaches the same position as the ARM target attempt. 1.a. I assume that the Mcore target really does have a problem in 3.0.4 because I changed absolutely nothing except the compiler version. 2. So where is the build breaking now ? Still in the same place as before (same with Arm and Mcore target attempty), so here are the details again (as from ARM): Configuring in mcore-elf/libiberty loading cache ../config.cache checking whether to enable maintainer-specific portions of Makefiles... no checking for makeinfo... makeinfo checking for perl... perl checking host system type... mcore-unknown-elf checking build system type... i586-pc-cygwin checking for mcore-elf-ar... (cached) mcore-elf-ar checking for mcore-elf-ranlib... (cached) mcore-elf-ranlib checking for gcc... (cached) /usr/local/src/gnu/BUILD/gcc/gcc/xgcc -B/usr/local/src/gnu/BUILD/gcc/gcc/ -B/usr/local/mcore/mcore-elf/bin/ -B/usr/local/mcore/mcore-elf/lib/ -isystem /usr/local/mcore/mcore-elf/include checking whether we are using GNU C... (cached) yes checking whether /usr/local/src/gnu/BUILD/gcc/gcc/xgcc -B/usr/local/src/gnu/BUILD/gcc/gcc/ -B/usr/local/mcore/mcore-elf/bin/ -B/usr/local/mcore/mcore-elf/lib/ -isystem /usr/local/mcore/mcore-elf/include accepts -g... (cached) yes checking for POSIXized ISC... no checking for working const... yes checking for inline... inline checking for a BSD compatible install... (cached) /usr/bin/install -c checking how to run the C preprocessor... (cached) /lib/cpp checking for sys/file.h... grep: conftest.out: No such file or directory yes checking for sys/param.h... grep: conftest.out: No such file or directory yes checking for limits.h... grep: conftest.out: No such file or directory yes checking for stdlib.h... grep: conftest.out: No such file or directory yes checking for string.h... grep: conftest.out: No such file or directory yes checking for unistd.h... grep: conftest.out: No such file or directory yes checking for strings.h... grep: conftest.out: No such file or directory yes checking for sys/time.h... grep: conftest.out: No such file or directory yes checking for time.h... grep: conftest.out: No such file or directory yes checking for sys/resource.h... grep: conftest.out: No such file or directory yes checking for sys/stat.h... grep: conftest.out: No such file or directory yes checking for sys/mman.h... grep: conftest.out: No such file or directory yes checking for fcntl.h... grep: conftest.out: No such file or directory yes checking for alloca.h... grep: conftest.out: No such file or directory yes checking for sys/wait.h that is POSIX.1 compatible... no checking whether time.h and sys/time.h may both be included... no checking whether errno must be declared... yes checking for ANSI C header files... grep: conftest.out: No such file or directory no checking for uintptr_t... no checking whether the C compiler (/usr/local/src/gnu/BUILD/gcc/gcc/xgcc -B/usr/local/src/gnu/BUILD/gcc/gcc/ -B/usr/local/mcore/mcore-elf/bin/ -B/usr/local/mcore/mcore-elf/lib/ -isystem /usr/local/mcore/mcore-elf/include -g -O2 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. make: *** [configure-target-libiberty] Error 1 [The error is because the linker doesn't find "crt0.o"] So maybe some path is not set up correctly ? But this could mean more than one path since the missing header files are not all in one place - so I poked around looking at the log files and to my suprise realised that probably a whole bunch of other errors occured, which howver did not break the build. Here is a list of the config.log file I found on the computer, in order of their save time (starting with the oldest). gcc/libiberty/config.log gcc/gcc/config.log gcc/mcore-elf/big/libstdc++-v3/config.log gcc/mcore-elf/m210/libstdc++-v3/config.log gcc/mcore-elf/big/m210/libstdc++-v3/config.log gcc/mcore-elf/libstdc++-v3/config.log gcc/mcore-elf/libiberty/config.log The time between the first and last being about one hour (on slow laptop). (Does this run sequentially or can the flow be nested ?) Although the build broke in gcc/mcore-elf/libiberty I curiously checked out the content of the others and to my horror and suprise found that they were full of errors but none of them caused the build to stop, until for some reason the last one. The compiler seems to work until the linker is used. The linker never seems to be able to find any of the programs it should link. For example, the first error message was due to "asprintf()" not being linked. Then some more: basename() insque() mkstemps() sigsetmask() vasprintf() _doprnt() ... and on and on and on..., right through all library builds. But maybe it's normal that they all fail .. (some of) the libraries seems to exist and on a repeat of the build they are not repeatedly built. Perhaps they are supposed to fail and only then are they actually created (?). Well, for example asprint.o and a bunch of other library .o files are in gcc/libiberty (created some time around the beginning of the build attempt) but the files mcore-elf/big, mcore-elf/libiberty, mcore-elf/libstdc++-v3/.. are all pretty much empty. As for the missing header files, they are all in gcc-3.1 source directories (quite deep, like gcc-3.1/gcc/fixinc/tests/base/sys/..). In the build directory there are a number of headers (about 20), mainly in gcc/gcc and gcc/gcc/include and I am wondering where they should be at this point. Are they normally copied to the target directory or do they remain in the souce directory, and if so, how should they be found ? I think this has knocked me more or less back to square one and I can not get my head around it any more (it's getting too late again). Perhaps some of this may jog someones memory - " Ohh Yes, I remember now, it also took me .. months to work it out until I did ........" (please free to fill in the missing words). Cheers Mark in Switzerland