From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13674 invoked by alias); 20 Oct 2005 17:12:19 -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 13654 invoked by uid 22791); 20 Oct 2005 17:12:16 -0000 Received: from svr41.ehostpros.com (HELO svr41.ehostpros.com) (69.57.140.72) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 20 Oct 2005 17:12:16 +0000 Received: from madesm41 by svr41.ehostpros.com with local (Exim 4.52) id 1ESdxg-0006W9-Ur for gcc-help@gcc.gnu.org; Thu, 20 Oct 2005 10:12:17 -0700 From: "Josep Sabater" To: gcc-help@gcc.gnu.org Subject: Can't build m68k-elf target with gcc-3.4.3 and newlib-1.13.0 (clock_t conflict) X-IPAddress: 80.25.13.241 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Message-Id: Date: Thu, 20 Oct 2005 17:12:00 -0000 X-SW-Source: 2005-10/txt/msg00118.txt.bz2 Hello All: I am writing because I am trying to build a toolchain (using gcc-3.4.3 and newlib-1.13.0) for a Coldfire and I am experimenting some problems with 'clock_t' definition. Let me explain the scenario: 1) I have previously unzip newlib src and gcc src into the following dirs: /home/jsabater/newlib-1.13.0 /home/jsabater/gcc-3.4.3 2) And added a link to newlib src in gcc dir, to have newlib installed with gcc, as follows: cd xxx/gcc-3.4.3 mkdir newlib ln -sf ../newlib-1.13.0/newlib newlib 3) After that, I am running gcc configure as follows: ${GCC_SOURCE_PATH}/configure --target=m68k-elf \ --prefix=$PREFIX --with-newlib --enable-languages=c,c++ \ --with-gnu-ld --with-gnu-as --disable-threads 4) And my latest attemps ends as follows: Making all in search make[7]: Entering directory `/home/jsabater/build-gcc/m68k-elf/m68000/newlib/lib c/search' /home/jsabater/build-gcc/gcc/xgcc -B/home/jsabater/build-gcc/gcc/ -nostdinc -B/h ome/jsabater/build-gcc/m68k-elf/m68000/newlib/ -isystem /home/jsabater/build-gcc /m68k-elf/m68000/newlib/targ-include -isystem /home/jsabater/gcc-3.4.3/newlib/li bc/include -B/usr/local/m68k-elf/m68k-elf/bin/ -B/usr/local/m68k-elf/m68k-elf/li b/ -isystem /usr/local/m68k-elf/m68k-elf/include -isystem /usr/local/m68k-elf/m6 8k-elf/sys-include -m68000 -DPACKAGE=\"newlib\" -DVERSION=\"1.13.0\" -I. -I../ ../../../../../gcc-3.4.3/newlib/libc/search -O2 -DCOMPACT_CTYPE -DMISSING_SYSCA LL_NAMES -fno-builtin -O2 -g -O2 -O2 -g -O2 -m68000 -c ../../../../../../gc c-3.4.3/newlib/libc/search/bsearch.c /home/jsabater/build-gcc/gcc/xgcc -B/home/jsabater/build-gcc/gcc/ -nostdinc -B/h ome/jsabater/build-gcc/m68k-elf/m68000/newlib/ -isystem /home/jsabater/build-gcc /m68k-elf/m68000/newlib/targ-include -isystem /home/jsabater/gcc-3.4.3/newlib/li bc/include -B/usr/local/m68k-elf/m68k-elf/bin/ -B/usr/local/m68k-elf/m68k-elf/li b/ -isystem /usr/local/m68k-elf/m68k-elf/include -isystem /usr/local/m68k-elf/m6 8k-elf/sys-include -m68000 -DPACKAGE=\"newlib\" -DVERSION=\"1.13.0\" -I. -I../ ../../../../../gcc-3.4.3/newlib/libc/search -O2 -DCOMPACT_CTYPE -DMISSING_SYSCA LL_NAMES -fno-builtin -O2 -g -O2 -O2 -g -O2 -m68000 -c ../../../../../../gc c-3.4.3/newlib/libc/search/qsort.c /home/jsabater/build-gcc/gcc/xgcc -B/home/jsabater/build-gcc/gcc/ -nostdinc -B/h ome/jsabater/build-gcc/m68k-elf/m68000/newlib/ -isystem /home/jsabater/build-gcc /m68k-elf/m68000/newlib/targ-include -isystem /home/jsabater/gcc-3.4.3/newlib/li bc/include -B/usr/local/m68k-elf/m68k-elf/bin/ -B/usr/local/m68k-elf/m68k-elf/li b/ -isystem /usr/local/m68k-elf/m68k-elf/include -isystem /usr/local/m68k-elf/m6 8k-elf/sys-include -m68000 -DPACKAGE=\"newlib\" -DVERSION=\"1.13.0\" -I. -I../ ../../../../../gcc-3.4.3/newlib/libc/search -O2 -DCOMPACT_CTYPE -DMISSING_SYSCA LL_NAMES -fno-builtin -O2 -g -O2 -O2 -g -O2 -m68000 -c ../../../../../../gc c-3.4.3/newlib/libc/search/hash.c In file included from /home/jsabater/gcc-3.4.3/newlib/libc/include/sys/stat.h:9, from ../../../../../../gcc-3.4.3/newlib/libc/search/hash.c:44: /home/jsabater/build-gcc/gcc/include/time.h:12: error: conflicting types for 'clock_t'/home/jsabater/gcc-3.4.3/newlib/libc/include/sys/types.h:90: error: previous declaration of 'clock_t' was here make[7]: *** [hash.o] Error 1 make[7]: Leaving directory `/home/jsabater/build-gcc/m68k-elf/m68000/newlib/libc /search' make[6]: *** [all-recursive] Error 1 make[6]: Leaving directory `/home/jsabater/build-gcc/m68k-elf/m68000/newlib/libc ' make[5]: *** [all-recursive] Error 1 make[5]: Leaving directory `/home/jsabater/build-gcc/m68k-elf/m68000/newlib' make[4]: *** [all-recursive-am] Error 2 make[4]: Leaving directory `/home/jsabater/build-gcc/m68k-elf/m68000/newlib' make[3]: *** [multi-do] Error 1 make[3]: Leaving directory `/home/jsabater/build-gcc/m68k-elf/newlib' make[2]: *** [all-multi] Error 2 make[2]: Leaving directory `/home/jsabater/build-gcc/m68k-elf/newlib' make[1]: *** [all-recursive-am] Error 2 make[1]: Leaving directory `/home/jsabater/build-gcc/m68k-elf/newlib' make: *** [all-target-newlib] Error 2 If I open those conflicting files I got for "/home/jsabater/gcc-3.4.3/newlib/libc/include/sys/types.h" the following definition: #ifndef __clock_t_defined typedef _CLOCK_T_ clock_t; #define __clock_t_defined #endif and for "/home/jsabater/build-gcc/gcc/include/time.h": /* Fake time.h, created by GCC. The functions declared in this file do not necessarily exist in your C library. */ #ifndef __time_h #define __time_h #define __need_NULL #define __need_size_t #include typedef long time_t; typedef long clock_t; struct tm; Has any of you any idea about what I am doing wrong? What is more, do you know how to get the whole thing working? I really appreciate your help. If you need additional details, please,let me know. Thank you very much in advance. Josep Sabater. P.S: I have made an alternative attemp, building first a bootstrap compiler, then compiling the newlib (no problems at all here) and finally building the complete cross compiler obtaining the same conflict. :-( ----------------------------------- Josep Sabater