bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

present but cannot be compiled (Was: spurious request to report bug?)


From: Akim Demaille
Subject: present but cannot be compiled (Was: spurious request to report bug?)
Date: Wed, 26 Feb 2003 11:30:03 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2


Please, report this to the package maintainers, as it's a configure.ac
problem.  The Autoconf 2.57 doc says:

      Previous versions of Autoconf merely checked whether the header was
   accepted by the preprocessor.  This was changed because the old test was
   inappropriate for typical uses.  Headers are typically used to compile,
   not merely to preprocess, and the old behavior sometimes accepted
   headers that clashed at compile-time.  If you need to check whether a
   header is preprocessable, you can use `AC_PREPROC_IFELSE' (*note
   Running the Preprocessor::).
   
      This scheme, which improves the robustness of the test, also requires
   that you make sure that headers that must be included before the
   HEADER-FILE be part of the INCLUDES, (*note Default Includes::).  If
   looking for `bar.h', which requires that `foo.h' be included before if
   it exists, we suggest the following scheme:
   
   
   AC_CHECK_HEADERS([foo.h])
   AC_CHECK_HEADERS([bar.h], [], [],
   [#if HAVE_FOO_H
   # include <foo.h>
   # endif
   ])

Thanks!

| When configuring the current Emacs source on SunOS 4.1.4 with the
| bundled cc, configure says this from an AC_CHECK_HEADERS check for
| sys/resource.h done with autoconf 2.57:
| 
|   checking sys/resource.h usability... no
|   checking sys/resource.h presence... yes
|   configure: WARNING: sys/resource.h: present but cannot be compiled
|   configure: WARNING: sys/resource.h: check for missing prerequisite headers?
|   configure: WARNING: sys/resource.h: proceeding with the preprocessor's 
result
|   configure: WARNING:     ## ------------------------------------ ##
|   configure: WARNING:     ## Report this to address@hidden ##
|   configure: WARNING:     ## ------------------------------------ ##
|   checking for sys/resource.h... yes
| 
| I'm surprised it says to report a bug against autoconf.  (I'll fix the
| issue in Emacs by using sys/time.h.)  The relevant config.log fragment
| is:
| 
|   configure:5166: checking sys/resource.h usability
|   configure:5166: cc -c -g     conftest.c >&5
|   "/usr/include/sys/resource.h", line 25: undefined structure or union
|   "/usr/include/sys/resource.h", line 26: undefined structure or union
|   "/usr/include/sys/resource.h", line 43: undefined structure or union
|   "/usr/include/sys/resource.h", line 43: undefined structure or union
|   "/usr/include/sys/resource.h", line 43: undefined structure or union
|   "/usr/include/sys/resource.h", line 43: undefined structure or union
|   configure:5166: $? = 1
|   configure: failed program was:
|   | #line 5166 "configure"
|   | /* confdefs.h.  */
|   | 
|   | #define PACKAGE_NAME ""
|   | #define PACKAGE_TARNAME ""
|   | #define PACKAGE_VERSION ""
|   | #define PACKAGE_STRING ""
|   | #define PACKAGE_BUGREPORT ""
|   | #define MAIL_USE_POP 1
|   | #define _GNU_SOURCE 1
|   | #define HAVE_SYS_TYPES_H 1
|   | #define HAVE_SYS_STAT_H 1
|   | #define HAVE_STDLIB_H 1
|   | #define HAVE_STRING_H 1
|   | #define HAVE_MEMORY_H 1
|   | #define HAVE_STRINGS_H 1
|   | #define HAVE_UNISTD_H 1
|   | #define HAVE_SYS_TIMEB_H 1
|   | #define HAVE_SYS_TIME_H 1
|   | #define HAVE_UNISTD_H 1
|   | #define HAVE_UTIME_H 1
|   | #define HAVE_TERMIOS_H 1
|   | #define HAVE_LIMITS_H 1
|   | #define HAVE_STRING_H 1
|   | #define HAVE_STDLIB_H 1
|   | #define HAVE_FCNTL_H 1
|   | #define HAVE_STRINGS_H 1
|   | #define HAVE_SYS_MMAN_H 1
|   | #define HAVE_SYS_PARAM_H 1
|   | #define HAVE_SYS_VLIMIT_H 1
|   | /* end confdefs.h.  */
|   | #include <stdio.h>
|   | #if HAVE_SYS_TYPES_H
|   | # include <sys/types.h>
|   | #endif
|   | #if HAVE_SYS_STAT_H
|   | # include <sys/stat.h>
|   | #endif
|   | #if STDC_HEADERS
|   | # include <stdlib.h>
|   | # include <stddef.h>
|   | #else
|   | # if HAVE_STDLIB_H
|   | #  include <stdlib.h>
|   | # endif
|   | #endif
|   | #if HAVE_STRING_H
|   | # if !STDC_HEADERS && HAVE_MEMORY_H
|   | #  include <memory.h>
|   | # endif
|   | # include <string.h>
|   | #endif
|   | #if HAVE_STRINGS_H
|   | # include <strings.h>
|   | #endif
|   | #if HAVE_INTTYPES_H
|   | # include <inttypes.h>
|   | #else
|   | # if HAVE_STDINT_H
|   | #  include <stdint.h>
|   | # endif
|   | #endif
|   | #if HAVE_UNISTD_H
|   | # include <unistd.h>
|   | #endif
|   | #include <sys/resource.h>
|   configure:5166: result: no
|   configure:5166: checking sys/resource.h presence
|   configure:5166: /usr/lib/cpp    conftest.c
|   configure:5166: $? = 0
|   configure:5166: result: yes
|   configure:5166: WARNING: sys/resource.h: present but cannot be compiled
|   configure:5166: WARNING: sys/resource.h: check for missing prerequisite 
headers?
|   configure:5166: WARNING: sys/resource.h: proceeding with the preprocessor's 
result
|   configure:5166: checking for sys/resource.h
|   configure:5166: result: yes
| 
| 
| 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]