I tried to build UnrealIRCd on my Debian-Sid box with gcc 4.0.2 20050806 (prerelease),
and I first got this error:
This is an issue brought by gcc 4.0 (see this link: http://nixforums.org/about57374.html).In file included from ../include/common.h:46,
from ../include/struct.h:43,
from auth.c:21:
../include/sys.h:195: error: static declaration of 'in6addr_any' follows non-static declaration
/usr/include/netinet/in.h:206: error: previous declaration of 'in6addr_any' was here
So I corrected this by cutting:
Code: Select all
# if defined(linux)
static const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0
};
# endif
And I added:
Code: Select all
# if defined(linux)
/*static*/ const struct in6_addr in6addr_any = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0
};
# endif
Code: Select all
#include "h.h"
I had to put in6addr_any in a .c file (src/auth.c here) because it is very bad to generate code in a header file.
Indeed it will create many in6addr_any every time the header file (include/sys.h here) is included (especially without 'static'), so the linker will crash.
Then (make clean && make), I had some others errors about libcurl:
For instance:
I was surprised because I had already installed libcurl3 and libcurl3-dev...url.o: dans la fonction « set_curl_ssl_options »:
/tmp/Unreal3.2/src/url.c:110: référence indéfinie vers « curl_easy_setopt »
Then I had a glance at the code printed by 'make' and I made out that '-lcurl' was missing in the 'gcc' command line which crashed.
So I edited this line in the Makefile:
Code: Select all
IRCDLIBS=-lcrypt -lnsl -lz -lares -ldl -L/tmp/Unreal3.2/extras/regexp/lib -ltreCode: Select all
IRCDLIBS=-lcrypt -lnsl -lz -lares -ldl -L/tmp/Unreal3.2/extras/regexp/lib -ltre -lcurl Sorry if these issues had ever been discussed on this forum, but as the current release of UnrealIRCd does not fix them, I did not hesitate to post :s