On a SuSE 6.3 system (glibc 2.1.2, Linux 2.2.13) with i686 I get when
running configure with gcc 2.95.2:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
....
checking size of short... 0
*** PANIC *** Configure tests are not working - compiler is broken.
*** PANIC *** Please examine config.log for compilation errors.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
configure fails since the wrong paths are added with -L. This is a
result of parsing /etc/ld.so.conf.
Here's the contents of /etc/ld.so.conf for my system:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/lib-aout
/usr/X11R6/lib/Xaw95
/usr/X11R6/lib/Xaw3d
/usr/X11R6/lib
/usr/X386/lib
/usr/i486-linux/lib
/usr/i486-linux-libc5/lib=libc5
/usr/i486-linux-libc6/lib=libc6
/usr/i486-linuxaout/lib
/usr/local/lib
/usr/openwin/lib
/opt/kde/lib
/opt/gnome/lib
/opt/gcc-2.95/lib
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Oh, I forgot: this is the current CVS version of XEmacs 21.2.
Andreas
P.S. Here's config.log:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:835: checking whether ln -s works
configure:1080: checking host system type
configure:1575: checking for gcc
configure:1679: checking whether the C compiler (/opt/gcc-2.95/bin/gcc -pipe -O3
-fno-exceptions -g -Wall -Wno-switch -mpentiumpro ) works
configure:1697: /opt/gcc-2.95/bin/gcc -o conftest -pipe -O3 -fno-exceptions -g -Wall
-Wno-switch -mpentiumpro conftest.c 1>&5
configure:1694: warning: return-type defaults to `int'
configure:1725: checking whether the C compiler (/opt/gcc-2.95/bin/gcc -pipe -O3
-fno-exceptions -g -Wall -Wno-switch -mpentiumpro ) is a cross-compiler
configure:1730: checking whether we are using GNU C
configure:1737: /opt/gcc-2.95/bin/gcc -E conftest.c
configure:1755: checking whether /opt/gcc-2.95/bin/gcc accepts -g
configure:2218: checking how to run the C preprocessor
configure:2237: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:2296: checking for AIX
configure:2325: checking for GNU libc
configure:2339: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure:2373: /opt/gcc-2.95/bin/gcc -o conftest -pipe -O3 -fno-exceptions -g -Wall
-Wno-switch -mpentiumpro conftest.c 1>&5
configure:2659: checking for dynodump
configure:2956: checking for malloc_get_state
configure:2982: /opt/gcc-2.95/bin/gcc -o conftest -pipe -O3 -fno-exceptions -g -Wall
-Wno-switch -mpentiumpro -L/usr/X11R6/lib -L/usr/X386/lib -L/usr/i486-linux/lib
-L/usr/i486-linuxaout/lib -L/usr/local/lib -L/opt/kde/lib -L/opt/gnome/lib
-L/opt/gcc-2.95/lib conftest.c -lgcc -lc -lgcc /usr/lib/crtn.o 1>&5
/usr/lib/crt1.o(.text+0x1d): undefined reference to `__libc_start_main'
/tmp/cc9qaRyZ.o: In function `main':
/usr/src/build-xemacs/build-21-2/configure:2976: undefined reference to
`malloc_get_state'
collect2: ld returned 1 exit status
configure: failed program was:
#line 2959 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char malloc_get_state(); 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 malloc_get_state();
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_malloc_get_state) || defined (__stub___malloc_get_state)
choke me
#else
malloc_get_state();
#endif
; return 0; }
configure:3002: checking for malloc_set_state
configure:3028: /opt/gcc-2.95/bin/gcc -o conftest -pipe -O3 -fno-exceptions -g -Wall
-Wno-switch -mpentiumpro -L/usr/X11R6/lib -L/usr/X386/lib -L/usr/i486-linux/lib
-L/usr/i486-linuxaout/lib -L/usr/local/lib -L/opt/kde/lib -L/opt/gnome/lib
-L/opt/gcc-2.95/lib conftest.c -lgcc -lc -lgcc /usr/lib/crtn.o 1>&5
/usr/lib/crt1.o(.text+0x1d): undefined reference to `__libc_start_main'
/tmp/ccqYJ4A8.o: In function `main':
/usr/src/build-xemacs/build-21-2/configure:3022: undefined reference to
`malloc_set_state'
collect2: ld returned 1 exit status
configure: failed program was:
#line 3005 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char malloc_set_state(); 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 malloc_set_state();
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_malloc_set_state) || defined (__stub___malloc_set_state)
choke me
#else
malloc_set_state();
#endif
; return 0; }
configure:3048: checking whether __after_morecore_hook exists
configure:3057: /opt/gcc-2.95/bin/gcc -o conftest -pipe -O3 -fno-exceptions -g -Wall
-Wno-switch -mpentiumpro -L/usr/X11R6/lib -L/usr/X386/lib -L/usr/i486-linux/lib
-L/usr/i486-linuxaout/lib -L/usr/local/lib -L/opt/kde/lib -L/opt/gnome/lib
-L/opt/gcc-2.95/lib conftest.c -lgcc -lc -lgcc /usr/lib/crtn.o 1>&5
/usr/lib/crt1.o(.text+0x1d): undefined reference to `__libc_start_main'
/tmp/ccRm2eie.o: In function `main':
/usr/src/build-xemacs/build-21-2/configure:3053: undefined reference to
`__after_morecore_hook'
collect2: ld returned 1 exit status
configure: failed program was:
#line 3050 "configure"
#include "confdefs.h"
extern void (* __after_morecore_hook)();
int main() {
__after_morecore_hook = 0
; return 0; }
configure:3116: checking for ranlib
configure:3171: checking for a BSD compatible install
configure:3225: checking for bison
configure:3257: checking for mach/mach.h
configure:3265: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3261: mach/mach.h: No such file or directory
configure: failed program was:
#line 3260 "configure"
#include "confdefs.h"
#include <mach/mach.h>
configure:3257: checking for sys/stropts.h
configure:3265: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3257: checking for sys/timeb.h
configure:3265: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3257: checking for sys/time.h
configure:3265: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3257: checking for unistd.h
configure:3265: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3298: checking for utime.h
configure:3306: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3298: checking for locale.h
configure:3306: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3298: checking for libgen.h
configure:3306: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3298: checking for fcntl.h
configure:3306: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3298: checking for ulimit.h
configure:3306: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3298: checking for cygwin/version.h
configure:3306: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3302: cygwin/version.h: No such file or directory
configure: failed program was:
#line 3301 "configure"
#include "confdefs.h"
#include <cygwin/version.h>
configure:3339: checking for kstat.h
configure:3347: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3343: kstat.h: No such file or directory
configure: failed program was:
#line 3342 "configure"
#include "confdefs.h"
#include <kstat.h>
configure:3339: checking for sys/pstat.h
configure:3347: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3343: sys/pstat.h: No such file or directory
configure: failed program was:
#line 3342 "configure"
#include "confdefs.h"
#include <sys/pstat.h>
configure:3339: checking for inttypes.h
configure:3347: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3339: checking for sys/un.h
configure:3347: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3339: checking for a.out.h
configure:3347: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3377: checking for sys/wait.h that is POSIX.1 compatible
configure:3396: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure:3420: checking for ANSI C header files
configure:3431: /opt/gcc-2.95/bin/gcc -E conftest.c >/dev/null 2>conftest.out
configure:3495: /opt/gcc-2.95/bin/gcc -o conftest -pipe -O3 -fno-exceptions -g -Wall
-Wno-switch -mpentiumpro -L/usr/X11R6/lib -L/usr/X386/lib -L/usr/i486-linux/lib
-L/usr/i486-linuxaout/lib -L/usr/local/lib -L/opt/kde/lib -L/opt/gnome/lib
-L/opt/gcc-2.95/lib conftest.c -lgcc -lc -lgcc /usr/lib/crtn.o 1>&5
/usr/lib/crt1.o(.text+0x1d): undefined reference to `__libc_start_main'
/tmp/ccHQaHPR.o: In function `main':
/usr/src/build-xemacs/build-21-2/configure:3489: undefined reference to `__ctype_b'
/usr/src/build-xemacs/build-21-2/configure:3489: undefined reference to
`__ctype_toupper'
/usr/src/build-xemacs/build-21-2/configure:3490: undefined reference to `exit'
/usr/src/build-xemacs/build-21-2/configure:3491: undefined reference to `exit'
collect2: ld returned 1 exit status
configure: failed program was:
#line 3484 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
configure:3521: checking whether time.h and sys/time.h may both be included
configure:3533: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure: In function `main':
configure:3529: warning: unused variable `tp'
configure:3557: checking for sys_siglist declaration in signal.h or unistd.h
configure:3572: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure: In function `main':
configure:3568: warning: initialization discards qualifiers from pointer target type
configure:3568: warning: unused variable `msg'
configure:3597: checking for struct utimbuf
configure:3618: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure:3638: checking return type of signal handlers
configure:3658: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure: In function `main':
configure:3654: warning: unused variable `i'
configure:3680: checking for size_t
configure:3714: checking for pid_t
configure:3748: checking for uid_t in sys/types.h
configure:3787: checking for mode_t
configure:3821: checking for off_t
configure:3855: checking for ssize_t
configure:3890: checking for struct timeval
configure:3908: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure:3930: checking whether struct tm is in sys/time.h or time.h
configure:3941: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure: In function `main':
configure:3937: warning: statement with no effect
configure:3965: checking for tm_zone in struct tm
configure:3976: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure: In function `main':
configure:3972: warning: statement with no effect
configure:4038: checking for working const
configure:4090: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure: In function `main':
configure:4064: warning: unused variable `s'
configure:4084: warning: unused variable `foo'
configure:4052: warning: unused variable `zero'
configure:4046: warning: unused variable `x'
configure:4063: warning: `t' might be used uninitialized in this function
configure:4081: warning: `b' might be used uninitialized in this function
configure:4115: checking whether make sets ${MAKE}
configure:4140: checking whether byte ordering is bigendian
configure:4156: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure:4171: /opt/gcc-2.95/bin/gcc -c -pipe -O3 -fno-exceptions -g -Wall -Wno-switch
-mpentiumpro conftest.c 1>&5
configure: In function `main':
configure:4166: `not' undeclared (first use in this function)
configure:4166: (Each undeclared identifier is reported only once
configure:4166: for each function it appears in.)
configure:4166: parse error before `big'
configure: failed program was:
#line 4160 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif
; return 0; }
configure:4228: checking size of short
configure:4242: /opt/gcc-2.95/bin/gcc -o conftest -pipe -O3 -fno-exceptions -g -Wall
-Wno-switch -mpentiumpro -L/usr/X11R6/lib -L/usr/X386/lib -L/usr/i486-linux/lib
-L/usr/i486-linuxaout/lib -L/usr/local/lib -L/opt/kde/lib -L/opt/gnome/lib
-L/opt/gcc-2.95/lib conftest.c -lgcc -lc -lgcc /usr/lib/crtn.o 1>&5
configure:4234: warning: return-type defaults to `int'
/usr/lib/crt1.o(.text+0x1d): undefined reference to `__libc_start_main'
/tmp/cc5tZBDa.o: In function `main':
/usr/src/build-xemacs/build-21-2/configure:4235: undefined reference to `fopen'
/usr/src/build-xemacs/build-21-2/configure:4236: undefined reference to `exit'
/usr/src/build-xemacs/build-21-2/configure:4237: undefined reference to `fprintf'
/usr/src/build-xemacs/build-21-2/configure:4238: undefined reference to `exit'
collect2: ld returned 1 exit status
configure: failed program was:
#line 4231 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(short));
exit(0);
}
--
Andreas Jaeger
SuSE Labs aj(a)suse.de
private aj(a)arthur.rhein-neckar.de