NetBSD-Users archive

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

Re: Corosync on NetBSD



Hi,

On Fri, Sep 17, 2010 at 11: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 */
>> Â Â Â Â };

To me it seems that we should add this to sem.h. See [1]

>> =>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?

These calls were added by FreeBSD guys in this commit [2]. To me it
seems that we can ignore those calls as we do not specify anything
like that in our mmap/madvise manual pages. Have you tried to run it
with gdb ?

>> =>exec/coroipcs.c
>> -Once more the madvise() issue.
>> -And once more a missing semun union.
>>




[1] http://www.opengroup.org/onlinepubs/000095399/functions/semctl.html
[2] 
http://www.mail-archive.com/openais%lists.linux-foundation.org@localhost/msg02767.html

-- 


Regards.

Adam


Home | Main Index | Thread Index | Old Index