Hi,
i saw Corosync supports "BSD". Not knowing which BSD was meant here, I tried
to compile it on NetBSD 5.0.2. There were some issues with Corosync 1.2.8;
in particular:
=> lib/coroipcc.c
-There are some "#ifdef COROSYNC_BSD" statements which include some
madvise() calls. There is a MADV_NOSYNC flag being used which is only
available on FreeBSD. I commented these lines out.
-There is a "semun" union requiered which is not defined in "sys/sem.h" on
NetBSD, in contrast to FreeBSD. I had to add it to this file:
union semun {
int val; /* value for SETVAL */
struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
u_short *array; /* array for GETALL & SETALL */
};
=>exec/totemip.c
-There is an #include for <net/if_var.h>. This file is not present on
NetBSD, so I just dropped that.
=>exec/logsys.c
-The same problem with madvise() and MADV_NOSYNC.
=>exec/coroipcs.c
-Once more the madvise() issue.
-And once more a missing semun union.
=>include/corosync/totem/totemip.h
-The compiler complained about uint16_t here (line 81). Adding an #include
for <sys/types.h> made this work.
=>lib/Makefile and exec/Makefile
-Both files contain "$(CP) -a" statements which should only work with GNU cp
AFAIK. As a first attempt I changed that to "-p".
=>Build environment:
-One needs to install GNU make und GNU groff, e.g. from pkgsrc (as I did).
GNU groff 1.19.2 is also available on NetBSD, but that fails.
After compiling and installing Corosync, I got a problem when just using the
sample config file:
# ./corosync
parse error in config: .
I had to drop the "logging" and "amf" part in order to start corosync. The
problem then is that Corosync eats 100% CPU and is not controllable for
example via corosync-cfgtool.
Help is appreciated :)
Regards,
Stephan
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais