NetBSD-Users archive

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

Re: Corosync on NetBSD



On Fri, Sep 17, 2010 at 10:51 AM, Adam Hoka <adam.hoka%gmail.com@localhost> 
wrote:

> On Thu, 16 Sep 2010 09:14:01 +0200
> Stephan Wiebusch <stephanwib%googlemail.com@localhost> wrote:
>
> > Hi,
> >
> > I tried to make the Corosync 1.2.8 cluster software work on NetBSD 5.0.2.
> > There were some issues to fix in the source and make files. One can
> compile
> > and run it then. Unfortunately it doesn_t do anything except eating 100%
> > CPU. I sent a list with the build issues to the Corosync mailing list, as
> > there were:
> >
> >
> >
> > => 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.
>
> Are you sure, that the code will do the same after that?
>

The code looks like this:

#ifdef COROSYNC_BSD
        //madvise(addr_orig, bytes, MADV_NOSYNC);
#endif

So for now its only included when you build on FreeBSD as that´s the only
platform which has this MADV_NOSYNC option. I assume this has no functional
impact.


>
> > =>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.
>
> uint16_t should be included with <stdint.h>
>

This is where you can see I don´t do that every day :)


>
> > =>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.
> >
> >
> >
> >
> > Has anybody else tried this yet?
> >
> > Regards,
> >
> > Stephan
>
>
> --
> NetBSD - Simplicity is prerequisite for reliability


Home | Main Index | Thread Index | Old Index