compile error

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
otx
New user
Posts: 2
Joined: 05 Jun 2009, 14:43

compile error

Post by otx »

Hi,

I've been trying to compile the game from source on Arch, this is what I get:

Code: Select all


In file included from ../../lib/framework/wzglobal.h:32,
                 from ../../lib/framework/frame.h:26,
                 from resource_lexer.l:26:
../../config.h:132:1: error: "_XOPEN_SOURCE" redefined
In file included from /usr/include/stdio.h:28,
                 from resource_lexer.lex.c:39:
/usr/include/features.h:160:1: error: this is the location of the previous definition
make[4]: *** [resource_lexer.lex.o] Error 1
make[4]: Leaving directory `/home/otx/builds/warzone2100-2.2.0/lib/framework'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/otx/builds/warzone2100-2.2.0/lib/framework'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/otx/builds/warzone2100-2.2.0/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/otx/builds/warzone2100-2.2.0'
make: *** [all] Error 2

I tried the latest svn, with the same result. I hope someone can help me out, I could not find any solution with the search option.
Thanks in advance.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: compile error

Post by stiv »

/../config.h:132:1: error: "_XOPEN_SOURCE" redefined
That is usually not a 'real' error but rather a warning, and is common in X applications.

If you run configure as
./configure --enable-debug=relaxed
it will remove the -Werror compiler flag that turns all warnings into errors.
otx
New user
Posts: 2
Joined: 05 Jun 2009, 14:43

Re: compile error

Post by otx »

Thanks, that did it!