[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Build of make 3.79 fails under HP-UX 11.11
From: |
Klaus Zeitler |
Subject: |
Build of make 3.79 fails under HP-UX 11.11 |
Date: |
10 Jun 2002 17:16:11 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
I'm trying to build make version 3.79, but when I run configure and then make
gcc complains:
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>: warning: "__STDC_EXT__" redefined
<command line>: warning: this is the location of the previous definition
In file included from ar.c:20:
make.h:284: conflicting types for `bcopy'
/usr/include/strings.h:52: previous declaration of `bcopy'
In file included from
/usr/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.0.4/include/wchar.h:33,
from /usr/include/inttypes.h:506,
from make.h:311,
from ar.c:20:
/usr/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.0.4/include/stdlib.h:136:
conflicting types for `free'
make.h:250: previous declaration of `free'
/usr/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.0.4/include/stdlib.h:181:
conflicting types for `malloc'
make.h:248: previous declaration of `malloc'
/usr/local/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.0.4/include/stdlib.h:182:
conflicting types for `realloc'
make.h:249: previous declaration of `realloc'
*** Error exit code 1
e.g. for bcopy I have in file make.h:
extern void bcopy PARAMS ((const char *b1, char *b2, int));
and in strings.h:
extern void bcopy(const void *, void *, size_t);
and similar for the other functions above there's always the same conflict
with parameters being defined once as char* and once as void*.
This is IMHO caused by the flag -D__STDC_EXT__ that seems to be internally
defined for gcc 3.04 and therefore results in a warning that causes configure
to conclude that the 'ANSI C header files' check fails.
The following simple check for include files (starting at line 2111
in file configure, see below) e.g. for string.h fails because the line
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
doesn't filter out the warning that is caused by that flag.
-----------------------------------------------------------
for ac_hdr in stdlib.h unistd.h limits.h sys/param.h fcntl.h string.h \
memory.h sys/time.h sys/timeb.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2117: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2122 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
-----------------------------------------------------------
I'm a bit puzzled by the way the compiler output is checked, wouldn't it
be better to check the return code?
The lines that check if the flag -D__STDC_EXT__ is needed start in line 1560.
There's no compiler version check but simply a check of the OS and in the
case of HP the flag is set unconditionally for HP-UX 11 versions due to the
following line (1572):
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
Since we don't have any older compiler versions on our HP-UX 11.11 machines
the quick and dirty solution for me was to remove the string: hpux1[1-9]*
HTH
Klaus
--
------------------------------------------
| Klaus Zeitler Lucent Technologies |
| Email: address@hidden |
------------------------------------------
---
Mr. Cole's Axiom:
The sum of the intelligence on the planet
is a constant; the population is growing.
- Build of make 3.79 fails under HP-UX 11.11,
Klaus Zeitler <=