Re: Solaris compilation

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

 



On 11/15/2011 10:18 AM, Juan Carlos Franzoy wrote:
> On 15/11/2011 11:25, Steven Dake wrote:
>> On 11/15/2011 06:46 AM, Juan Carlos Franzoy wrote:
>>> Has anybody succeeded compiling corosync in Solaris 10 (intel or
>>> sparc) ?
>>>
>>> _______________________________________________
>>> discuss mailing list
>>> discuss@xxxxxxxxxxxx
>>> http://lists.corosync.org/mailman/listinfo/discuss
>> It compiled and worked long ago, but it has been awhile since I've tried
>> compiling on solaris.  Give it a try and let us know.
>>
>> Thanks
>> -steve
> Thank for your reply. First of all I have to tell you that I am trying
> to compile "flaitron 1.4.2 (stable) 06/10/2011" release using gcc3.4.3
> or gcc4.5 (I tried both) on solaris 10 Intel whitout much success.
> 
> The first problem doesn't seem to be a hard one. Apparently Makefile
> doesn't generate shared objects. The error I got is:
> 
>    gmake[2]: *** No rule to make target `libcpg.so', needed by
> `all-local'.  Stop.
> 

The makefiles are probably broken for some reason.  lib/Makefile.am
probably needs some modification to properly execute the solaris switch.

> I tried to generate them by hand. Generating .so files with the same
> content as .a files.
> 
> cd lib
> gcc -shared -fPIC -o libcpg.so cpg.o
> gcc -shared -fPIC -o libsam.so sam.o
> gcc -shared -fPIC -o libcoroipcc.so coroipcc.o
> gcc -shared -fPIC -o libpload.so pload.o
> gcc -shared -fPIC -o libvotequorum.so votequorum.o
> gcc -shared -fPIC -o libquorum.so quorum.o
> gcc -shared -fPIC -o libcfg.so cfg.o
> gcc -shared -fPIC -o libevs.so evs.o
> gcc -shared -fPIC -o libconfdb.so confdb.o sa-confdb.o ../lcr/lcr_ifact.o
> cd ..
> gmake
> 
> It proceeds a few steps more and fails saying
> 
>    coroipcs.c:780: error: structure has no member named `msg_flags'.
> 

The only things that have changed much since corosync was running on
solaris is coroipcs.c and coroipcc.c.  Those probably need a re-port.

The way this is handled in corosync is when msg_flags is set, we check
for SOLARIS.  see:

totemudp.c:950 for an example

> Looking at sys/socket.h, you me be tempted to say that it needs _XPG4_2
> to be defined:
> 

I am pretty sure this won't work.  XPGA_2 is probably a kernel define
(hence the kernel data structure would be out of sync with the userspace
data structure).

> struct msghdr {
>     void        *msg_name;        /* optional address */
>     socklen_t    msg_namelen;        /* size of address */
>     struct iovec    *msg_iov;        /* scatter/gather array */
>     int        msg_iovlen;        /* # elements in msg_iov */
> #if defined(_XPG4_2) || defined(_KERNEL)
>     void        *msg_control;        /* ancillary data */
>     socklen_t    msg_controllen;        /* ancillary data buffer len */
>     int        msg_flags;        /* flags on received message */
> #else
>     caddr_t        msg_accrights;    /* access rights sent/received */
>     int        msg_accrightslen;
> #endif    /* defined(_XPG4_2) || defined(_KERNEL) */
> };
> 
> But it's not that easy. I tried.
> 
> export CFLAGS='-D_XPG4_2'
> ./configure ...
> gmake
> 
> It also does not work. In uic.c:125 it is trying to use msg_accrights.
> 
> Thanks again

looks like it needs another pass at the porting grinder.  Last time took
me three-five days but I did a from-scratch port to the platform.
Unfortunately I am pretty booked until realistically January to take on
a fixup of the port.

I will merge patches if you sort out the port.

Note the code *does* work when ported (it was working some time ago) but
apparently some minor changes we have made have broke things like
compatibility with msghdr struct and makefiles.  If you get it to
compile, I'm pretty sure it will be functional on your system.  If you
submit patches we will merge and release an update.

Regards
-steve
_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux