bug-patch
[Top][All Lists]
Advanced

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

WARNING: fcntl.h: present but cannot be compiled


From: Jason Gross
Subject: WARNING: fcntl.h: present but cannot be compiled
Date: Wed, 13 May 2020 20:08:37 -0400

When using cygin, if I download cygwin's source package for
patch-2.7.4 and configure with `./configure -prefix "$(pwd)/bin/"
CFLAGS="-I/usr/include"`, I get the error:
configure: WARNING: fcntl.h: present but cannot be compiled
configure: WARNING: fcntl.h:     check for missing prerequisite headers?
configure: WARNING: fcntl.h: see the Autoconf documentation
configure: WARNING: fcntl.h:     section "Present But Cannot Be Compiled"
configure: WARNING: fcntl.h: proceeding with the compiler's result
configure: WARNING:     ## -------------------------------- ##
configure: WARNING:     ## Report this to address@hidden ##
configure: WARNING:     ## -------------------------------- ##

I'm reporting this as requested.

Note that if I don't pass these CFLAGS, then I don't get this warning,
and instead get
checking fcntl.h usability... yes
checking fcntl.h presence... yes
but then I get
x86_64-w64-mingw32-gcc.exe -DHAVE_CONFIG_H -I. -I..  -I../lib -I../lib
-DENABLE_MERGE    -g -O2 -MT safe.o -MD -MP -MF .deps/safe.Tpo -c -o
safe.o safe.c
safe.c:24:10: fatal error: sys/resource.h: No such file or directory
   24 | #include <sys/resource.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:1163: safe.o] Error 1
when building

However, if I do pass these CFLAGS, then I get
make[3]: Entering directory '/cygdrive/d/patch-2.7.4/lib'
  CC       argmatch.o
In file included from argmatch.c:22:
../config.h:1798:15: error: two or more data types in declaration specifiers
 1798 | #define off_t long int
      |               ^~~~
../config.h:1798:20: error: two or more data types in declaration specifiers
 1798 | #define off_t long int
      |                    ^~~
../config.h:1792:16: error: two or more data types in declaration specifiers
 1792 | #define mode_t int
      |                ^~~
/usr/x86_64-w64-mingw32/sys-root/mingw/include/sys/types.h:77:17:
note: in expansion of macro 'mode_t'
   77 | typedef _mode_t mode_t;
      |                 ^~~~~~
In file included from ./sys/types.h:28,
                 from ./stdio.h:58,
                 from argmatch.c:28:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/sys/types.h:77:1:
warning: useless type name in empty declaration
   77 | typedef _mode_t mode_t;
      | ^~~~~~~
make[3]: *** [Makefile:1382: argmatch.o] Error 1
make[3]: Leaving directory '/cygdrive/d/patch-2.7.4/lib'

so overall patch seems to be unbuildable on cygwin.

-Jason



reply via email to

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