[ENet-discuss] 1.2 build problems in linux

Andrew Fenn andrewfenn at gmail.com
Fri Oct 17 01:56:27 PDT 2008


I was in the cmake mailing list trying to find a replacement for the following:

AC_EGREP_HEADER(MSG_MAXIOVLEN, /usr/include/sys/socket.h,
AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h,
AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))

They pointed out to me that this does not actually do anything useful
which could not be done in code. I could get the same behaviour by
adding the following into the header file:

#ifdef MSG_MAXIOVLEN
#define ENET_BUFFER_MAXIMUM MSG_MAXIOVLEN
#endif

Is this true? I don't want to screw it up when I rewrite the build
script in cmake and get weird behaviour.

Regards,
Andrew


On Wed, Oct 15, 2008 at 7:26 AM, Lee Salzman <lsalzman1 at cox.net> wrote:
> There are a number of compiler definitions that must be set up on Linux,
> FreeBSD,
> Solaris, etc. This is normally handled by the configure script. You are
> going to have
> to take a look at the included configure.in and reproduce various
> preprocessor
> definitions as appropriate if you are going to use your own build system.
>
> Lee
>
> Andrew Fenn wrote:
>>
>> I am using cmake to build enet into my project.
>>
>>
>> http://bazaar.launchpad.net/~hardwar/hardwar/trunk/files/26?file_id=trunk-20080128121747-hzzwhqny0rrrlrhe-1
>>
>> The enet specific code is here..
>>
>>
>> http://bazaar.launchpad.net/~hardwar/hardwar/trunk/annotate/26?file_id=findenet.cmake-20080809160058-v3lolt4nm2ufvbmv-7
>>
>> Could it be that I am not setting up a compiler flag correctly or
>> something? I am also having problems with this on windows too.
>>
>> Thanks,
>> Andrew
>>
>> On Wed, Oct 15, 2008 at 6:02 AM, Lee Salzman <lsalzman1 at cox.net> wrote:
>>
>>>
>>> It would appear you're either not using the right build system or somehow
>>> using an incompatible implementation of make.
>>>
>>> Andrew Fenn wrote:
>>>
>>>>
>>>> I am getting the following errors and I don't understand why. Any tips?
>>>>
>>>> Scanning dependencies of target Enet
>>>> [  3%] Building C object CMakeFiles/Enet.dir/dependencies/enet/list.o
>>>> [  6%] Building C object CMakeFiles/Enet.dir/dependencies/enet/unix.o
>>>> /home/andrew/programming/hardwar/trunk/dependencies/enet/unix.c:34:
>>>> error: conflicting types for 'socklen_t'
>>>> /usr/include/bits/socket.h:37: error: previous declaration of
>>>> 'socklen_t' was here
>>>> /home/andrew/programming/hardwar/trunk/dependencies/enet/unix.c: In
>>>> function 'enet_address_set_host':
>>>> /home/andrew/programming/hardwar/trunk/dependencies/enet/unix.c:98:
>>>> warning: implicit declaration of function 'inet_aton'
>>>> /home/andrew/programming/hardwar/trunk/dependencies/enet/unix.c: In
>>>> function 'enet_socket_accept':
>>>> /home/andrew/programming/hardwar/trunk/dependencies/enet/unix.c:243:
>>>> warning: pointer targets in passing argument 3 of 'accept' differ in
>>>> signedness
>>>> make[2]: *** [CMakeFiles/Enet.dir/dependencies/enet/unix.o] Error 1
>>>> make[1]: *** [CMakeFiles/Enet.dir/all] Error 2
>>>>
>>>>
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>


More information about the ENet-discuss mailing list