[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#765365: corosync: FTBFS on hurd-i386



Hi!

On Tue, 2014-10-14 at 15:31:30 +0200, Svante Signell wrote:
> Source: corosync
> Version: 1.4.6-1.1
> Severity: important
> Tags: patch
> User: debian-hurd@lists.debian.org
> Usertags: hurd

> Currently corosync FTBFS for GNU/Hurd due to missing OS support. The
> attached patch adds support for GNU/Hurd by adding a COROSYNC_GNU entry
> in configure.ac, add COROSYNC_GNU entries in exec/totemip.c and use
> _POSIX_PIPE_BUF as a replacement to PIPE_BUF, since that constant is not
> defined on Hurd.

W/o having checked the actual source, with more context, it seems to
me this is possibly problematic:

> Index: corosync-1.4.6/configure.ac
> ===================================================================
> --- corosync-1.4.6.orig/configure.ac
> +++ corosync-1.4.6/configure.ac
> @@ -342,6 +342,17 @@ case "$host_os" in
>  		DARWIN_OPTS=""
>  		SOLARIS_OPTS=" "
>  	;;
> +	*gnu*)
> +		AC_DEFINE_UNQUOTED([COROSYNC_GNU], [1],
> +				   [Compiling for GNU/Hurd platform])
> +		AC_DEFINE_UNQUOTED([PATH_MAX], [4096],
> +				   [Number of chars in a path name including nul])
> +		OS_CFLAGS=""
> +		OS_CPPFLAGS="-D_GNU_SOURCE"
> +		OS_LDFLAGS=""
> +		OS_DYFLAGS="-rdynamic"
> +		DARWIN_OPTS=""
> +	;;

This catches any *gnu* system including linux-gnu, but I assume that
was already matched upwards, as there's usage of COROSYNC_LINUX in the
code below? Which means…

>  	*)
>  		AC_MSG_ERROR([Unsupported OS? hmmmm])
>  	;;
> Index: corosync-1.4.6/exec/totemip.c
> ===================================================================
> --- corosync-1.4.6.orig/exec/totemip.c
> +++ corosync-1.4.6/exec/totemip.c
> @@ -65,11 +65,15 @@
>  #include <unistd.h>
>  
>  #if defined(COROSYNC_LINUX)
> -#include <net/if.h>
>  #include <asm/types.h>
>  #include <linux/rtnetlink.h>
>  #endif
>  
> +#if defined(COROSYNC_GNU)
> +#include <net/if.h>
> +#include <ifaddrs.h>
> +#endif

… this change would break on COROSYNC_LINUX as there COROSYNC_GNU would
not be defined? Did you try bulding this on GNU/Linux?

>  #include <corosync/totem/totemip.h>
>  #include <corosync/swab.h>
>  

Thanks,
Guillem


Reply to: