bug-autoconf
[Top][All Lists]
Advanced

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

Re: present but cannot be compiled (Was: Bug)


From: Akim Demaille
Subject: Re: present but cannot be compiled (Was: Bug)
Date: Tue, 06 May 2003 17:44:20 +0200
User-agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux)

Thanks for the bug report!

Unfortunately, the problem comes from the package itself, not from
Autoconf.  The configure.ac script needs to be updated.  Please, send
all this message (which your output attached) to the bug list (or the
authors) of the package you were trying to configure.

Below two parts of the Autoconf documentation are included: 1. the
documentation of AC_CHECK_HEADER(S), and 2. what's to be done to
upgrade configure.ac.

Thanks!

----------------------------------------------------------------------

Generic Header Checks
---------------------

   These macros are used to find system header files not covered by the
"particular" test macros.  If you need to check the contents of a header
as well as find out whether it is present, you have to write your own
test for it (*note Writing Tests::).

 - Macro: AC_CHECK_HEADER (HEADER-FILE, [ACTION-IF-FOUND],
          [ACTION-IF-NOT-FOUND], [INCLUDES = `default-includes'])
     If the system header file HEADER-FILE is compilable, execute shell
     commands ACTION-IF-FOUND, otherwise execute ACTION-IF-NOT-FOUND.
     If you just want to define a symbol if the header file is
     available, consider using `AC_CHECK_HEADERS' instead.

     For compatibility issues with older versions of Autoconf, please
     read below.

 - Macro: AC_CHECK_HEADERS (HEADER-FILE..., [ACTION-IF-FOUND],
          [ACTION-IF-NOT-FOUND], [INCLUDES = `default-includes'])
     For each given system header file HEADER-FILE in the
     whitespace-separated argument list that exists, define
     `HAVE_HEADER-FILE' (in all capitals).  If ACTION-IF-FOUND is
     given, it is additional shell code to execute when one of the
     header files is found.  You can give it a value of `break' to
     break out of the loop on the first match.  If ACTION-IF-NOT-FOUND
     is given, it is executed when one of the header files is not found.

     For compatibility issues with older versions of Autoconf, please
     read below.

   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
])

----------------------------------------------------------------------

Header Present But Cannot Be Compiled
=====================================

   The most important guideline to bear in mind when checking for
features is to mimic as much as possible the intended use.
Unfortunately, old versions of `AC_CHECK_HEADER' and `AC_CHECK_HEADERS'
failed to follow this idea, and called the preprocessor, instead of the
compiler, to check for headers.  As a result, incompatibilities between
headers went unnoticed during configuration, and maintainers finally
had to deal with this issue elsewhere.

   As of Autoconf 2.56 both checks are performed, and `configure'
complains loudly if the compiler and the preprocessor do not agree.
For the time being the result used is that of the preprocessor, to give
maintainers time to adjust their `configure.ac', but in the near
future, only the compiler will be considered.

   Consider the following example:

     $ cat number.h
     typedef int number;
     $ cat pi.h
     const number pi = 3;
     $ cat configure.ac
     AC_INIT
     AC_CHECK_HEADERS(pi.h)
     $ autoconf -Wall
     $ ./configure
     checking for gcc... gcc
     checking for C compiler default output... a.out
     checking whether the C compiler works... yes
     checking whether we are cross compiling... no
     checking for suffix of executables...
     checking for suffix of object files... o
     checking whether we are using the GNU C compiler... yes
     checking whether gcc accepts -g... yes
     checking for gcc option to accept ANSI C... none needed
     checking how to run the C preprocessor... gcc -E
     checking for egrep... grep -E
     checking for ANSI C header files... yes
     checking for sys/types.h... yes
     checking for sys/stat.h... yes
     checking for stdlib.h... yes
     checking for string.h... yes
     checking for memory.h... yes
     checking for strings.h... yes
     checking for inttypes.h... yes
     checking for stdint.h... yes
     checking for unistd.h... yes
     checking pi.h usability... no
     checking pi.h presence... yes
     configure: WARNING: pi.h: present but cannot be compiled
     configure: WARNING: pi.h: check for missing prerequisite headers?
     configure: WARNING: pi.h: proceeding with the preprocessor's result
     configure: WARNING:     ## ------------------------------------ ##
     configure: WARNING:     ## Report this to address@hidden ##
     configure: WARNING:     ## ------------------------------------ ##
     checking for pi.h... yes

The proper way the handle this case is using the fourth argument (*note
Generic Headers::):

     $ cat configure.ac
     AC_INIT
     AC_CHECK_HEADERS(number.h pi.h,,,
     [[#if HAVE_NUMBER_H
     # include <number.h>
     #endif
     ]])
     $ autoconf -Wall
     $ ./configure
     checking for gcc... gcc
     checking for C compiler default output... a.out
     checking whether the C compiler works... yes
     checking whether we are cross compiling... no
     checking for suffix of executables...
     checking for suffix of object files... o
     checking whether we are using the GNU C compiler... yes
     checking whether gcc accepts -g... yes
     checking for gcc option to accept ANSI C... none needed
     checking for number.h... yes
     checking for pi.h... yes

   See *Note Particular Headers::, for a list of headers with their
prerequisite.

----------------------------------------------------------------------

Portability of Headers
----------------------

   This section tries to collect knowledge about common headers, and the
problems they cause.  By definition, this list will always require
additions.  Please help us keeping it as complete as possible.

`inttypes.h' vs. `stdint.h'
     Paul Eggert notes that: ISO C 1999 says that `inttypes.h' includes
     `stdint.h', so there's no need to include `stdint.h' separately in
     a standard environment.  Many implementations have `inttypes.h'
     but not `stdint.h' (e.g., Solaris 7), but I don't know of any
     implementation that has `stdint.h' but not `inttypes.h'.  Nor do I
     know of any free software that includes `stdint.h'; `stdint.h'
     seems to be a creation of the committee.

`net/if.h'
     On Darwin, this file requires that `sys/socket.h' be included
     beforehand.  One should run:

          AC_CHECK_HEADERS([sys/socket.h])
          AC_CHECK_HEADERS([net/if.h], [], [],
          [#include <stdio.h>
          #if STDC_HEADERS
          # include <stdlib.h>
          # include <stddef.h>
          #else
          # if HAVE_STDLIB_H
          #  include <stdlib.h>
          # endif
          #endif
          #if HAVE_SYS_SOCKET_H
          # include <sys/socket.h>
          #endif
          ])

`stdlib.h'
     On many systems (e.g., Darwin), `stdio.h' is a prerequisite.

`sys/socket.h'
     On Darwin, `stdlib.h' is a prerequisite.
Cheers,
I had this message while making a ./configure in ayttm-0.3.0:
configure: WARNING: X11/extensions/scrnsaver.h: present but cannot be
compiled
configure: WARNING: X11/extensions/scrnsaver.h: check for missing
prerequisite h
eaders?
configure: WARNING: X11/extensions/scrnsaver.h: proceeding with the
preprocessor
's result
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to address@hidden ##
configure: WARNING:     ## ------------------------------------ ##

It's what I do. Here is the maximum I could save from all the
process. Cheers!


checking for uname... yes
checking for getopt_long... no
checking for getopt... yes
checking for snprintf... yes
checking for ranlib... (cached) ranlib
checking for off_t... yes
checking whether we are using the GNU C Library 2.1 or newer... no
checking for argz.h... (cached) no
checking for limits.h... (cached) yes
checking for locale.h... (cached) yes
checking nl_types.h usability... yes
checking nl_types.h presence... yes
checking for nl_types.h... yes
checking for malloc.h... (cached) yes
checking for stddef.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for feof_unlocked... no
checking for fgets_unlocked... no
checking for getcwd... (cached) yes
checking for getegid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getuid... yes
checking for mempcpy... (cached) no
checking for munmap... (cached) yes
checking for putenv... yes
checking for setenv... no
checking for setlocale... (cached) yes
checking for stpcpy... (cached) no
checking for strchr... (cached) yes
checking for strcasecmp... (cached) yes
checking for strdup... (cached) yes
checking for strtoul... (cached) yes
checking for tsearch... yes
checking for __argz_count... (cached) no
checking for __argz_stringify... (cached) no
checking for __argz_next... (cached) no
checking for iconv... yes
checking for iconv declaration...
          extern size_t iconv (iconv_t cd, const char * *inbuf, size_t
*inbytesle
ft, char * *outbuf, size_t *outbytesleft);
checking for nl_langinfo and CODESET... yes
checking for LC_MESSAGES... yes
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for libintl.h... (cached) yes
checking for GNU gettext in libc... no
checking for GNU gettext in libintl... no
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... /usr/local/bin/xgettext
checking for bison... bison
checking version of bison... 1.25, bad
checking for catalogs to be installed...  fr en_GB
checking how to include pthread...
checking for -lpthread compiler option... yes
checking for library containing libiconv_open... no
checking for ispell... yes
checking for gdb... yes
checking whether to use crash dialog... yes
checking whether we want ESD support...
checking for esd-config... /soft/local/bin/esd-config
checking for ESD - version >= 0.2.7... no
*** Could not run ESD test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding ESD or finding the wrong
*** version of ESD. If it is not finding ESD, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location  Also, make sure you have run ldconfig if that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying LD_LIBRARY_PATH
checking for artsc-config... no
checking for ARTS... cannot find artsc_config; you must provide
--with-arts-pref
ix
no  - user override
checking for glib-config... /usr/local/bin/glib-config
checking for GLIB - version >= 1.2.0... yes
checking for gtk-config... /usr/local/bin/gtk-config
checking for GTK - version >= 1.2.0... yes
checking for gdk-pixbuf-config... no
checking for GDK_PIXBUF - version >= 0.2.5... no
*** The gdk-pixbuf-config script installed by GDK_PIXBUF could not be found
*** If GDK_PIXBUF was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GDK_PIXBUF_CONFIG environment variable to the
*** full path to gdk-pixbuf-config.
configure: WARNING: Unable to find gdk-pixbuf-devel, you won't be able
to view w
ebcams
checking X11/extensions/scrnsaver.h usability... no
checking X11/extensions/scrnsaver.h presence... yes
configure: WARNING: X11/extensions/scrnsaver.h: present but cannot be
compiled
configure: WARNING: X11/extensions/scrnsaver.h: check for missing
prerequisite h
eaders?
configure: WARNING: X11/extensions/scrnsaver.h: proceeding with the
preprocessor
's result
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to address@hidden ##
configure: WARNING:     ## ------------------------------------ ##
checking for X11/extensions/scrnsaver.h... yes
checking for XScreenSaverRegister in -lXext... no
checking for XScreenSaverRegister in -lXExExt... no
checking for XScreenSaverRegister in -lXss... no
checking for gethostent in -lnsl... yes
checking for connect... (cached) no
checking for connect in -lsocket... (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating ayttm.spec
config.status: creating doc/Makefile
config.status: creating intl/Makefile
config.status: creating libproxy/Makefile
config.status: creating po/Makefile.in
config.status: creating m4/Makefile
config.status: creating modules/Makefile
config.status: creating modules/aim-toc/Makefile
config.status: creating modules/aim-toc/libtoc/Makefile
config.status: creating modules/icq-toc/Makefile
config.status: creating modules/icq-toc/libtoc/Makefile
config.status: creating modules/aim-oscar/Makefile
config.status: creating modules/aim-oscar/libfaim/Makefile
config.status: creating modules/icq/Makefile
config.status: creating modules/icq/libicq/Makefile
config.status: creating modules/importers/Makefile
config.status: creating modules/irc/Makefile
config.status: creating modules/jabber/Makefile
config.status: creating modules/jabber/libjabber/Makefile
config.status: creating modules/jabber/libjabber/include/Makefile
config.status: creating modules/jabber/libjabber/include/jabber/Makefile
config.status: creating modules/jabber/libxode/Makefile
config.status: creating modules/jabber/libxode/include/Makefile
config.status: creating modules/msn2/Makefile
config.status: creating modules/msn2/libmsn2/Makefile
config.status: creating modules/utility/Makefile
config.status: creating modules/yahoo2/Makefile
config.status: creating modules/yahoo2/libyahoo2/Makefile
config.status: creating modules/workwizu/Makefile
config.status: creating pixmaps/Makefile
config.status: creating sounds/Makefile
config.status: creating src/Makefile
config.status: creating src/gtk/Makefile
config.status: creating mingw32/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing default-2 commands
config.status: creating po/POTFILES
config.status: creating po/Makefile








reply via email to

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