bug-autoconf
[Top][All Lists]
Advanced

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

[sr #110393] Unconditional include of stdio.h should be avoided


From: anonymous
Subject: [sr #110393] Unconditional include of stdio.h should be avoided
Date: Sun, 6 Dec 2020 06:39:28 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

URL:
  <https://savannah.gnu.org/support/?110393>

                 Summary: Unconditional include of stdio.h should be avoided
                 Project: Autoconf
            Submitted by: None
            Submitted on: Sun 06 Dec 2020 11:39:26 AM UTC
                Category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: kotovalexarian@gmail.com
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None

    _______________________________________________________

Details:

I'm building my library with cross-compiler without stdlib, so only several
headers are present (stdbool.h, stddef.h, stdarg.h, etc). Header stdio.h is
not present. However, it's used unconditionally in AC_CHECK_HEADER_STDBOOL and
AC_CHECK_HEADERS, so I receive the following output:

> checking for _Bool... no
> checking stddef.h usability... no
> checking stddef.h presence... yes
> configure: WARNING: stddef.h: present but cannot be compiled
> configure: WARNING: stddef.h:     check for missing prerequisite headers?
> configure: WARNING: stddef.h: see the Autoconf documentation
> configure: WARNING: stddef.h:     section "Present But Cannot Be Compiled"
> configure: WARNING: stddef.h: proceeding with the compiler's result
> configure: WARNING:     ##
------------------------------------------------------------ ##
> configure: WARNING:     ## Report this to
https://github.com/kernelmq/libkernaux/issues ##
> configure: WARNING:     ##
------------------------------------------------------------ ##
> checking for stddef.h... no

config.log explains why checks fail:

> configure:5777: checking for _Bool
> configure:5777:
/home/kotovalexarian/repos/github/kernelmq/kernelmq/vendor/crosscompiler/bin/i686-elf-gcc
-c -ffreestanding -nostdlib -fno-builtin -fno-stack-protector  conftest.c >&5
> conftest.c:16:10: fatal error: stdio.h: No such file or directory
>  #include <stdio.h>
>           ^~~~~~~~~
> compilation terminated.
> configure:5777: $? = 1
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "libkernaux"
> | #define PACKAGE_TARNAME "libkernaux"
> | #define PACKAGE_VERSION "0.0.0"
> | #define PACKAGE_STRING "libkernaux 0.0.0"
> | #define PACKAGE_BUGREPORT "https://github.com/kernelmq/libkernaux/issues";
> | #define PACKAGE_URL "https://github.com/kernelmq/libkernaux";
> | #define ARCH_X86 1
> | #define ENABLE_CMDLINE 1
> | #define ENABLE_CONSOLE 1
> | #define ENABLE_MULTIBOOT2 1
> | #define ENABLE_PFA 1
> | #define PACKAGE "libkernaux"
> | #define VERSION "0.0.0"
> | /* end confdefs.h.  */
> | #include <stdio.h>
> | #ifdef HAVE_SYS_TYPES_H
> | # include <sys/types.h>
> | #endif
> | #ifdef HAVE_SYS_STAT_H
> | # include <sys/stat.h>
> | #endif
> | #ifdef STDC_HEADERS
> | # include <stdlib.h>
> | # include <stddef.h>
> | #else
> | # ifdef HAVE_STDLIB_H
> | #  include <stdlib.h>
> | # endif
> | #endif
> | #ifdef HAVE_STRING_H
> | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
> | #  include <memory.h>
> | # endif
> | # include <string.h>
> | #endif
> | #ifdef HAVE_STRINGS_H
> | # include <strings.h>
> | #endif
> | #ifdef HAVE_INTTYPES_H
> | # include <inttypes.h>
> | #endif
> | #ifdef HAVE_STDINT_H
> | # include <stdint.h>
> | #endif
> | #ifdef HAVE_UNISTD_H
> | # include <unistd.h>
> | #endif
> | int
> | main ()
> | {
> | if (sizeof (_Bool))
> |      return 0;
> |   ;
> |   return 0;
> | }
> configure:5777: result: no



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 06 Dec 2020 11:39:26 AM UTC  Name: config.log  Size: 86KiB   By:
None

<http://savannah.gnu.org/support/download.php?file_id=50408>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110393>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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