Re: [UDT] OSX compilation errors
Brought to you by:
lilyco
From: Yunhong Gu <yu...@la...> - 2006-03-15 18:49:14
|
Yes, this is a known issue too (I should have add a known issue list...) The reason is that UDT tries to allocate a rather large socket buffer (setsockopt) that OS X does not support. On Linux or Windows, they will set the socket buffer to the maximum system value; however, OS X will return error. So the solution is, you can either change your system parameter to allow larger socket buffer size (at least 20MB), or set UDT option (UDT_SNDBUF and UDT_RCVBUF) to smaller values (e.g., 64KB). See the commented setsockopt lines in appserver and appclient for examples. Thanks Yunhong On Wed, 15 Mar 2006, Ben Roeder wrote: > Hi Yunhong, > Thanks for that, I now can compile the 2.3 under OS X > The issue I am now seeing is > ./recvfile 10.99.4.70 9000 ./iso.iso iso.iso > connect: Connection setup failure: unable to create/configure UDP socket: No > buffer space available. > > I am looking into it, but is this also a known issue, or am I the only person > on Os X. I remember it used to compile and work before xmas > > regards > Ben Roeder > > Yunhong Gu wrote: >> >> >> in ./src/channel.cpp, around line 66, remove >> >> #define socklen_t int >> >> for BSD. >> >> OS X has started to use socklen_t instead of int. >> >> There may be more problem, if so, in ./src/Makefile >> >> use >> $(C++) -dynamiclib -o libudt.dylib -lstdc++ -lpthread -lm $^ >> to replace the original "libtool ..." line. >> >> Thanks, >> Yunhong >> >> >> On Wed, 15 Mar 2006, Ben Roeder wrote: >> >>> Hi, >>> Is anyone else compiling for OSX at the moment ? >>> I am getting errors with version 2.3 >>> I am compiling on a powerPC machine running tiger >>> the xcode version is 2.0 >>> xcode IDE 514.0 >>> xcode core 515.0 >>> tool support 514.0 >>> >>> I am compiling with gcc in a terminal >>> gcc is >>> Usage: powerpc-apple-darwin8-gcc-4.0.0 >>> The make flags are as follows >>> make -e os=BSD arch=POWERPC >>> >>> I see the following error, is this known issue ? >>> channel.cpp is version 1.20 >>> ~/projects/udt2 ben$ make -e os=BSD arch=POWERPC >>> make -C src all >>> g++ -fPIC -Wall -DBSD -finline-functions -DTRACE -DNO_BUSY_WAITING >>> -mcpu=powerpc channel.cpp -c >>> channel.cpp: In member function `int CChannel::recvfrom(CPacket&, >>> sockaddr*) const': >>> channel.cpp:301: error: invalid conversion from 'int*' to 'socklen_t*' >>> channel.cpp:301: error: initializing argument 6 of 'ssize_t >>> recvfrom(int, void*, size_t, int, sockaddr*, socklen_t*)' >>> channel.cpp: In member function `int CChannel::getSndBufSize()': >>> channel.cpp:344: error: invalid conversion from 'int*' to 'socklen_t*' >>> channel.cpp:344: error: initializing argument 5 of 'int getsockopt(int, >>> int, int, void*, socklen_t*)' >>> channel.cpp: In member function `int CChannel::getRcvBufSize()': >>> channel.cpp:357: error: invalid conversion from 'int*' to 'socklen_t*' >>> channel.cpp:357: error: initializing argument 5 of 'int getsockopt(int, >>> int, int, void*, socklen_t*)' >>> channel.cpp: In member function `void CChannel::getSockAddr(sockaddr*) >>> const': >>> channel.cpp:380: error: invalid conversion from 'int*' to 'socklen_t*' >>> channel.cpp:380: error: initializing argument 3 of 'int getsockname(int, >>> sockaddr*, socklen_t*)' >>> channel.cpp: In member function `void CChannel::getPeerAddr(sockaddr*) >>> const': >>> channel.cpp:391: error: invalid conversion from 'int*' to 'socklen_t*' >>> channel.cpp:391: error: initializing argument 3 of 'int getpeername(int, >>> sockaddr*, socklen_t*)' >>> make[1]: *** [channel.o] Error 1 >>> make: *** [src.all] Error 2 >>> >>> same version is fine on debian sarge >>> regards >>> Ben Roeder >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by xPML, a groundbreaking scripting >>> language >>> that extends applications into web and mobile media. Attend the live >>> webcast >>> and join the prime developer group breaking into this new coding >>> territory! >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >>> _______________________________________________ >>> UDT-general mailing list >>> UDT...@li... >>> https://lists.sourceforge.net/lists/listinfo/udt-general >>> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting language >> that extends applications into web and mobile media. Attend the live >> webcast >> and join the prime developer group breaking into this new coding territory! >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >> _______________________________________________ >> UDT-general mailing list >> UDT...@li... >> https://lists.sourceforge.net/lists/listinfo/udt-general > > -- > ------------------------------------------------------- > Sohonet ltd http://www.sohonet.co.uk > Tel:+44(0)20 7079 2440 Fax:+44(0)20 7079 2441 > Sup:+44(0)20 7079 2449 Aus:+61(0)42 1427 226 > Taking digital sound and vision to the world since 1995 > ------------------------------------------------------- > > |