-----Original Message----- From: Joshua Wigginton Sent: Friday, October 01, 2004 6:33 PM To: 'gcc-help@xxxxxxxxxxx'; 'jeff@xxxxxxxx' Cc: 'ksseol@xxxxxxxxxxxx' Subject: Problems making GCC 2.95.2 Hello: I am currently attempting to cross-compile Binutils 2.10.0.24, GCC 2.95.2 patch w/ diff-991022, and GLIBC2 2.1.3 for arm-linux. Following guide from http://www.mock.com/receiver/tools/ (to be more exact the modified version from www.phototainer.com with very slight differences) Any help and assistance in helping me resolve this would be greatly appreciated. I have been stumped on this for quite some time, try different configures, etc. I hoping this is a common problem and that it can easily be fixed. Thanks for your time and patience. Josh Wigginton SmartDisk Corporation Only differences in jeff mocks version and the version I'm trying to run are: Kernel 2.4.19 rmk 6 Binutils 2.10.0.24 Make config kernel includes for edb7211 compared to strong-arm and configure gcc with cpu arm7tdmi compared to strong-arm Binutils seems to make and make install fine. The problem starts with GCC configure and make. I configure using: ../gcc-2.95.2/configure $TARGET --prefix=$DEST --disable-threads --enable-languages="c" --with-cpu=arm7tdmi 7. "Make" ends with this error message Start of paste: Configuring in arm-linux/libiberty creating cache ./config.cache checking host system type... arm-unknown-linux-gnu checking build system type... arm-unknown-linux-gnu checking for ar... ar checking for ranlib... ranlib checking for gcc... /home/josh/phototainer/toolchain/build-gcc0/gcc/xgcc -B/home/josh/phototainer/toolchain/build-gcc0/gcc/ -B/usr/local/arm-linux/arm-linux/bin/ checking whether we are using GNU C... yes checking whether /home/josh/phototainer/toolchain/build-gcc0/gcc/xgcc -B/home/josh/phototainer/toolchain/build-gcc0/gcc/ -B/usr/local/arm-linux/arm-linux/bin/ accepts -g... yes checking for POSIXized ISC... no checking for a BSD compatible install... /usr/bin/install -c checking how to run the C preprocessor... /home/josh/phototainer/toolchain/build-gcc0/gcc/xgcc - B/home/josh/phototainer/toolchain/build-gcc0/gcc/ -B/usr/local/arm-linux/arm-linux/bin/ -E checking for sys/file.h... yes checking for sys/param.h... yes checking for stdlib.h... yes checking for string.h... yes checking for unistd.h... yes checking for strings.h... yes checking for sys/time.h... yes checking for sys/resource.h... yes checking for sys/wait.h that is POSIX.1 compatible... yes checking whether the C compiler (/home/josh/phototainer/toolchain/build-gcc0/gcc/xgcc -B/home/josh/phototainer/toolchain/build-gcc0/gcc/ -B/usr/local/arm-linux/arm-linux/bin/ -g -O2 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. Configuring in arm-linux/libstdc++ Configuring in arm-linux/libf2c creating cache ./config.cache checking if compiler f771 has been built... no Configuring in arm-linux/libchill creating cache ./config.cache checking if compiler cc1chill has been built... no Configuring in arm-linux/libobjc creating cache ./config.cache checking if compiler cc1obj has been built... no . End of Paste I have also included the lines from my build-gcc0/gcc/config.log Start of Paste This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. configure:599: checking LIBRARY_PATH variable configure:624: checking GCC_EXEC_PREFIX variable configure:965: checking host system type configure:986: checking target system type configure:1004: checking build system type configure:1031: checking for gcc configure:1144: checking whether the C compiler (gcc -g -O2 ) works configure:1160: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1186: checking whether the C compiler (gcc -g -O2 ) is a cross-compiler configure:1191: checking whether we are using GNU C configure:1219: checking whether gcc accepts -g configure:1262: checking whether make sets ${MAKE} configure:1290: checking whether a default assembler was specified configure:1302: checking whether a default linker was specified configure:1319: checking for mawk configure:1319: checking for gawk configure:1351: checking for flex configure:1385: checking for yywrap in -lfl configure:1404: gcc -o conftest -g -O2 conftest.c -lfl 1>&5 configure:1427: checking whether ln works configure:1459: checking whether ln -s works configure:1491: checking for volatile configure:1503: gcc -c -g -O2 conftest.c 1>&5 configure:1526: checking for ranlib configure:1558: checking for bison configure:1599: checking for a BSD compatible install configure:1650: checking how to run the C preprocessor configure:1730: checking for ANSI C header files configure:1834: checking whether time.h and sys/time.h may both be included configure:1848: gcc -c -g -O2 conftest.c 1>&5 configure:1869: checking whether string.h and strings.h may both be included configure:1882: gcc -c -g -O2 conftest.c 1>&5 configure:1903: checking for sys/wait.h that is POSIX.1 compatible configure:1948: checking for limits.h configure:1948: checking for stddef.h configure:1958: gcc -E conftest.c >/dev/null 2>conftest.out configure:1948: checking for string.h configure:1948: checking for strings.h configure:1948: checking for stdlib.h configure:1948: checking for time.h configure:1958: gcc -E conftest.c >/dev/null 2>conftest.out configure:1948: checking for fcntl.h configure:1948: checking for unistd.h configure:1948: checking for stab.h configure:1958: gcc -E conftest.c >/dev/null 2>conftest.out configure:1948: checking for sys/file.h configure:1948: checking for sys/time.h configure:1948: checking for sys/resource.h configure:1948: checking for sys/param.h configure:1948: checking for sys/times.h configure:1958: gcc -E conftest.c >/dev/null 2>conftest.out configure:1948: checking for sys/stat.h configure:1958: gcc -E conftest.c >/dev/null 2>conftest.out configure:1948: checking for direct.h configure:1958: gcc -E conftest.c >/dev/null 2>conftest.out configure:1954:20: direct.h: No such file or directory configure: failed program was: #line 1953 "configure" #include "confdefs.h" #include <direct.h> configure:1988: checking for thread.h configure:1998: gcc -E conftest.c >/dev/null 2>conftest.out configure:1994:20: thread.h: No such file or directory configure: failed program was: #line 1993 "configure" #include "confdefs.h" #include <thread.h> configure:2022: checking for pthread.h configure:2032: gcc -E conftest.c >/dev/null 2>conftest.out configure:2059: checking for gnatbind configure:2090: checking whether cpp understands the stringify operator configure:2103: gcc -c -g -O2 conftest.c 1>&5 configure:2126: checking for inttypes.h configure:2139: gcc -c -g -O2 conftest.c 1>&5 configure:2165: checking for strtoul configure:2165: checking for bsearch configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2165: checking for strerror configure:2165: checking for putenv configure:2165: checking for popen configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2165: checking for bcopy configure:2165: checking for bzero configure:2165: checking for bcmp configure:2165: checking for index configure:2165: checking for rindex configure:2165: checking for strchr configure:2165: checking for strrchr configure:2165: checking for kill configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2165: checking for getrlimit configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2165: checking for setrlimit configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2165: checking for atoll configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2165: checking for atoq configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 /tmp/ccWw2ZPV.o: In function `main': /home/josh/phototainer/toolchain/build-gcc0/gcc/configure:2187: undefined reference to `atoq' collect2: ld returned 1 exit status configure: failed program was: #line 2170 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char atoq(); below. */ #include <assert.h> /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char atoq(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_atoq) || defined (__stub___atoq) choke me #else atoq(); #endif ; return 0; } configure:2165: checking for sysconf configure:2165: checking for isascii configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2165: checking for gettimeofday configure:2165: checking for strsignal configure:2165: checking for putc_unlocked configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2165: checking for fputc_unlocked configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2165: checking for fputs_unlocked configure:2193: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2222: checking for vprintf configure:2338: checking whether the printf functions support %p configure:2359: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2392: checking for pid_t configure:2426: checking for vfork.h configure:2461: checking for working vfork configure:2640: checking whether malloc must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether realloc must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether calloc must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether free must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether bcopy must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether bzero must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether bcmp must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether index must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether rindex must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether getenv must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether atol must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether sbrk must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether abort must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether atof must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether strerror must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether getcwd must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether getwd must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether strsignal must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:2675: `strsignal' undeclared (first use in this function) configure:2675: (Each undeclared identifier is reported only once configure:2675: for each function it appears in.) configure: failed program was: #line 2645 "configure" #include "confdefs.h" #include <stdio.h> #ifdef STRING_WITH_STRINGS # include <string.h> # include <strings.h> #else # ifdef HAVE_STRING_H # include <string.h> # else # ifdef HAVE_STRINGS_H # include <strings.h> # endif # endif #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #ifndef HAVE_RINDEX #define rindex strrchr #endif #ifndef HAVE_INDEX #define index strchr #endif int main() { char *(*pfn) = (char *(*)) strsignal ; return 0; } configure:2640: checking whether putc_unlocked must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2640: checking whether fputs_unlocked must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:2675: `fputs_unlocked' undeclared (first use in this function) configure:2675: (Each undeclared identifier is reported only once configure:2675: for each function it appears in.) configure: failed program was: #line 2645 "configure" #include "confdefs.h" #include <stdio.h> #ifdef STRING_WITH_STRINGS # include <string.h> # include <strings.h> #else # ifdef HAVE_STRING_H # include <string.h> # else # ifdef HAVE_STRINGS_H # include <strings.h> # endif # endif #endif #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #ifndef HAVE_RINDEX #define rindex strrchr #endif #ifndef HAVE_INDEX #define index strchr #endif int main() { char *(*pfn) = (char *(*)) fputs_unlocked ; return 0; } configure:2640: checking whether strstr must be declared configure:2678: gcc -c -g -O2 conftest.c 1>&5 configure:2707: checking whether getrlimit must be declared configure:2749: gcc -c -g -O2 conftest.c 1>&5 configure:2707: checking whether setrlimit must be declared configure:2749: gcc -c -g -O2 conftest.c 1>&5 configure:2776: checking for sys_siglist declaration in signal.h or unistd.h configure:2793: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:2789: warning: initialization discards qualifiers from pointer target type configure:2816: checking if mkdir takes one argument configure:2838: gcc -c -g -O2 conftest.c 1>&5 configure:6069: checking for strerror in -lcposix configure:6088: gcc -o conftest -g -O2 conftest.c -lcposix 1>&5 /usr/bin/ld: cannot find -lcposix collect2: ld returned 1 exit status configure: failed program was: #line 6077 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror(); int main() { strerror() ; return 0; } configure:6111: checking for working const configure:6186: checking for inline configure:6226: checking for off_t configure:6259: checking for size_t configure:6294: checking for working alloca.h configure:6327: checking for alloca configure:6529: checking for unistd.h configure:6568: checking for getpagesize configure:6621: checking for working mmap configure:6797: checking for argz.h configure:6797: checking for limits.h configure:6797: checking for locale.h configure:6797: checking for nl_types.h configure:6797: checking for malloc.h configure:6797: checking for string.h configure:6797: checking for unistd.h configure:6797: checking for sys/param.h configure:6837: checking for getcwd configure:6837: checking for munmap configure:6837: checking for putenv configure:6837: checking for setenv configure:6837: checking for setlocale configure:6837: checking for strchr configure:6837: checking for strcasecmp configure:6837: checking for strdup configure:6837: checking for __argz_count configure:6837: checking for __argz_stringify configure:6837: checking for __argz_next configure:6956: checking for LC_MESSAGES configure:6989: checking whether NLS is requested configure:8076: checking assembler alignment features configure:8197: checking assembler subsection support configure:8237: checking assembler instructions End of Paste And finally here is the info form the config.log in the libibery folder Start of Paste This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. configure:591: checking host system type configure:614: checking build system type configure:640: checking for ar configure:672: checking for ranlib configure:749: checking for gcc configure:828: checking whether we are using GNU C configure:837: gcc -E conftest.c configure:852: checking whether gcc accepts -g configure:881: checking for POSIXized ISC configure:919: checking for a BSD compatible install configure:980: checking how to run the C preprocessor configure:1001: gcc -E conftest.c >/dev/null 2>conftest.out configure:1063: checking for sys/file.h configure:1073: gcc -E conftest.c >/dev/null 2>conftest.out configure:1063: checking for sys/param.h configure:1073: gcc -E conftest.c >/dev/null 2>conftest.out configure:1063: checking for stdlib.h configure:1073: gcc -E conftest.c >/dev/null 2>conftest.out configure:1063: checking for string.h configure:1073: gcc -E conftest.c >/dev/null 2>conftest.out configure:1063: checking for unistd.h configure:1073: gcc -E conftest.c >/dev/null 2>conftest.out configure:1063: checking for strings.h configure:1073: gcc -E conftest.c >/dev/null 2>conftest.out configure:1063: checking for sys/time.h configure:1073: gcc -E conftest.c >/dev/null 2>conftest.out configure:1063: checking for sys/resource.h configure:1073: gcc -E conftest.c >/dev/null 2>conftest.out configure:1100: checking for sys/wait.h that is POSIX.1 compatible configure:1121: gcc -c -g -O2 conftest.c 1>&5 configure:1749: checking whether the C compiler (gcc -g -O2 ) works configure:1765: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1791: checking whether the C compiler (gcc -g -O2 ) is a cross-compiler configure:1798: checking for asprintf configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for atexit configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for basename configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for bcmp configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1810: warning: conflicting types for built-in function `bcmp' configure:1798: checking for bcopy configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for bzero configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1810: warning: conflicting types for built-in function `bzero' configure:1798: checking for calloc configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for clock configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for getcwd configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for getpagesize configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for index configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for insque configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for memchr configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for memcmp configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1810: warning: conflicting types for built-in function `memcmp' configure:1798: checking for memcpy configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1810: warning: conflicting types for built-in function `memcpy' configure:1798: checking for memmove configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for memset configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1810: warning: conflicting types for built-in function `memset' configure:1798: checking for mkstemps configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 /tmp/ccTHoP7q.o: In function `main': /home/josh/phototainer/toolchain/build-gcc0/libiberty/configure:1820: undefined reference to `mkstemps' collect2: ld returned 1 exit status configure: failed program was: #line 1803 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mkstemps(); below. */ #include <assert.h> /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mkstemps(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_mkstemps) || defined (__stub___mkstemps) choke me #else mkstemps(); #endif ; return 0; } configure:1798: checking for putenv configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for random configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for rename configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for rindex configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for setenv configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for sigsetmask configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for strcasecmp configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for strchr configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for strdup configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for strncasecmp configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for strrchr configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for strstr configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for strtod configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for strtol configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for strtoul configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for tmpnam configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 /tmp/ccAimObd.o: In function `main': /home/josh/phototainer/toolchain/build-gcc0/libiberty/configure:1820: the use of `tmpnam' is dangerous, better use `mkstemp' configure:1798: checking for vasprintf configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for vfprintf configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for vprintf configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for vsprintf configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1798: checking for waitpid configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1873: checking for working alloca.h configure:1885: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1906: checking for alloca configure:1939: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2108: checking for ANSI C header files configure:2121: gcc -E conftest.c >/dev/null 2>conftest.out configure:2188: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2212: checking for pid_t configure:2246: checking for vfork.h configure:2256: gcc -E conftest.c >/dev/null 2>conftest.out configure:2252:19: vfork.h: No such file or directory configure: failed program was: #line 2251 "configure" #include "confdefs.h" #include <vfork.h> configure:2281: checking for working vfork configure:2432: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2459: checking for sys_errlist configure:2471: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2459: checking for sys_nerr configure:2471: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2459: checking for sys_siglist configure:2471: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2497: checking for getrusage configure:2525: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2497: checking for on_exit configure:2525: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2497: checking for psignal configure:2525: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2497: checking for strerror configure:2525: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2497: checking for strsignal configure:2525: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2497: checking for sysconf configure:2525: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2497: checking for times configure:2525: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2497: checking for sbrk configure:2525: gcc -o conftest -g -O2 conftest.c 1>&5 configure:2497: checking for gettimeofday configure:2525: gcc -o conftest -g -O2 conftest.c 1>&5 End of Paste