Mon 08 Jul 2002 01:40:14 PM UTC, original submission:
-----
lauhpj7$ make distclean; CC=~/opt/gcc-3.1/arch/lauhpj7/bin/gcc ./configure >configure.trace && make
[...]
make all-recursive
make[1]: Entering directory `/users/ie/jza/src/orig/make-3.79.1'
Making all in glob
make[2]: Entering directory `/users/ie/jza/src/orig/make-3.79.1/glob'
/users/ie/jza/opt/gcc-3.1/arch/lauhpj7/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -D__STDC_EXT__ -g -O2 -c glob.c
<command line>:1:1: warning: "__STDC_EXT__" redefined
<command line>:1:1: warning: this is the location of the previous definition
In file included from glob.c:813:
glob.c: In function `glob':
glob.c:197: warning: passing arg 0 of `my_realloc' from incompatible pointer type
In file included from glob.c:932:
glob.c:197: warning: passing arg 0 of `my_realloc' from incompatible pointer type
In file included from glob.c:988:
glob.c:197: warning: passing arg 0 of `my_realloc' from incompatible pointer type
In file included from glob.c:1378:
glob.c: In function `glob_in_dir':
glob.c:197: warning: passing arg 0 of `my_realloc' from incompatible pointer type
/users/ie/jza/opt/gcc-3.1/arch/lauhpj7/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -D__STDC_EXT__ -g -O2 -c fnmatch.c
<command line>:1:1: warning: "__STDC_EXT__" redefined
<command line>:1:1: warning: this is the location of the previous definition
rm -f libglob.a
ar cru libglob.a glob.o fnmatch.o
ranlib libglob.a
make[2]: Leaving directory `/users/ie/jza/src/orig/make-3.79.1/glob'
Making all in i18n
make[2]: Entering directory `/users/ie/jza/src/orig/make-3.79.1/i18n'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/users/ie/jza/src/orig/make-3.79.1/i18n'
make[2]: Entering directory `/users/ie/jza/src/orig/make-3.79.1'
/users/ie/jza/opt/gcc-3.1/arch/lauhpj7/bin/gcc -DALIASPATH=\"/usr/local/share/locale:.\" -DLOCALEDIR=\"/usr/local/share/locale\" -DLIBDIR=\"/usr/local/lib\" -DINCLUDEDIR=\"/usr/local/include\" -DHAVE_CONFIG_H -I. -I. -I./glob -D__STDC_EXT__ -g -O2 -c ar.c
<command line>:1:1: warning: "__STDC_EXT__" redefined
<command line>:1:1: warning: this is the location of the previous definition
In file included from ar.c:20:
make.h:278: warning: conflicting types for built-in function `bcmp'
make.h:281: warning: conflicting types for built-in function `bzero'
make.h:284: conflicting types for `bcopy'
/usr/include/strings.h:30: previous declaration of `bcopy'
In file included from /users/ie/jza/opt/gcc-3.1/arch/lauhpj7/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.1/include/wchar.h:50,
from /users/ie/jza/opt/gcc-3.1/arch/lauhpj7/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.1/include/inttypes.h:518,
from make.h:311,
from ar.c:20:
/users/ie/jza/opt/gcc-3.1/arch/lauhpj7/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.1/include/stdlib.h:121: conflicting types for `free'
make.h:250: previous declaration of `free'
/users/ie/jza/opt/gcc-3.1/arch/lauhpj7/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.1/include/stdlib.h:165: conflicting types for `malloc'
make.h:248: previous declaration of `malloc'
/users/ie/jza/opt/gcc-3.1/arch/lauhpj7/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.1/include/stdlib.h:166: conflicting types for `realloc'
make.h:249: previous declaration of `realloc'
make[2]: *** [ar.o] Error 1
make[2]: Leaving directory `/users/ie/jza/src/orig/make-3.79.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/users/ie/jza/src/orig/make-3.79.1'
make: *** [all-recursive-am] Error 2
-----
So there are two different declarations of free(), malloc(), and realloc(). Indeed:
-----
$ grep 'void free' make.h
extern void free PARAMS ((char *));
$ grep 'void free' /users/ie/jza/opt/gcc-3.1/arch/lauhpj7/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.1/include/stdlib.h
extern void free(void *);
extern void free();
-----
Hmm it seems that free() and others are redeclared only if HAVE_STDLIB_H isn't defined:
-----
$ grep HAVE_STDLIB_H config.h
/* #undef HAVE_STDLIB_H */
$ grep stdlib.h configure.trace
checking for stdlib.h... no
$ wc -l /usr/include/stdlib.h
428
$ cat config.log
[...]
configure:2117: checking for stdlib.h
configure:2127: /users/ie/jza/opt/gcc-3.1/arch/lauhpj7/bin/gcc -E -D__STDC_EXT__
conftest.c >/dev/null 2>conftest.out
<command line>:1:1: warning: "__STDC_EXT__" redefined
<command line>:1:1: warning: this is the location of the previous definition
configure: failed program was:
#line 2122 "configure"
#include "confdefs.h"
#include <stdlib.h>
[...]
-----
Maybe the configure (or gcc) does something wrong.
-----
$ cat conftest.c
#include <stdlib.h>
$ ~/opt/gcc-3.1/arch/lauhpj7/bin/gcc -E conftest.c >/dev/null
$ ~/opt/gcc-3.1/arch/lauhpj7/bin/gcc -D__STDC_EXT__ -E conftest.c >/dev/null
<command line>:1:1: warning: "__STDC_EXT__" redefined
<command line>:1:1: warning: this is the location of the previous definition
-----
I think I've gotten closer to the root of the problem. It's probably either a bug in your configure.in, a bug in gcc 3.1 (after all 'make' builds well with AIX's native compiler) or a bug in autoconf...
Tell me if you need more information or if you have a patch for me to test. Thanks for your time.
|