From: Tony Reed Date: 2000-09-30T02:19:39+09:00 Subject: [ruby-talk:5196] Re: Compiling 1.6.1 problem Thus spake Yasushi Shoji (yashi@yashi.com) : :hmm... linux 2.4.0-test* has RLIM_INFINITY defined in :asm-i386/resource.h. but how come 'asm/resource.h' is included? : :are you using some distribution? :giving '-v' to gcc might tell? or `echo $CFLAGS`? ----- [tony@kubrick tony]$ source /usr/src/linux/scripts/ver_linux -- Versions installed: (if some fields are empty or look -- unusual then possibly you have very old versions) Linux kubrick 2.4.0-test7 #5 Fri Sep 8 14:55:52 EDT 2000 i586 Kernel modules 2.1.121 Gnu C 2.95.2 Binutils 2.10 Linux C Library 2.1.2 Dynamic linker ldd (GNU libc) 2.1.2 Procps 2.0.4 Mount 2.9u Net-tools 1.53 Console-tools 1999.03.02 Sh-utils 2.0 Modules Loaded ----- [tony@kubrick tony]$ gcc -v Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs gcc version 2.95.2 19991024 (release) ----- This was originally RH 6.1, I upgraded the compiler and binutils from sources, and removed the older egcs and binutils via rpm -e; the glibc is the original installed with RH. (from [ruby-talk:5192]) : :Could you show us the contents of config.log? Probably clue to know :what's wrong is in the file. ----- This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. configure:597: checking host system type configure:618: checking target system type configure:636: checking build system type configure:770: checking for gcc configure:883: checking whether the C compiler (gcc ) works configure:899: gcc -o conftest conftest.c 1>&5 configure:925: checking whether the C compiler (gcc ) is a cross-compiler configure:930: checking whether we are using GNU C configure:939: gcc -E conftest.c configure:958: checking whether gcc accepts -g configure:990: checking how to run the C preprocessor configure:1011: gcc -E conftest.c >/dev/null 2>conftest.out configure:1071: checking whether gcc needs -traditional configure:1122: checking for bison configure:1155: checking for ranlib configure:1222: checking for ar configure:1256: checking for ar configure:1453: checking whether ln -s works configure:1474: checking whether make sets ${MAKE} configure:1503: checking for AIX configure:1528: checking for minix/config.h configure:1538: gcc -E conftest.c >/dev/null 2>conftest.out configure:1534: minix/config.h: No such file or directory configure: failed program was: #line 1533 "configure" #include "confdefs.h" #include configure:1577: checking for Cygwin environment configure:1593: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:1589: `__CYGWIN32__' undeclared (first use in this function) configure:1589: (Each undeclared identifier is reported only once configure:1589: for each function it appears in.) configure: failed program was: #line 1582 "configure" #include "confdefs.h" int main() { #ifndef __CYGWIN__ #define __CYGWIN__ __CYGWIN32__ #endif return __CYGWIN__; ; return 0; } configure:1610: checking for mingw32 environment configure:1622: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:1618: `__MINGW32__' undeclared (first use in this function) configure:1618: (Each undeclared identifier is reported only once configure:1618: for each function it appears in.) configure: failed program was: #line 1615 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } configure:1641: checking for executable suffix configure:1651: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1672: checking for object suffix configure:1678: gcc -c -g -O2 conftest.c 1>&5 configure:1697: checking size of int configure:1716: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1736: checking size of short configure:1755: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1775: checking size of long configure:1794: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1814: checking size of void* configure:1833: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1853: checking size of float configure:1872: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1892: checking size of double configure:1911: gcc -o conftest -g -O2 conftest.c 1>&5 configure:1932: checking for prototypes configure:1944: gcc -c -g -O2 conftest.c 1>&5 configure:1965: checking token paste string configure:1977: gcc -c -g -O2 conftest.c 1>&5 configure:2003: checking for variable length prototypes and stdarg.h configure:2025: gcc -c -g -O2 conftest.c 1>&5 configure:2046: checking for gcc attribute noreturn configure:2058: gcc -c -g -O2 conftest.c 1>&5 configure:2185: checking for crypt in -lcrypt configure:2204: gcc -o conftest -g -O2 conftest.c -lcrypt -lm 1>&5 configure:2232: checking for dlopen in -ldl configure:2251: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:2279: checking for shl_load in -ldld configure:2298: gcc -o conftest -g -O2 conftest.c -ldld -ldl -lcrypt -lm 1>&5 /usr/local/bin/ld: cannot find -ldld collect2: ld returned 1 exit status configure: failed program was: #line 2287 "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 shl_load(); int main() { shl_load() ; return 0; } configure:2331: checking for dirent.h that defines DIR configure:2344: gcc -c -g -O2 conftest.c 1>&5 configure:2369: checking for opendir in -ldir configure:2388: gcc -o conftest -g -O2 conftest.c -ldir -ldl -lcrypt -lm 1>&5 /usr/local/bin/ld: cannot find -ldir collect2: ld returned 1 exit status configure: failed program was: #line 2377 "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 opendir(); int main() { opendir() ; return 0; } configure:2452: checking for ANSI C header files configure:2465: gcc -E conftest.c >/dev/null 2>conftest.out configure:2532: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:2556: checking for sys/wait.h that is POSIX.1 compatible configure:2577: gcc -c -g -O2 conftest.c 1>&5 configure:2603: checking for stdlib.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for string.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for unistd.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for limits.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for sys/file.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for sys/ioctl.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for fcntl.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for sys/fcntl.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for sys/select.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for sys/time.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for sys/times.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for sys/param.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for syscall.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for pwd.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for a.out.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for utime.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for memory.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2603: checking for direct.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out configure:2609: direct.h: No such file or directory configure: failed program was: #line 2608 "configure" #include "confdefs.h" #include configure:2603: checking for sys/resource.h configure:2613: gcc -E conftest.c >/dev/null 2>conftest.out In file included from /usr/include/sys/resource.h:25, from configure:2609: /usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined /usr/include/asm/resource.h:25: warning: this is the location of the previous definition configure: failed program was: #line 2608 "configure" #include "confdefs.h" #include configure:2641: checking for uid_t in sys/types.h configure:2675: checking for size_t configure:2708: checking for st_blksize in struct stat configure:2721: gcc -c -g -O2 conftest.c 1>&5 configure:2743: checking for st_blocks in struct stat configure:2756: gcc -c -g -O2 conftest.c 1>&5 configure:2780: checking for st_rdev in struct stat configure:2793: gcc -c -g -O2 conftest.c 1>&5 configure:2815: checking type of array argument to getgroups configure:2848: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:2886: checking return type of signal handlers configure:2908: gcc -c -g -O2 conftest.c 1>&5 configure:2929: checking for working alloca.h configure:2941: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:2962: checking for alloca configure:2995: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3161: checking for pid_t configure:3195: checking for vfork.h configure:3205: gcc -E conftest.c >/dev/null 2>conftest.out configure:3201: vfork.h: No such file or directory configure: failed program was: #line 3200 "configure" #include "confdefs.h" #include configure:3230: checking for working vfork configure:3381: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3404: checking for 8-bit clean memcmp configure:3422: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for dup2 configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for memmove configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for mkdir configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for strcasecmp configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for strncasecmp configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for strerror configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for strftime configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for strchr configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for strstr configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for strtoul configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for crypt configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for flock configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for vsnprintf configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for isinf configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for isnan configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3444: checking for finite configure:3472: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for fmod configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for killpg configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for drand48 configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for random configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for wait4 configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for waitpid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for syscall configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for getcwd configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for chroot configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for truncate configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for chsize configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 /tmp/cc7lyLBh.o: In function `main': /c/src/ruby-1.6.1/configure:3527: undefined reference to `chsize' collect2: ld returned 1 exit status configure: failed program was: #line 3510 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char chsize(); below. */ #include /* 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 chsize(); 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_chsize) || defined (__stub___chsize) choke me #else chsize(); #endif ; return 0; } configure:3505: checking for times configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for utimes configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for fcntl configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for lockf configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for lstat configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for symlink configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for readlink configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for setitimer configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for setruid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 /tmp/ccGuL8IK.o: In function `main': /c/src/ruby-1.6.1/configure:3527: undefined reference to `setruid' collect2: ld returned 1 exit status configure: failed program was: #line 3510 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char setruid(); below. */ #include /* 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 setruid(); 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_setruid) || defined (__stub___setruid) choke me #else setruid(); #endif ; return 0; } configure:3505: checking for seteuid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for setreuid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for setrgid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 /tmp/ccS3WFRC.o: In function `main': /c/src/ruby-1.6.1/configure:3527: undefined reference to `setrgid' collect2: ld returned 1 exit status configure: failed program was: #line 3510 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char setrgid(); below. */ #include /* 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 setrgid(); 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_setrgid) || defined (__stub___setrgid) choke me #else setrgid(); #endif ; return 0; } configure:3505: checking for setegid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for setregid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for pause configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for getpgrp configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for setpgrp configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for getpgid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for setpgid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for getgroups configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for getpriority configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for getrlimit configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for dlopen configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for sigprocmask configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for sigaction configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for _setjmp configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for setsid configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for telldir configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3505: checking for seekdir configure:3533: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3558: checking whether struct tm is in sys/time.h or time.h configure:3571: gcc -c -g -O2 conftest.c 1>&5 configure:3592: checking for tm_zone in struct tm configure:3605: gcc -c -g -O2 conftest.c 1>&5 configure:3662: checking for external int daylight configure:3675: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3756: checking whether getpgrp takes no argument configure:3819: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3843: checking whether setpgrp takes no argument configure:3871: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure: In function `main': configure:3863: too many arguments to function `setpgrp' configure: failed program was: #line 3851 "configure" #include "confdefs.h" #ifdef HAVE_UNISTD_H #include #endif /* * If this system has a BSD-style setpgrp, which takes arguments, exit * successfully. */ main() { if (setpgrp(1,1) == -1) exit(0); else exit(1); } configure:3896: checking for working strtod configure:3934: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:3952: checking whether byte ordering is bigendian configure:3970: gcc -c -g -O2 conftest.c 1>&5 configure:3985: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:3980: `not' undeclared (first use in this function) configure:3980: (Each undeclared identifier is reported only once configure:3980: for each function it appears in.) configure:3980: parse error before `big' configure: failed program was: #line 3974 "configure" #include "confdefs.h" #include #include int main() { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } configure:4042: checking for working const configure:4096: gcc -c -g -O2 conftest.c 1>&5 configure:4117: checking whether char is unsigned configure:4181: checking whether right shift preserve sign bit configure:4201: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:4229: checking count field in FILE structures configure:4241: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:4237: structure has no member named `_cnt' configure: failed program was: #line 4234 "configure" #include "confdefs.h" #include int main() { FILE *f = stdin; f->_cnt = 0; ; return 0; } configure:4258: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:4254: structure has no member named `__cnt' configure: failed program was: #line 4251 "configure" #include "confdefs.h" #include int main() { FILE *f = stdin; f->__cnt = 0; ; return 0; } configure:4276: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:4272: structure has no member named `_r' configure: failed program was: #line 4269 "configure" #include "confdefs.h" #include int main() { FILE *f = stdin; f->_r = 0; ; return 0; } configure:4294: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:4290: structure has no member named `readCount' configure: failed program was: #line 4287 "configure" #include "confdefs.h" #include int main() { FILE *f = stdin; f->readCount = 0; ; return 0; } configure:4312: gcc -c -g -O2 conftest.c 1>&5 configure: In function `main': configure:4308: structure has no member named `_rcount' configure: failed program was: #line 4305 "configure" #include "confdefs.h" #include int main() { FILE *f = stdin; f->_rcount = 0; ; return 0; } configure:4369: checking whether ELF binaries are produced configure:4397: gcc -o conftest -g -O2 conftest.c -ldl -lcrypt -lm 1>&5 configure:4445: checking whether OS depend dynamic link works ----- -- Tony Reed