Hi Julien,
Thanks for these fixes, with them the Agar library from latest SVN
(revision 8627) could be built flawlessly.
As for the tests, apparently _USE_AGAR_TYPES is still lacking ; all
tests, but loader, could be built without:
"""
make[1]: quittant le répertoire « YYY/trunk/demos/focusing »
==> loader
make[1]: entrant dans le répertoire « YYY/trunk/demos/loader »
make[2]: entrant dans le répertoire « YYY/trunk/demos/loader »
cc -IXXX/agar-1.4/include/agar -IXXX/SDL-1.2.14/include/SDL
-D_GNU_SOURCE=1 -D_REENTRANT -IXXX/freetype-2.3.11/include/freetype2
-IXXX/freetype-2.3.11/include -I/usr/include -I. -o loader.o -c loader.c
loader.c: In function ‘LoadBMP’:
loader.c:32: error: ‘Uint8’ undeclared (first use in this function)
loader.c:32: error: (Each undeclared identifier is reported only once
loader.c:32: error: for each function it appears in.)
loader.c:32: error: ‘pSrc’ undeclared (first use in this function)
loader.c:41: error: expected expression before ‘)’ token
"""
Adding it by hand:
"""
cc -IXXX/agar-1.4/include/agar -IXXX/SDL-1.2.14/include/SDL
-D_GNU_SOURCE=1 -D_REENTRANT -IXXX/freetype-2.3.11/include/freetype2
-I/XXX/freetype-2.3.11/include -I/usr/include -I. -o loader.o -c
loader.c -D_USE_AGAR_TYPES
cc -I/XXX:agar-1.4/include/agar -IXXX/SDL-1.2.14/include/SDL
-D_GNU_SOURCE=1 -D_REENTRANT -IXXX/freetype-2.3.11/include/freetype2
-IXXX/freetype-2.3.11/include -I/usr/include -I. -o loader loader.o
-L/XXX:agar-1.4/lib -lag_gui -lag_core -L/XXX:SDL-1.2.14/lib -lSDL
-lpthread -L/XXX:freetype-2.3.11/lib -lfreetype -L/usr/local/lib -lGL
-lm -L/usr/lib -ljpeg -lpthread
"""
made this test compile and link.
In terms of execution, using these make targets:
"""
exec-sdl:
for D in ${SUBDIR}; do \
echo "==> executing $$D with SDL"; \
(cd $$D && ./$$D ); \
done
exec-gl:
for D in ${SUBDIR}; do \
echo "==> executing $$D with OpenGL"; \
(cd $$D && ./$$D -g ); \
done
"""
(although I know that the -g flag is not generalized) I had:
==> executing fixedres with SDL
Cannot find menubg.bmp
(although Images/menubg.bmp exists)
==> executing objsystem with SDL
Caught X error: GLXBadContextTag
Aborted
(when selecting the 'Create instance..' entry or being in other parts of
the menu)
==> executing focusing with SDL
Worked great, two windows + 1 chooser, seem to behave like expected.
When destroying the "Unfocused mousemotion window" I had:
AG_Fixed #0: focused
AG_Fixed #0: unfocused
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"
after 223059 requests (223058 known processed) with 0 events remaining.
==> executing loader with SDL
I did not find a way to specify to configure where my prefixed SDL_image
library was installed, so despite being in LD_LIBRARY_PATH it could not
be found ("checking for SDL_image
(http://libsdl.org/projects/SDL_image)...no).
At runtime a slim window told me that
"YYY/loader/Images/Meme.bmp: Unimplemented", when clicking on "ok" I had:
"""
> ./loader
Caught X error: GLXBadContextTag
Abandon
"""
What was strange is that I could not run that test anymore, still having
immediately:
"""
> ./loader
Caught X error: GLXBadContextTag
Abandon
"""
But rebuilding the loader exec allowed to run it again, with the same
result as initially.
I will try in the next few days to test the other demos. Please tell me
if I can give information to help the debugging (note that I had already
given some during my attempt #1 ; for what it's worth, I am testing on a
laptop, using an external LCD, if ever it had a link with GLX issues).
Best regards,
Olivier Boudeville.
Julien Nadeau a écrit :
> On Sun, Feb 07, 2010 at 06:50:57PM +0100, Olivier Boudeville wrote:
>
>> Hi,
>>
>> This time I tested the trunk, at revision 8617.
>>
>> There was a non-blocking error during configure:
>> [..]
>> checking whether OpenGL works...yes
>> checking for the X window system...yes
>> checking for the GLX interface...yes
>> [: 6021: yes: unexpected operator
>> checking for FreeType (http://www.freetype.org)...yes
>> [..]
>>
>> This was due to the double '=' in '[ "${HAVE_OPENGL}" == "yes" ]' which
>> must be replaced by a single one (I imagine configure is itself
>> generated by your build system).
>>
>
> Ok, fixed in r8618. Yes, configure is generated from configure.in.
>
>
>> Then libpng was not detected, whereas in the library path:
>> checking whether libjpeg works...yes
>> checking for libpng (http://www.libpng.org)...yes
>> checking whether libpng works...no
>> [..]
>>
>>
>> > ls XXX/PNG-1.2.40/lib
>> ..../ libpng.a@ libpng.so.3@ libpng12.a
>> libpng12.so.0@ pkgconfig/
>> ...../ libpng.so@ libpng.so.3.1.2.40* libpng12.so@
>> libpng12.so.0.1...2.40*
>>
>> because the relevant path was not set thanks to -L in the configure
>> test, despite libpng-config being in PATH and 'libpng-config --L_opts'
>> returning the correct -L path:
>>
>> checking whether libpng works.../usr/bin/cc -D_AGAR_INTERNAL
>> -D_BSD_SOURCE -Wall -Werror -IXXX/PNG-1.2.40/include/libpng12 -o
>> ..../conftest conftest.c -lpng12 -lz -lm
>> /usr/bin/ld: cannot find -lpng12
>> collect2: ld returned 1 exit status
>>
>> So it should be just a matter of using the output of 'libpng-config
>> --L_opts'.
>>
>
> Yep, fix committed to BSDBuild; thanks!
>
>
>> 'make' and 'make depend' run fine, but any 'make clean' issued before
>> will make them fail, not finding many Agar headers (incomplete CFLAGS),
>> as if it erased configuration information.
>>
>
> For some reason, make clean was implying "clean-config". Fix commited
> to SVN.
>
>
>> Anyway, 'make install' works correctly as well. It copies the header
>> files in XXX/agar-1.4/include/agar/agar, maybe there is one too many
>> nested agar directory (apparently SDL uses a symbolic link named SDL and
>> pointing to the current 'SDL' directory to avoid it).
>>
>
> The "agar/agar/" is intentional. It used to be a symbolic link, but that
> would break the build under platforms such as MinGW/MSYS.
>
>
>> Now for the demos, I suppose my remarks about a stopping configure and a
>> message about agar-config still hold.
>>
>
> Ok, ./configure will now abort if one of the tests fail.
>
>
>> In my case, configuration was ok but compilation failed for objsystem,
>> Uint32 not being known. agar/types.h was nevertheless (indirectly)
>> included. Replacing Uint32 by int allowed to compile. But the next test
>> (loader) failed on Uint8.
>>
>
> Fixed; the demo was missing the _USE_AGAR_TYPES definition (Uint32 and
> friends are not exported without it).
>
>
>
>
_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html