Error building stratagus-2.2.5.5 using autotools

Bug #684783 reported by Tilpa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stratagus
Invalid
Undecided
Unassigned

Bug Description

Hi, I'm getting the following error when building stratagus-2.2.5.5 using autotools (./autogen.sh; ./configure; make):

g++ -c -DHAVE_CONFIG_H -DUSE_BZ2LIB -DUSE_VORBIS -DUSE_THEORA -DUSE_MIKMOD -pthread -D_REENTRANT -DUSE_MNG -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/lua5.1 -DUSE_ZLIB -I. -I./src/include -I./src/guichan/include -DSTRATAGUS_LIB_PATH="\".\"" -O2 -pipe -pedantic -fsigned-char -fomit-frame-pointer -fexpensive-optimizations -ffast-math src/guichan/widgets/textbox.cpp -o src/guichan/widgets/obj/textbox.o
In file included from src/guichan/widgets/textbox.cpp:67:
./src/include/util.h:213: erro: declaration of 'char* strcasestr(const char*, const char*)' throws different exceptions
/usr/include/string.h:218: erro: from previous declaration 'char* strcasestr(const char*, const char*) throw ()'
./src/include/util.h:218: erro: declaration of 'size_t strnlen(const char*, size_t)' throws different exceptions
/usr/include/string.h:250: erro: from previous declaration 'size_t strnlen(const char*, size_t) throw ()'
make: ** [src/guichan/widgets/obj/textbox.o] Erro 1

I'm compiling from Ubuntu 8.04 LTS (Hardy Heron).
Here there are no problems compiling stratagus-2.2.4 with autotools,
so I believe that it may be someting related to 2.2.5.5 (just a guess, you know the code much better than I do)

BTW, there are no problems playing Wargus using that stratagus-2.2.4 executable built here.
Great work folks, this project is amazing :)

Revision history for this message
Pali (pali) wrote :

You have buggy program autoheader. ./configure call autoheader and this generate file config.h where is defined if you have functions strlen and strcasestr

You have 2 choices:
1. after ./configure edit file config.h and change it that you have strlen and strcasestr
2. call ./configure with params CPPFLAGS="-DHAVE_STRCASESTR -DHAVE_STRNLEN"

This sounds like bug in autotools not in stratagus, so closing as invalid.
All ubuntu packages in stratagus PPA was builded correctly.

Changed in stratagus:
status: New → Invalid
Revision history for this message
Tilpa (fabio-pasini) wrote :

Compiled successfully using
$ ./autogen.sh
$ ./configure CPPFLAGS="-DHAVE_STRCASESTR -DHAVE_STRNLEN"
$ make

Thanks for the quick answer, Pali.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.