Bug 3314 - configure: sys/mode.h
configure: sys/mode.h
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.21
SGI IRIX
: P3 normal
: none
Assigned To: Tim Potter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-11 10:52 UTC by Jason Mader
Modified: 2006-02-13 17:15 UTC (History)
0 users

See Also:


Attachments
patch to illustrate cause of configure message on IRIX (404 bytes, patch)
2006-02-13 17:15 UTC, John Jorgensen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mader 2005-12-11 10:52:06 UTC
configure:7910: cc -c -O -D_SAMBA_BUILD_  conftest.c >&5
cc-1204 cc: WARNING File = /usr/include/sys/vnode.h, Line = 332
  The indicated declaration is not visible outside of the function.

  typedef       int     (*vop_read_t)(bhv_desc_t *, struct uio *, int, struct cred *,
                                                           ^

cc-1204 cc: WARNING File = /usr/include/sys/vnode.h, Line = 334
  The indicated declaration is not visible outside of the function.

  typedef       int     (*vop_write_t)(bhv_desc_t *, struct uio *, int, struct cred *,
                                                            ^

cc-1204 cc: WARNING File = /usr/include/sys/vnode.h, Line = 356
  The indicated declaration is not visible outside of the function.

  typedef       int     (*vop_readdir_t)(bhv_desc_t *, struct uio *, struct cred *,
                                                              ^

cc-1204 cc: WARNING File = /usr/include/sys/vnode.h, Line = 360
  The indicated declaration is not visible outside of the function.

  typedef       int     (*vop_readlink_t)(bhv_desc_t *, struct uio *, struct cred *);
                                                               ^

cc-1020 cc: ERROR File = /usr/include/sys/vnode.h, Line = 375
  The identifier "mprot_t" is undefined.

  typedef       int     (*vop_map_t)(bhv_desc_t *, off_t, size_t, mprot_t, u_int,
                                                                  ^

cc-1020 cc: ERROR File = /usr/include/sys/vnode.h, Line = 378
  The identifier "mprot_t" is undefined.

                                pgno_t *, off_t, size_t, mprot_t,
                                                         ^

2 errors detected in the compilation of "conftest.c".
Comment 1 Jason Mader 2005-12-11 10:53:27 UTC
configure:7916: $? = 2
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define HAVE_VOLATILE 1
| #include <standards.h>
| #define SYSV 1
| #ifndef __cplusplus
| #define inline __inline
| #endif
| #define STDC_HEADERS 1
| #define HAVE_DIRENT_H 1
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_SYS_WAIT_H 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_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_AIO_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_SYS_FCNTL_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_UNISTD_H 1
| #define HAVE_RPC_NETTYPE_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_GRP_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_RPC_RPC_H 1
| #define HAVE_RPCSVC_YPCLNT_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_CTYPE_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_SYS_PRCTL_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_FILIO_H 1
| #define HAVE_SYS_SHM_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_TERMIO_H 1
| #define HAVE_SYS_TERMIO_H 1
| #define HAVE_SYS_STATFS_H 1
| #define HAVE_SYS_STATVFS_H 1
| #define HAVE_STDARG_H 1
| #define HAVE_SYS_SOCKIO_H 1
| #define HAVE_SYS_SYSMACROS_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_SYS_SYSLOG_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_LANGINFO_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_RPCSVC_YP_PROT_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/mode.h>
configure:7939: result: no
configure:7943: checking sys/mode.h presence
configure:7953: cc -E  conftest.c
configure:7959: $? = 0
configure:7979: result: yes
configure:7992: WARNING: sys/mode.h: present but cannot be compiled
configure:7994: WARNING: sys/mode.h:     check for missing prerequisite headers?
configure:7996: WARNING: sys/mode.h: see the Autoconf documentation
configure:7998: WARNING: sys/mode.h:     section "Present But Cannot Be Compiled"
configure:8000: WARNING: sys/mode.h: proceeding with the preprocessor's result
configure:8002: WARNING: sys/mode.h: in the future, the compiler will take precedence
Comment 2 Jason Mader 2005-12-11 10:55:56 UTC
checking sys/mode.h usability... no
checking sys/mode.h presence... yes
configure: WARNING: sys/mode.h: present but cannot be compiled
configure: WARNING: sys/mode.h:     check for missing prerequisite headers?
configure: WARNING: sys/mode.h: see the Autoconf documentation
configure: WARNING: sys/mode.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/mode.h: proceeding with the preprocessor's result
configure: WARNING: sys/mode.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING:     ## ------------------------------------------ ##
checking for sys/mode.h... yes
Comment 3 Jason Mader 2005-12-21 11:31:37 UTC
Still a problem in 3.0.21 final.
Comment 4 John Jorgensen 2006-02-13 17:15:30 UTC
Created attachment 1725 [details]
patch to illustrate cause of configure message on IRIX

I observed the same message when trying to configure rsync-2.6.6 on an Onyx 2 running IRIX 6.5.26f. 

The problem is that IRIX's sys/mode.h includes sys/vnode.h, which includes a 
function prototype with mprot_t as one of its parameter types. mprot_t is defined
in sys/types.h, but the definition is within an 

#ifdef defined(_KERNEL) || defined(_STANDALONE) || (defined_KMEMUSER)

I've attached a patch that defines _KMEMUSER to illustrate that doing so makes
the error message go away, but the patch won't be directly applicable, since it is against configure rather than configure.in (and I'm not sure this is the right fix anyway; I just wanted to show clearly what is going on).