configure: WARNING: sys/sysinfo.h: present but cannot be compiled

John David Anglin dave at hiauly1.hia.nrc.ca
Sun Oct 28 20:11:46 CET 2007


>From config.status:
GNU MP config.status 4.2.2
configured by ../configure, generated by GNU Autoconf 2.59,
  with options \"'--prefix=/opt/gnu/gcc/gcc-4.2.3' '--disable-shared' '--build=h
  ppa1.1-hp-hpux11.11' '--host=hppa1.1-hp-hpux11.11' '--target=hppa1.1-hp-hpux11.1
  1' 'CC=gcc' 'CFLAGS=-O2' 'CXXFLAGS=-O2' 'CXX=g++' 'LDFLAGS=-s' 'build_alias=hppa
  1.1-hp-hpux11.11' 'host_alias=hppa1.1-hp-hpux11.11' 'target_alias=hppa1.1-hp-hpu
  x11.11'\"

configure output:
...
checking sys/sysinfo.h usability... no
checking sys/sysinfo.h presence... yes
configure: WARNING: sys/sysinfo.h: present but cannot be compiled
configure: WARNING: sys/sysinfo.h:     check for missing prerequisite headers?
configure: WARNING: sys/sysinfo.h: see the Autoconf documentation
configure: WARNING: sys/sysinfo.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/sysinfo.h: proceeding with the preprocessor's result
configure: WARNING: sys/sysinfo.h: in the future, the compiler will take precedence
configure: WARNING:     ## -------------------------------- ##
configure: WARNING:     ## Report this to gmp-bugs at swox.com ##
configure: WARNING:     ## -------------------------------- ##
checking for sys/sysinfo.h... yes
...

This fails with gcc 4.0.0 and later because

configure:24719: gcc -c -O2  conftest.c >&5
In file included from conftest.c:71:
/usr/include/sys/sysinfo.h:180: error: array type has incomplete element type
configure:24725: $? = 1

This is line 180:
extern struct syswait syswait[];

Relevant gcc threads:
http://gcc.gnu.org/ml/gcc/2005-02/msg00054.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19333

I'm not what if anything gmp can do about this.  Generating GCC include
fixes would appear to be a major pain.  Besides this one, there seem to
be quite a few other similar occurences in HP-UX 11 headers, particularly
those relevent to the kernel.

Dave
--
J. David Anglin                                  dave.anglin at nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


More information about the gmp-bugs mailing list