You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by chiggsy <ch...@sockedfeet.com> on 2003/09/20 21:10:54 UTC

problem building apr on darwin

Hello all,
	I am having a problem building apr on darwin.

I am using :
darwin 7.0.0
gcc 3.3
  and here is the error i get :

poll.c: In function `apr_poll':
poll.c:126: error: storage size of `pollset' isn't known
poll.c: In function `apr_pollset_create':
poll.c:353: error: invalid application of `sizeof' to an incomplete type
poll.c: In function `apr_pollset_add':
poll.c:392: error: invalid use of undefined type `struct pollfd'
poll.c:392: error: dereferencing pointer to incomplete type
poll.c:395: error: invalid use of undefined type `struct pollfd'
poll.c:395: error: dereferencing pointer to incomplete type
poll.c:398: error: invalid use of undefined type `struct pollfd'
poll.c:398: error: dereferencing pointer to incomplete type
poll.c: In function `apr_pollset_remove':
poll.c:468: error: invalid use of undefined type `struct pollfd'
poll.c:468: error: dereferencing pointer to incomplete type
poll.c:468: error: invalid use of undefined type `struct pollfd'
poll.c:468: error: dereferencing pointer to incomplete type
poll.c: In function `apr_pollset_poll':
poll.c:540: error: invalid use of undefined type `struct pollfd'
poll.c:540: error: dereferencing pointer to incomplete type
poll.c:543: error: invalid use of undefined type `struct pollfd'
poll.c:543: error: dereferencing pointer to incomplete type
make[2]: *** [poll.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

has anyone else seen this problem ?


Re: problem building apr on darwin

Posted by Jeff Trawick <tr...@attglobal.net>.
chiggsy wrote:

> Hello all,
>     I am having a problem building apr on darwin.
> 
> I am using :
> darwin 7.0.0
> gcc 3.3
>  and here is the error i get :
> 
> poll.c: In function `apr_poll':
> poll.c:126: error: storage size of `pollset' isn't known

problem was caused by finding poll() but no header file with definitions 
necessary for poll

attached is one possible patch to play with that causes apr to refuse to 
use poll unless we have the required definitions

it would be better to make sure we have the appropriate definitions 
first, and only then check for poll()...  that way HAVE_POLL is set properly

so this patch is just to incite someone to reaffirm that they have 
enough pride (not to mention time) to do it the right way :)


Re: problem building apr on darwin

Posted by chiggsy <ch...@sockedfeet.com>.
Jeff,

i grepped the configure script for poll and got this ...

./configure --enable-layout=Darwin |grep poll
checking for poll... yes
checking poll.h usability... no
checking poll.h presence... no
checking for poll.h... no
checking sys/poll.h usability... no
checking sys/poll.h presence... no
checking for sys/poll.h... no
checking for POLLIN in poll.h sys/poll.h... no
config.status: creating poll/unix/Makefile

i ran your grep line and got this:

grep POLL include/arch/unix/apr_private.h
#define HAVE_POLL 1
/* Define if POLLIN is defined */
/* #undef HAVE_POLLIN */
/* #undef HAVE_POLL_H */
/* #undef HAVE_SYS_POLL_H */

is there a solution for this?  (pls say yes :D )


Re: problem building apr on darwin

Posted by Jeff Trawick <tr...@attglobal.net>.
chiggsy wrote:

> Hello all,
>     I am having a problem building apr on darwin.
> 
> I am using :
> darwin 7.0.0
> gcc 3.3
>  and here is the error i get :
> 
> poll.c: In function `apr_poll':
> poll.c:126: error: storage size of `pollset' isn't known

Does configure think it has found poll() but not poll.h?

On darwin 6.6 there is no poll.h and no poll() either

% grep POLL include/arch/unix/apr_private.h
/* #undef HAVE_POLL */
/* Define if POLLIN is defined */
/* #undef HAVE_POLLIN */
/* #undef HAVE_POLL_H */
/* #undef HAVE_SYS_POLL_H */