compile error on feisty fawn

You have a problem with TA3D, it doesn't run or it crashes...
/
Vous avez un problème avec TA3D, il ne se lance pas ou plante...
Post Reply
flockilan
Posts: 3
Joined: Sat Sep 01, 2007 7:09 am
Location: Germany

compile error on feisty fawn

Post by flockilan » Sat Sep 01, 2007 7:33 am

hi guys

i receive a compile error when trying to build ta3d. maybe you can help me. my environment is:

ubunty feisty fawn
gcc 4.1.2
ta3d 0.4.0
fmod 40625 (compiled from source)
allegro / gl 4.2.2 / 0.4.2 (compiled from source)


The steps that lead to the error are simple (error messages analogously translated from german ):

1. ./configure (did not complain about anything)
2. make

Code: Select all

g++ -DHAVE_CONFIG_H -I. -I..     -g -O2 -I/usr/local/include -ffast-math -mmmx -fomit-frame-pointer -MT gfx.o -MD -MP -MF .deps/gfx.Tpo -c -o gfx.o gfx.cpp
gfx.cpp: In constructor »TA3D::INTERFACES::GFX::GFX()«:
gfx.cpp:62: Error: »GFX_OPENGL_FULLSCREEN« undefined in this scope

What i did so far:

1. I tracked that switch to alleggl.h but did not get the point why the preprocessor would not have enabled it.

2. Then i examined the config.log in detail and found 2 warnings:

Code: Select all

configure:4566: gcc -E  conftest.c
conftest.c:14:28: error: ac_nonexistent.h: No such file or directory

Code: Select all

configure:6261: checking for sqrt
configure:6317: gcc -o conftest -g -O2   conftest.c -lfmodex -lz -lGLU -lGL  -L/usr/local/lib -Wl,--export-dynamic -lalleg-4.2.2 -lalleg_unsharable -lagl >&5
conftest.c:57: warning: conflicting types for built-in function 'sqrt'
configure:6323: $? = 0
configure:6341: result: yes
configure:6261: checking for strcasecmp
configure:6317: gcc -o conftest -g -O2   conftest.c -lfmodex -lz -lGLU -lGL  -L/usr/local/lib -Wl,--export-dynamic -lalleg-4.2.2 -lalleg_unsharable -lagl >&5
conftest.c:58: warning: conflicting types for built-in function 'strcasecmp'
configure:6323: $? = 0
configure:6341: result: yes
configure:6261: checking for strdup
configure:6317: gcc -o conftest -g -O2   conftest.c -lfmodex -lz -lGLU -lGL  -L/usr/local/lib -Wl,--export-dynamic -lalleg-4.2.2 -lalleg_unsharable -lagl >&5
conftest.c:59: warning: conflicting types for built-in function 'strdup'
configure:6323: $? = 0
configure:6341: result: yes
configure:6261: checking for strstr
configure:6317: gcc -o conftest -g -O2   conftest.c -lfmodex -lz -lGLU -lGL  -L/usr/local/lib -Wl,--export-dynamic -lalleg-4.2.2 -lalleg_unsharable -lagl >&5
conftest.c:60: warning: conflicting types for built-in function 'strstr'
configure:6323: $? = 0
configure:6341: result: yes

I'm not familiar with C so i don't kow what (pre)compiler switches or libraries might be missing to have the fullscreen-switch defined.

It would be great if you have any ideas that help me.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Sep 01, 2007 12:32 pm

hmmm that's a bug due to AllegroGL not being able to switch to full screen mode. It happens because AllegroGL can be built without the lib that allows it but TA3D requires it... I forgot to add a test in the code.

You'll need to install libxxf86vm-dev, then rebuild & reinstall AllegroGL.
=>;-D Penguin Powered

flockilan
Posts: 3
Joined: Sat Sep 01, 2007 7:09 am
Location: Germany

Post by flockilan » Sun Sep 02, 2007 10:36 am

hi zuzuf, your advice was correct. now i get stuck at the real root of the problem.

1. I installed libxxf86vm-dev (and aptitude auto-added x11proto-xf86vidmode-dev).

2. configure in alleggl didnt complain and explicitly said

Code: Select all

checking for XF86VidModeQueryExtension in -lXxf86vm... yes
3. make stopped with several errors and warnings (again translated)

Code: Select all

gcc -o obj/unix/release/x.o -Iinclude -Iinclude/allegrogl -Iinclude/allegrogl/GLext -I/usr/local/include  -O2 -Wall -ffast-math -fomit-frame-pointer -fPIC -c src/x.c
src/x.c:458: Error: expected »)« before »*« token
src/x.c: In Function »allegro_gl_x_exit«:
src/x.c:519: Error: »struct _xwin_type« has no element named »mode_switched«
src/x.c:520: Warning: Implicit declaration of function »XF86VidModeLockModeSwitch«
src/x.c:521: Warnung: Warning: Implicit declaration of function »XF86VidModeSwitchToMode«
Followed by another 5 errors and 15 warnings in some other allegro_gl_x_... functions.

4. Then i installed xorg-dev and xserver-xorg-dev (with aptitude adding approx. 30 other dev packages) but nothing changed.


I will now start to scan the configure script to find other library names that might be missing.

But nevertheless if you know the solution by heart ... please let me know.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Sep 02, 2007 11:34 am

hmm, seems that rebuilding AllegroGL isn't enough, rebuild Allegro too.
=>;-D Penguin Powered

flockilan
Posts: 3
Joined: Sat Sep 01, 2007 7:09 am
Location: Germany

Post by flockilan » Sun Sep 02, 2007 4:23 pm

yes. thanx. it was as easy as that :)

now i just need to figure out why hpiview does not accept my ta1.iso mount as cd_path ... . but that's nothing for this topic.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Sep 02, 2007 4:31 pm

hm strange, I will do some tests.

NB: hpiview/ta3d try to guess the cd path, but if you've mounted it yourself, make sure you give the path as parameter. ie : ./hpiview install /mnt/my_iso.
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests