On Fri 2012.04.13 at 23:24 +0200, Martijn Rijkeboer wrote:
> Hello,
> 
> I'm trying to make a port for cfengine 3.3.0. The configure finishes
> without errors,

... but you need to read config.log!

>                  but the make stage quits with the following error:
> 
> libtool: compile:  cc -DHAVE_CONFIG_H -I. -I/usr/local/include -std=gnu99
> -g -Wall -Wno-pointer-sign -Werror=implicit-function-declaration -pthread
> -O2 -pipe -I/include -O2 -DNDEBUG -pthread -O2 -pipe -I/include -O2
> -DNDEBUG -MT libpromises_la-cf3parse.lo -MD -MP -MF
> .deps/libpromises_la-cf3parse.Tpo -c cf3parse.c
> -o libpromises_la-cf3parse.o
> In file included from cf3.defs.h:34,
>                  from cf3parse.y:10:
> cf.defs.h:303: error: conflicting types for 'socklen_t'
> /usr/include/sys/types.h:163: error: previous declaration of 'socklen_t'
> was here
> 
> 
> The file cf.defs.h contains the following code (line 302-304):
> 
> #ifndef HAVE_SOCKLEN_T
> typedef int socklen_t;
> #endif
> 
> Apparently HAVE_SOCKLEN_T is not defined, but should be. What is the
> recommended way to handle this?

The configure script is missing sys/types.h and incorrectly (not)
defining HAVE_SOCKLEN_T.

$OpenBSD$
--- configure.orig      Fri Apr 13 18:01:26 2012
+++ configure   Fri Apr 13 18:02:03 2012
@@ -15485,7 +15485,9 @@ _ACEOF
 
 fi
 
-ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include 
<sys/socket.h>
+ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
+#include <sys/types.h>
+#include <sys/socket.h>
 "
 if test "x$ac_cv_type_socklen_t" = xyes; then :

I don't have box that can build cfengine right in front of me right now,
but I know I've got mostly working ports of cfengine3 in various stages
scattered across a few places.  Time to find and merge them I guess :)
(and hope the patches I sent upstream got integrated)

Let me know of other issues while I get my stuff together...

Cheers,
Okan

Reply via email to