You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "James H.Cloos Jr." <cl...@jhcloos.com> on 2003/11/01 09:23:00 UTC

sctp related compile errors

I get this when compiling 2.0.48 via gentoo's ebuild:

 /bin/sh /portage/apache-2.0.48/work/httpd-2.0.48/srclib/apr/libtool \
  --silent --mode=compile gcc -pthread  -march=pentium3 -O2 -pipe -DHAVE_CONFIG_H \
  -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE \
  -I../../include -I../../include/arch/unix -I../../include/arch/unix \
  -c sockopt.c && touch sockopt.lo
 sockopt.c: In function `apr_socket_opt_set':
 sockopt.c:257: error: `SCTP_NODELAY' undeclared (first use in this function)
 sockopt.c:257: error: (Each undeclared identifier is reported only once
 sockopt.c:257: error: for each function it appears in.)
 make[4]: *** [sockopt.lo] Error 1
 make[4]: Leaving directory `/portage/apache-2.0.48/work/httpd-2.0.48/srclib/apr/network_io/unix'
 make[3]: *** [all-recursive] Error 1
 make[3]: Leaving directory `/portage/apache-2.0.48/work/httpd-2.0.48/srclib/apr/network_io/unix'
 make[2]: *** [all-recursive] Error 1
 make[2]: Leaving directory `/portage/apache-2.0.48/work/httpd-2.0.48/srclib/apr'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/portage/apache-2.0.48/work/httpd-2.0.48/srclib'
 make: *** [all-recursive] Error 1

I'm using gcc 3.3.2, glibc 2.3.2, 2.6 kernel.  

sockopt.c includes "apr_arch_networkio.h" from srclib/apr/include/arch/unix,
which does:

#if APR_HAVE_NETINET_SCTP_UIO_H
#include <netinet/sctp_uio.h>
#endif
#if APR_HAVE_NETINET_SCTP_H
#include <netinet/sctp.h>
#endif

but APR_HAVE_NETINET_SCTP_H is getting set to 0 even if I cp the files from
/usr/src/linux/include/net/sctp into the /usr/include tree.  

Any ideas/suggestions on how to get around this?

-JimC


Re: sctp related compile errors (resolved, but see last paragraph)

Posted by Joe Orton <jo...@redhat.com>.
On Sat, Nov 01, 2003 at 10:29:58PM -0500, James H.Cloos Jr. wrote:
> I figured this out shortly after posting ... :(
> 
> What is happening is that something in the latest glibc or kernel
> headers (not linked into /usr/include, but glibc was built against
> the 2.6 kernel and probably grabbed some headers then) convinces apr
> that sctp is supported, even when the lksctp library is not installed.
>
> So I grabbed the latest release from lksctp.sf.net and installed that;
> then apache compiled w/o further complaint.
> 
> So apr's configure needs to do a better job of detecting sctp support
> and turn it off if the necessary defines are not available.

Can you file a bug report on this, and attach the configure and make
output for the failure case?

http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=APR&component=APR

joe

Re: sctp related compile errors (resolved, but see last paragraph)

Posted by "James H.Cloos Jr." <cl...@jhcloos.com>.
I figured this out shortly after posting ... :(

What is happening is that something in the latest glibc or kernel
headers (not linked into /usr/include, but glibc was built against
the 2.6 kernel and probably grabbed some headers then) convinces apr
that sctp is supported, even when the lksctp library is not installed.

So I grabbed the latest release from lksctp.sf.net and installed that;
then apache compiled w/o further complaint.

So apr's configure needs to do a better job of detecting sctp support
and turn it off if the necessary defines are not available.

-JimC