For a quick workaround, replace ./include/agar/config/have_gettimeofday.h by an empty file.
It seems the configure test for gettimeofday() somehow succeeded even with -mno-cygwin passed to the compiler. On Tue, Sep 15, 2009 at 05:48:40PM -0300, F. Curi wrote: > Hello all, > > I have some problems working with agar in mingw/msys environment in winxp. Y > succesfully compile and install SDL, freetype and agar (without thread > support), but when I try to compile a demo application (demo/fixedres, for > example), fails with error in the ./configure. The error is in the use of > select() in time_gettimeofday.c. > > Any help? > > Details extracted from config.log: > -------------------------- > checking for Agar (http://libagar.org/)...yes > checking whether Agar works.../mingw/bin/gcc.exe -mno-cygwin -Wall -Werror > -I/usr/local/include/agar -I/usr/local/include/SDL -D_GNU_SOURCE=1 > -Dmain=SDL_main -I/usr/local/include/freetype2 -I/usr/local/include -o > ..../conftest conftest.c -L/usr/local/lib -lag_gui -lag_core -L/usr/local/lib > -lmingw32 -lSDLmain -lSDL -mwindows -L/usr/local/lib -lfreetype -lopengl32 > -lm > C:/msys/1.0/local/lib/libag_core.a(time_gettimeofday.o):time_gettimeofday.c:(.text+0x10d): > > undefined reference to `select' > collect2: ld returned 1 exit status > -> failed (0) > -------------------------- > > Complete config.log: > > ---------------------Machine: i686 > Release: 1.0.11(0.46/3/2) > System: MINGW32_NT-5.1 > Argument: --disable-network > Argument: --disable-threads > checking for a usable C compiler...Detected executable suffix: .exe > checking for compiler warning options.../mingw/bin/gcc.exe -Wall -Werror > -o ./conftest conftest.c > yes > checking for gcc.../mingw/bin/gcc.exe -Wall -Werror -o ./conftest > conftest.c > yes > checking for IEEE754 floating point.../mingw/bin/gcc.exe -Wall -Werror -o > ..../conftest conftest.c > yes > checking aligned attribute.../mingw/bin/gcc.exe -Wall -Werror -Wall -Werror > -o ./conftest conftest.c > yes > checking bounded attribute.../mingw/bin/gcc.exe -Wall -Werror -o > ..../conftest conftest.c > conftest.c:1: warning: `__bounded__' attribute directive ignored > -> failed (0) > no > checking const attribute.../mingw/bin/gcc.exe -Wall -Werror -o ./conftest > conftest.c > yes > checking deprecated attribute.../mingw/bin/gcc.exe -Wall -Werror -o > ..../conftest conftest.c > yes > checking format attribute.../mingw/bin/gcc.exe -Wall -Werror -o ./conftest > conftest.c > yes > checking nonnull attribute.../mingw/bin/gcc.exe -Wall -Werror -Wall -Werror > -o ./conftest conftest.c > yes > checking noreturn attribute.../mingw/bin/gcc.exe -Wall -Werror -o > ..../conftest conftest.c > yes > checking packed attribute.../mingw/bin/gcc.exe -Wall -Werror -Wall -Werror > -o ./conftest conftest.c > yes > checking pure attribute.../mingw/bin/gcc.exe -Wall -Werror -o ./conftest > conftest.c > yes > checking warn_unused_result attribute.../mingw/bin/gcc.exe -Wall -Werror > -o ./conftest conftest.c > yes > checking for long double.../mingw/bin/gcc.exe -Wall -Werror -o ./conftest > conftest.c > yes > checking for long long.../mingw/bin/gcc.exe -Wall -Werror -o ./conftest > conftest.c > yes > checking for cygwin environment.../mingw/bin/gcc.exe -Wall -Werror -mcygwin > -o ./conftest conftest.c > yes > checking for POSIX threads.../mingw/bin/gcc.exe -mno-cygwin -Wall -Werror > -o ./conftest conftest.c -lpthread > conftest.c:1:21: pthread.h: No such file or directory > conftest.c: In function `start_routine': > conftest.c:6: error: `NULL' undeclared (first use in this function) > conftest.c:6: error: (Each undeclared identifier is reported only once > conftest.c:6: error: for each function it appears in.) > conftest.c: In function `main': > conftest.c:10: error: `pthread_mutex_t' undeclared (first use in this > function) > conftest.c:10: error: syntax error before "mutex" > conftest.c:11: error: `pthread_t' undeclared (first use in this function) > conftest.c:12: warning: implicit declaration of function > `pthread_mutex_init' > conftest.c:12: error: `mutex' undeclared (first use in this function) > conftest.c:12: error: `NULL' undeclared (first use in this function) > conftest.c:13: warning: implicit declaration of function > `pthread_mutex_lock' > conftest.c:14: warning: implicit declaration of function > `pthread_mutex_unlock' > conftest.c:15: warning: implicit declaration of function > `pthread_mutex_destroy' > conftest.c:16: warning: implicit declaration of function `pthread_create' > conftest.c:16: error: `thread' undeclared (first use in this function) > -> failed (0) > no > checking for -pthread.../mingw/bin/gcc.exe -mno-cygwin -Wall -Werror -o > ..../conftest conftest.c -pthread > conftest.c:1:21: pthread.h: No such file or directory > conftest.c: In function `start_routine': > conftest.c:6: error: `NULL' undeclared (first use in this function) > conftest.c:6: error: (Each undeclared identifier is reported only once > conftest.c:6: error: for each function it appears in.) > conftest.c: In function `main': > conftest.c:10: error: `pthread_mutex_t' undeclared (first use in this > function) > conftest.c:10: error: syntax error before "mutex" > conftest.c:11: error: `pthread_t' undeclared (first use in this function) > conftest.c:12: warning: implicit declaration of function > `pthread_mutex_init' > conftest.c:12: error: `mutex' undeclared (first use in this function) > conftest.c:12: error: `NULL' undeclared (first use in this function) > conftest.c:13: warning: implicit declaration of function > `pthread_mutex_lock' > conftest.c:14: warning: implicit declaration of function > `pthread_mutex_unlock' > conftest.c:15: warning: implicit declaration of function > `pthread_mutex_destroy' > conftest.c:16: warning: implicit declaration of function `pthread_create' > conftest.c:16: error: `thread' undeclared (first use in this function) > gcc.exe: unrecognized option `-pthread' > -> failed (0) > no > checking for -pthread (common paths).../mingw/bin/gcc.exe -mno-cygwin -Wall > -Werror -o ./conftest conftest.c > conftest.c:1:21: pthread.h: No such file or directory > conftest.c: In function `start_routine': > conftest.c:6: error: `NULL' undeclared (first use in this function) > conftest.c:6: error: (Each undeclared identifier is reported only once > conftest.c:6: error: for each function it appears in.) > conftest.c: In function `main': > conftest.c:10: error: `pthread_mutex_t' undeclared (first use in this > function) > conftest.c:10: error: syntax error before "mutex" > conftest.c:11: error: `pthread_t' undeclared (first use in this function) > conftest.c:12: warning: implicit declaration of function > `pthread_mutex_init' > conftest.c:12: error: `mutex' undeclared (first use in this function) > conftest.c:12: error: `NULL' undeclared (first use in this function) > conftest.c:13: warning: implicit declaration of function > `pthread_mutex_lock' > conftest.c:14: warning: implicit declaration of function > `pthread_mutex_unlock' > conftest.c:15: warning: implicit declaration of function > `pthread_mutex_destroy' > conftest.c:16: warning: implicit declaration of function `pthread_create' > conftest.c:16: error: `thread' undeclared (first use in this function) > -> failed (0) > no > checking for the X/Open Threads Extension.../mingw/bin/gcc.exe -mno-cygwin > -Wall -Werror -U_XOPEN_SOURCE -D_XOPEN_SOURCE=600 -o ./conftest conftest.c > -lpthread > conftest.c:1:21: pthread.h: No such file or directory > conftest.c: In function `main': > conftest.c:6: error: `pthread_mutex_t' undeclared (first use in this > function) > conftest.c:6: error: (Each undeclared identifier is reported only once > conftest.c:6: error: for each function it appears in.) > conftest.c:6: error: syntax error before "mutex" > conftest.c:7: error: `pthread_mutexattr_t' undeclared (first use in this > function) > conftest.c:8: warning: implicit declaration of function > `pthread_mutexattr_settype' > conftest.c:8: error: `mutexattr' undeclared (first use in this function) > conftest.c:8: error: `PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this > function) > conftest.c:9: warning: implicit declaration of function `pthread_mutex_init' > conftest.c:9: error: `mutex' undeclared (first use in this function) > -> failed (0) > no > checking for the X/Open Threads Extension (common > paths).../mingw/bin/gcc.exe -mno-cygwin -Wall -Werror -U_XOPEN_SOURCE > -D_XOPEN_SOURCE=600 -o ./conftest conftest.c > conftest.c:1:21: pthread.h: No such file or directory > conftest.c: In function `main': > conftest.c:6: error: `pthread_mutex_t' undeclared (first use in this > function) > conftest.c:6: error: (Each undeclared identifier is reported only once > conftest.c:6: error: for each function it appears in.) > conftest.c:6: error: syntax error before "mutex" > conftest.c:7: error: `pthread_mutexattr_t' undeclared (first use in this > function) > conftest.c:8: warning: implicit declaration of function > `pthread_mutexattr_settype' > conftest.c:8: error: `mutexattr' undeclared (first use in this function) > conftest.c:8: error: `PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this > function) > conftest.c:9: warning: implicit declaration of function `pthread_mutex_init' > conftest.c:9: error: `mutex' undeclared (first use in this function) > -> failed (0) > no > checking for PTHREAD_MUTEX_RECURSIVE.../mingw/bin/gcc.exe -mno-cygwin -Wall > -Werror -o ./conftest conftest.c > conftest.c:1:21: pthread.h: No such file or directory > conftest.c: In function `main': > conftest.c:5: error: `pthread_mutex_t' undeclared (first use in this > function) > conftest.c:5: error: (Each undeclared identifier is reported only once > conftest.c:5: error: for each function it appears in.) > conftest.c:5: error: syntax error before "mutex" > conftest.c:6: error: `pthread_mutexattr_t' undeclared (first use in this > function) > conftest.c:7: warning: implicit declaration of function > `pthread_mutexattr_settype' > conftest.c:7: error: `mutexattr' undeclared (first use in this function) > conftest.c:7: error: `PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this > function) > conftest.c:8: warning: implicit declaration of function `pthread_mutex_init' > conftest.c:8: error: `mutex' undeclared (first use in this function) > -> failed (0) > no > checking for PTHREAD_MUTEX_RECURSIVE_NP.../mingw/bin/gcc.exe -mno-cygwin > -Wall -Werror -o ./conftest conftest.c > conftest.c:1:21: pthread.h: No such file or directory > conftest.c: In function `main': > conftest.c:5: error: `pthread_mutex_t' undeclared (first use in this > function) > conftest.c:5: error: (Each undeclared identifier is reported only once > conftest.c:5: error: for each function it appears in.) > conftest.c:5: error: syntax error before "mutex" > conftest.c:6: error: `pthread_mutexattr_t' undeclared (first use in this > function) > conftest.c:7: warning: implicit declaration of function > `pthread_mutexattr_settype' > conftest.c:7: error: `mutexattr' undeclared (first use in this function) > conftest.c:7: error: `PTHREAD_MUTEX_RECURSIVE_NP' undeclared (first use in > this function) > conftest.c:8: warning: implicit declaration of function `pthread_mutex_init' > conftest.c:8: error: `mutex' undeclared (first use in this function) > -> failed (0) > no > checking for SDL (http://www.libsdl.org)...yes > checking whether SDL works.../mingw/bin/gcc.exe -mno-cygwin -Wall -Werror > -I/usr/local/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -o ./conftest > conftest.c -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows > yes > checking for OpenGL (http://www.opengl.org)...yes > checking whether -lopengl32 works.../mingw/bin/gcc.exe -mno-cygwin -Wall > -Werror -o ./conftest conftest.c -lopengl32 > yes > checking whether OpenGL works.../mingw/bin/gcc.exe -mno-cygwin -Wall > -Werror -o ./conftest conftest.c -lopengl32 > yes > checking for FreeType (http://www.freetype.org)...yes > checking whether FreeType works.../mingw/bin/gcc.exe -mno-cygwin -Wall > -Werror -I/usr/local/include/freetype2 -I/usr/local/include -o ./conftest > conftest.c -L/usr/local/lib -lfreetype > yes > checking for Agar (http://libagar.org/)...yes > checking whether Agar works.../mingw/bin/gcc.exe -mno-cygwin -Wall -Werror > -I/usr/local/include/agar -I/usr/local/include/SDL -D_GNU_SOURCE=1 > -Dmain=SDL_main -I/usr/local/include/freetype2 -I/usr/local/include -o > ..../conftest conftest.c -L/usr/local/lib -lag_gui -lag_core -L/usr/local/lib > -lmingw32 -lSDLmain -lSDL -mwindows -L/usr/local/lib -lfreetype -lopengl32 > -lm > C:/msys/1.0/local/lib/libag_core.a(time_gettimeofday.o):time_gettimeofday.c:(.text+0x10d): > > undefined reference to `select' > collect2: ld returned 1 exit status > -> failed (0) > no > > Regards, > > Fabio > _______________________________________________ > Agar mailing list > [email protected] > http://libagar.org/lists.html _______________________________________________ Agar mailing list [email protected] http://libagar.org/lists.html
