On 11/11/12 15:35, Sean Ulrich wrote: > I appreciate all your work putting this together. It looks very impressive. > > Like the previous post from Josh Branning > (http://thread.gmane.org/gmane.comp.lib.agar.general/675), I am attempting to > install Agar 1.4.1 on Debian Squeeze and am having trouble. But, unlike > Josh, I > have the added variable of running Debian in a VirtualBox VM. Here is what > I've > done: > > I downloaded the 1.4.1 tarball and unzipped to ~/agar-1.4.1 >>From there, I ran "./configure --enable-debug", "make depend all", "sudo make > install", and "sudo ldconfig". Everything seems to install correctly. I > then > made the hello.c from the website and it compiled successfully with "gcc -o > hello `agar-config --cflags` -g hello.c `agar-config --libs`" > > However, when I run "./hello" I get Segmentation Fault. Checking gdb shows: > > Program received signal SIGSEGV, Segmentation fault. > 0xb7b991a0 in ?? () from /lib/i686/cmov/libc.so.6 > (gdb) backtrace > #0 0xb7b991a0 in ?? () from /lib/i686/cmov/libc.so.6 > #1 0xb7ed116a in AG_TryStrdup () from /usr/local/lib/libag_core.so.4 > #2 0xb7eba55f in AG_InitCore () from /usr/local/lib/libag_core.so.4 > #3 0x080486e1 in main (argc=1, argv=0xbffff4e4 "L\366\377\277") at hello.c:7 > > If it's helpful, if I run "sudo ./hello" I do not get the Segmentation Fault. > > However nothing happens. > > Should I try an alternate configuration? I appreciate the help. > > ______Below is is my config.log____ > > Generated by configure script > BSDBuild Version: 2.8 > Host: i686-pc-linux-gnu > Argument: --enable-debug > checking for a C compiler...yes, /usr/bin/cc > checking whether the C compiler works...yes > checking for compiler warning options.../usr/bin/cc -Wall -Werror -o > ../conftest conftest.c > yes > checking for gcc.../usr/bin/cc -Wall -Werror -o ./conftest conftest.c > yes > checking for IEEE754 floating point.../usr/bin/cc -Wall -Werror -o > ./conftest > conftest.c > yes > checking aligned attribute.../usr/bin/cc -Wall -Werror -Wall -Werror -o > ../conftest conftest.c > yes > checking bounded attribute.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > cc1: warnings being treated as errors > conftest.c:1: error: ‘__bounded__’ attribute directive ignored > -> failed (0) > no > checking const attribute.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking deprecated attribute.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking format attribute.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking nonnull attribute.../usr/bin/cc -Wall -Werror -Wall -Werror -o > ../conftest conftest.c > yes > checking noreturn attribute.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking packed attribute.../usr/bin/cc -Wall -Werror -Wall -Werror -o > ../conftest conftest.c > yes > checking pure attribute.../usr/bin/cc -Wall -Werror -o ./conftest conftest.c > yes > checking warn_unused_result attribute.../usr/bin/cc -Wall -Werror -o > ../conftest conftest.c > yes > checking for long double.../usr/bin/cc -Wall -Werror -o ./conftest conftest.c > yes > checking for long long.../usr/bin/cc -Wall -Werror -o ./conftest conftest.c > yes > checking for cygwin environment.../usr/bin/cc -Wall -Werror -mcygwin -o > ../conftest conftest.c > cc1: error: unrecognized command line option "-mcygwin" > -> failed (0) > no > checking for <sys/types.h>.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for 64-bit types.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for conflicting typedefs.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > conftest.c: In function ‘main’: > conftest.c:3: error: ‘Uchar’ undeclared (first use in this function) > conftest.c:3: error: (Each undeclared identifier is reported only once > conftest.c:3: error: for each function it appears in.) > conftest.c:3: error: expected ‘;’ before ‘foo’ > conftest.c:4: error: ‘Uint’ undeclared (first use in this function) > conftest.c:4: error: expected ‘;’ before ‘bar’ > conftest.c:5: error: ‘Ulong’ undeclared (first use in this function) > conftest.c:5: error: expected ‘;’ before ‘baz’ > conftest.c:6: error: ‘foo’ undeclared (first use in this function) > conftest.c:6: error: ‘bar’ undeclared (first use in this function) > conftest.c:6: error: ‘baz’ undeclared (first use in this function) > -> failed (0) > no > checking for <stdlib.h>.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for <unistd.h>.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for compatible <limits.h>.../usr/bin/cc -Wall -Werror -o > ./conftest > conftest.c > yes > checking for compatible <float.h>.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for the __progname variable.../usr/bin/cc -Wall -Werror -o > ./conftest > conftest.c > yes > checking for the C math library.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c -lm > yes > checking for the C math library (C99).../usr/bin/cc -Wall -Werror -o > ../conftest conftest.c -lm > yes > checking for a getpwuid() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for a getuid() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for a strsep() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > cc1: warnings being treated as errors > conftest.c: In function ‘main’: > conftest.c:5: error: null argument where non-null required (argument 1) > conftest.c:5: error: null argument where non-null required (argument 2) > -> failed (0) > no > checking for the snprintf() function.../usr/bin/cc -Wall -Werror -o > ./conftest > conftest.c > yes > checking for the vsnprintf() function.../usr/bin/cc -Wall -Werror -o > ./conftest > conftest.c > yes > checking for a vasprintf() function.../usr/bin/cc -Wall -Werror > -D_GNU_SOURCE - > o ./conftest conftest.c > yes > checking for the signal() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for setjmp() and longjmp().../usr/bin/cc -Wall -Werror -o > ./conftest > conftest.c > yes > checking for a strtoll() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for a strtold() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for byte order.../usr/bin/cc -o ./conftest conftest.c > little-endian > checking for dlopen() interface.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > /usr/bin/cc -Wall -Werror -DHAVE_DLFCN_H -o ./conftest conftest.c > /tmp/cc5i7BP0.o: In function `main': > conftest.c:(.text+0x19): undefined reference to `dlopen' > conftest.c:(.text+0x22): undefined reference to `dlerror' > conftest.c:(.text+0x3b): undefined reference to `dlsym' > collect2: ld returned 1 exit status > -> failed (0) > no > checking for dlopen() in -ldl.../usr/bin/cc -Wall -Werror -DHAVE_DLFCN_H > -ldl - > o ./conftest conftest.c > yes > checking for dyld interface.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > conftest.c:2:25: error: mach-o/dyld.h: No such file or directory > -> failed (0) > /usr/bin/cc -Wall -Werror -o ./conftest conftest.c > conftest.c: In function ‘main’: > conftest.c:7: error: ‘NSObjectFileImage’ undeclared (first use in this > function) > conftest.c:7: error: (Each undeclared identifier is reported only once > conftest.c:7: error: for each function it appears in.) > conftest.c:7: error: expected ‘;’ before ‘img’ > conftest.c:8: error: ‘NSObjectFileImageReturnCode’ undeclared (first use in > this > function) > conftest.c:8: error: expected ‘;’ before ‘rv’ > conftest.c:10: error: ‘rv’ undeclared (first use in this function) > cc1: warnings being treated as errors > conftest.c:10: error: implicit declaration of function > ‘NSCreateObjectFileImageFromFile’ > conftest.c:10: error: ‘img’ undeclared (first use in this function) > conftest.c:11: error: ‘NSObjectFileImageSuccess’ undeclared (first use in > this > function) > -> failed (0) > no > checking for shl_load() interface.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > conftest.c:2:16: error: dl.h: No such file or directory > -> failed (0) > /usr/bin/cc -Wall -Werror -ldld -o ./conftest conftest.c > cc1: warnings being treated as errors > conftest.c: In function ‘main’: > conftest.c:11: error: implicit declaration of function ‘shl_load’ > conftest.c:11: error: ‘BIND_IMMEDIATE’ undeclared (first use in this function) > conftest.c:11: error: (Each undeclared identifier is reported only once > conftest.c:11: error: for each function it appears in.) > conftest.c:12: error: implicit declaration of function ‘shl_findsym’ > conftest.c:12: error: ‘shl_t’ undeclared (first use in this function) > conftest.c:12: error: expected expression before ‘)’ token > conftest.c:13: error: expected expression before ‘)’ token > conftest.c:14: error: implicit declaration of function ‘shl_unload’ > conftest.c:14: error: expected ‘)’ before ‘handle’ > conftest.c:9: error: unused variable ‘p’ > -> failed (0) > no > checking for the gettimeofday() function.../usr/bin/cc -Wall -Werror -o > ../conftest conftest.c > yes > checking for the select() interface.../usr/bin/cc -Wall -Werror -o > ./conftest > conftest.c > yes > checking for a setproctitle() function.../usr/bin/cc -Wall -Werror -o > ../conftest conftest.c > cc1: warnings being treated as errors > conftest.c: In function ‘main’: > conftest.c:7: error: implicit declaration of function ‘setproctitle’ > -> failed (0) > no > checking for a syslog() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for syslog_r().../usr/bin/cc -Wall -Werror -o ./conftest conftest.c > conftest.c: In function ‘main’: > conftest.c:6: error: variable ‘sdata’ has initializer but incomplete type > conftest.c:6: error: ‘SYSLOG_DATA_INIT’ 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: storage size of ‘sdata’ isn’t known > cc1: warnings being treated as errors > conftest.c:7: error: implicit declaration of function ‘syslog_r’ > conftest.c:6: error: unused variable ‘sdata’ > -> failed (0) > no > checking for vsyslog().../usr/bin/cc -Wall -Werror -o ./conftest conftest.c > yes > checking for vsyslog_r().../usr/bin/cc -Wall -Werror -o ./conftest conftest.c > conftest.c: In function ‘foofn’: > conftest.c:8: error: variable ‘sdata’ has initializer but incomplete type > conftest.c:8: error: ‘SYSLOG_DATA_INIT’ undeclared (first use in this > function) > conftest.c:8: error: (Each undeclared identifier is reported only once > conftest.c:8: error: for each function it appears in.) > conftest.c:8: error: storage size of ‘sdata’ isn’t known > cc1: warnings being treated as errors > conftest.c:10: error: implicit declaration of function ‘vsyslog_r’ > conftest.c:8: error: unused variable ‘sdata’ > -> failed (0) > no > checking for the glob() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for the getopt() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for the execvp() function.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c > yes > checking for clock_gettime() interface (w/o -lrt).../usr/bin/cc -Wall > -Werror > -o ./conftest conftest.c > /tmp/cchlxFZY.o: In function `main': > conftest.c:(.text+0x19): undefined reference to `clock_gettime' > collect2: ld returned 1 exit status > -> failed (0) > no > checking for clock_gettime() interface (with -lrt).../usr/bin/cc -Wall > -Werror > -o ./conftest conftest.c -lrt > yes > checking for winmm time interface.../usr/bin/cc -Wall -Werror -o ./conftest > conftest.c -lwinmm > conftest.c:4:21: error: windows.h: No such file or directory > conftest.c:5:22: error: mmsystem.h: No such file or directory > conftest.c: In function ‘main’: > conftest.c:11: error: ‘DWORD’ undeclared (first use in this function) > conftest.c:11: error: (Each undeclared identifier is reported only once > conftest.c:11: error: for each function it appears in.) > conftest.c:11: error: expected ‘;’ before ‘t0’ > cc1: warnings being treated as errors > conftest.c:13: error: implicit declaration of function ‘timeBeginPeriod’ > conftest.c:15: error: ‘t0’ undeclared (first use in this function) > conftest.c:15: error: implicit declaration of function ‘timeGetTime’ > conftest.c:16: error: implicit declaration of function ‘Sleep’ > -> failed (0) > no > checking for SDL (http://www.libsdl.org)...yes (1.2.14) > checking whether SDL works.../usr/bin/cc -D_AGAR_INTERNAL -D_BSD_SOURCE > -Wall - > Werror -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -o ./conftest > conftest.c > -L/usr/lib -lSDL > yes > checking for OpenGL (http://www.opengl.org)...yes > checking whether OpenGL works.../usr/bin/cc -D_AGAR_INTERNAL -D_BSD_SOURCE - > Wall -Werror -o ./conftest conftest.c -L/usr/local/lib -lGL > yes > checking for the X window system.../usr/bin/cc -D_AGAR_INTERNAL > -D_BSD_SOURCE - > Wall -Werror -o ./conftest conftest.c -lX11 > yes > checking for the GLX interface.../usr/bin/cc -D_AGAR_INTERNAL -D_BSD_SOURCE - > Wall -Werror -o ./conftest conftest.c -L/usr/local/lib -lGL > yes > checking for the WGL interface.../usr/bin/cc -D_AGAR_INTERNAL -D_BSD_SOURCE - > Wall -Werror -o ./conftest conftest.c -L/usr/local/lib -lGL -lgdi32 > conftest.c:1:21: error: windows.h: No such file or directory > conftest.c: In function ‘main’: > conftest.c:4: error: ‘HWND’ undeclared (first use in this function) > conftest.c:4: error: (Each undeclared identifier is reported only once > conftest.c:4: error: for each function it appears in.) > conftest.c:4: error: expected ‘;’ before ‘hwnd’ > conftest.c:5: error: ‘HDC’ undeclared (first use in this function) > conftest.c:5: error: expected ‘;’ before ‘hdc’ > conftest.c:6: error: ‘HGLRC’ undeclared (first use in this function) > conftest.c:6: error: expected ‘;’ before ‘hglrc’ > conftest.c:8: error: ‘hwnd’ undeclared (first use in this function) > cc1: warnings being treated as errors > conftest.c:8: error: implicit declaration of function ‘CreateWindowEx’ > conftest.c:8: error: ‘WS_OVERLAPPEDWINDOW’ undeclared (first use in this > function) > conftest.c:8: error: ‘CW_USEDEFAULT’ undeclared (first use in this function) > conftest.c:9: error: ‘NULL’ undeclared (first use in this function) > conftest.c:9: error: implicit declaration of function ‘GetModuleHandle’ > conftest.c:10: error: ‘hdc’ undeclared (first use in this function) > conftest.c:10: error: implicit declaration of function ‘GetDC’ > conftest.c:11: error: ‘hglrc’ undeclared (first use in this function) > conftest.c:11: error: implicit declaration of function ‘wglCreateContext’ > conftest.c:12: error: implicit declaration of function ‘SwapBuffers’ > conftest.c:13: error: implicit declaration of function ‘wglDeleteContext’ > conftest.c:14: error: implicit declaration of function ‘ReleaseDC’ > conftest.c:15: error: implicit declaration of function ‘DestroyWindow’ > -> failed (0) > no > checking for FreeType (http://www.freetype.org)...yes (12.0.6) > checking whether FreeType works.../usr/bin/cc -D_AGAR_INTERNAL -D_BSD_SOURCE > - > Wall -Werror -I/usr/include/freetype2 -o ./conftest conftest.c -lfreetype -lz > yes > checking for libjpeg (ftp://ftp.uu.net/graphics/jpeg/)...yes > checking whether libjpeg works.../usr/bin/cc -D_AGAR_INTERNAL -D_BSD_SOURCE - > Wall -Werror -I/usr/include -o ./conftest conftest.c -L/usr/lib -ljpeg > yes > checking for libpng (http://www.libpng.org)...yes (1.2.44) > checking whether libpng works.../usr/bin/cc -D_AGAR_INTERNAL -D_BSD_SOURCE - > Wall -Werror -I/usr/include/libpng12 -o ./conftest conftest.c -L/usr/lib > -lpng12 > yes > checking for POSIX threads.../usr/bin/cc -D_AGAR_INTERNAL -D_BSD_SOURCE > -Wall - > Werror -o ./conftest conftest.c -lpthread > yes > checking for the X/Open Threads Extension.../usr/bin/cc -D_AGAR_INTERNAL - > D_BSD_SOURCE -Wall -Werror -U_XOPEN_SOURCE -D_XOPEN_SOURCE=600 -o ./conftest > conftest.c -lpthread > yes > checking for PTHREAD_MUTEX_RECURSIVE.../usr/bin/cc -D_AGAR_INTERNAL - > D_BSD_SOURCE -Wall -Werror -o ./conftest conftest.c -lpthread > cc1: warnings being treated as errors > conftest.c: In function ‘main’: > conftest.c:7: error: implicit declaration of function > ‘pthread_mutexattr_settype’ > conftest.c:7: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use in this > function) > conftest.c:7: error: (Each undeclared identifier is reported only once > conftest.c:7: error: for each function it appears in.) > -> failed (0) > no > checking for PTHREAD_MUTEX_RECURSIVE_NP.../usr/bin/cc -D_AGAR_INTERNAL - > D_BSD_SOURCE -Wall -Werror -o ./conftest conftest.c -lpthread > cc1: warnings being treated as errors > conftest.c: In function ‘main’: > conftest.c:7: error: implicit declaration of function > ‘pthread_mutexattr_settype’ > -> failed (0) > no > > > _______________________________________________ > Agar mailing list > [email protected] > http://libagar.org/lists.html
Here's what I did to get it working (although, not in a VM): sudo apt-get install autoconf libsdl1.2-dev libsdl-ttf2.0-dev libsdl-image1.2-dev #some of these may not be needed svn checkout http://dev.hypertriton.com/agar/trunk agar-trunk cd agar-trunk .../configure make depend all sudo make install sudo /sbin/ldconfig I remember having issues running ldconfig, so I ran it from the absolute path, /sbin/ldconfig instead. Josh. _______________________________________________ Agar mailing list [email protected] http://libagar.org/lists.html
