You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Kristis Makris <kr...@asu.edu> on 2007/09/17 21:29:46 UTC

netinet/sctp.h: present but cannot be compiled

Hello,

I'm trying to compile APR-1.2.11 on a 

SunOS enpc364 5.10 Generic_120011-14 sun4u sparc SUNW,Ultra-5_10

and I'm getting the following warning I thought I should report. APR
compiles correctly though.



checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/sctp.h usability... no
checking netinet/sctp.h presence... yes
configure: WARNING: netinet/sctp.h: present but cannot be compiled
configure: WARNING: netinet/sctp.h:     check for missing prerequisite
headers?
configure: WARNING: netinet/sctp.h: see the Autoconf documentation
configure: WARNING: netinet/sctp.h:     section "Present But Cannot Be
Compiled"
configure: WARNING: netinet/sctp.h: proceeding with the preprocessor's
result
configure: WARNING: netinet/sctp.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 netinet/sctp.h... yes
checking netinet/sctp_uio.h usability... no
checking netinet/sctp_uio.h presence... no
checking for netinet/sctp_uio.h... no


Re: netinet/sctp.h: present but cannot be compiled

Posted by Bojan Smojver <bo...@rexursive.com>.
On Mon, 2007-09-17 at 16:57 -0700, Kristis Makris wrote:

> I don't know. But APR_CHECK_SCTP is indeed called, so the results should
> be in the attached config.log.

Seems to be OK:
---------------------------------------
configure:41928: checking whether SCTP is supported
configure:41970: gcc -o conftest -g -O2 -DSOLARIS2=10
-D_POSIX_PTHREAD_SEMANTICS
 -D_REENTRANT -D_LARGEFILE64_SOURCE  conftest.c -luuid -lsendfile -lrt
-lsocket 
-lnsl  -lpthread >&5
configure:41973: $? = 0
configure:41975: ./conftest
configure:41978: $? = 0
configure:41992: result: yes
---------------------------------------

So, I think you can safely ignore the first warning. It is caused by a
bulk test for existence of headers, which doesn't take into account
particulars of compilation requirements. My bet is that APR_CHECK_SCTP
exists precisely to remedy that.

-- 
Bojan


Re: netinet/sctp.h: present but cannot be compiled

Posted by Bojan Smojver <bo...@rexursive.com>.
On Mon, 2007-09-17 at 16:06 -0700, Kristis Makris wrote:

> I see the following. Perhaps I'm missing some headers ?? 

There is a macro called APR_FLAG_HEADERS that checks various headers
(called from configure.in, defined in build/apr_common.m4), which
doesn't seem to be taking into account the fact that one may need to
have additional includes for a header to compile. So, the compilation
fails.

However, there is another macro, APR_CHECK_SCTP (defined in
build/apr_network.m4) which is called later in configure.in. Maybe we
should be calling AC_CHECK_HEADERS here instead, with correct includes
this time. Does anyone have a comment on this?

Anyhow, does that second check for SCTP work for you?

-- 
Bojan


Re: netinet/sctp.h: present but cannot be compiled

Posted by Kristis Makris <kr...@asu.edu>.
Hi Bojan,

I see the following. Perhaps I'm missing some headers ?? 


configure:32177: checking netinet/sctp.h usability
configure:32189: gcc -c -g -O2 -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT -D_LARGEFILE64_SOURCE conftest.c >&5
In file included from conftest.c:149:
/usr/include/netinet/sctp.h:224: error: field `spc_aaddr' has incomplete
type
/usr/include/netinet/sctp.h:363: error: field `spinfo_address' has
incomplete type
/usr/include/netinet/sctp.h:381: error: field `spp_address' has
incomplete type
/usr/include/netinet/sctp.h:394: error: field `sspp_addr' has incomplete
type
/usr/include/netinet/sctp.h:405: error: field `ssp_addr' has incomplete
type
/usr/include/netinet/sctp.h:505: error: syntax error before "socklen_t"
/usr/include/netinet/sctp.h:508: error: syntax error before "socklen_t"
/usr/include/netinet/sctp.h:512: error: syntax error before "socklen_t"
/usr/include/netinet/sctp.h:704: error: syntax error before "ipaddr_t"
/usr/include/netinet/sctp.h:711: error: syntax error before "in6_addr_t"
configure:32195: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 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_DLFCN_H 1
| #ifdef __cplusplus
| extern "C" void std::exit (int) throw (); using std::exit;
| #endif
| #define HAVE_PTHREAD_H 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1
| #define HAVE_PTHREAD_KEY_DELETE 1
| #define HAVE_PTHREAD_RWLOCK_INIT 1
| #define HAVE_PTHREAD_ATTR_SETGUARDSIZE 1
| #define HAVE_PTHREAD_RWLOCKS 1
| #define HAVE_GETHOSTBYNAME_R 1
| #define HAVE_GETHOSTBYADDR_R 1
| #define HAVE_SIGSUSPEND 1
| #define HAVE_SIGWAIT 1
| #define HAVE_POLL 1
| #define HAVE_PORT_CREATE 1
| #define HAVE_GETPWNAM_R 1
| #define HAVE_GETPWUID_R 1
| #define HAVE_GETGRNAM_R 1
| #define HAVE_GETGRGID_R 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_SYS_MUTEX_H 1
| #define HAVE_SYS_SHM_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_MMAP 1
| #define HAVE_MUNMAP 1
| #define HAVE_SHM_OPEN 1
| #define HAVE_SHM_UNLINK 1
| #define HAVE_SHMGET 1
| #define HAVE_SHMAT 1
| #define HAVE_SHMDT 1
| #define HAVE_SHMCTL 1
| #define HAVE_MAP_ANON 1
| #define anonymous shared memory allocation method 1
| #define USE_SHMEM_MMAP_ANON 1
| #define namebased memory allocation method 1
| #define USE_SHMEM_SHMGET 1
| #define HAVE_CALLOC 1
| #define HAVE_SETSID 1
| #define HAVE_ISNAN 1
| #define HAVE_GETENV 1
| #define HAVE_PUTENV 1
| #define HAVE_SETENV 1
| #define HAVE_UNSETENV 1
| #define HAVE_WRITEV 1
| #define HAVE_UTIME 1
| #define HAVE_UTIMES 1
| #define HAVE_SETRLIMIT 1
| #define HAVE_GETRLIMIT 1
| #define HAVE_LIBSENDFILE 1
| #define HAVE_SENDFILE 1
| #define HAVE_SENDFILEV 1
| #define HAVE_SIGACTION 1
| #define HAVE_DECL_SYS_SIGLIST 0
| #define HAVE_FORK 1
| #define HAVE_STRERROR_R 1
| #define STRERROR_R_RC_INT 1
| #define HAVE_MMAP 1
| #define HAVE_MEMMOVE 1
| #define HAVE_GETPASS 1
| #define HAVE_GETPASSPHRASE 1
| #define HAVE_GMTIME_R 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_MKSTEMP 1
| #define DIRENT_INODE d_ino
| #define STDC_HEADERS 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_CRYPT_H 1
| #define HAVE_CTYPE_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_GRP_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_POLL_H 1
| #define HAVE_PWD_H 1
| #define HAVE_SEMAPHORE_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_STDARG_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_TIME_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_NETINET_IN_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 <netinet/sctp.h>
configure:32218: result: no



On Tue, 2007-09-18 at 07:14 +1000, Bojan Smojver wrote:
> On Mon, 2007-09-17 at 12:29 -0700, Kristis Makris wrote:
> 
> > checking netinet/sctp.h usability... no
> 
> Can you have a look in config.log to see what actually happened at the
> above points of configuration? There will be some output about what
> failed exactly.
> 

Re: netinet/sctp.h: present but cannot be compiled

Posted by Bojan Smojver <bo...@rexursive.com>.
On Mon, 2007-09-17 at 12:29 -0700, Kristis Makris wrote:

> checking netinet/sctp.h usability... no

Can you have a look in config.log to see what actually happened at the
above points of configuration? There will be some output about what
failed exactly.

-- 
Bojan