User compile report (linux)

You have tested TA3D, share your experience /
Vous avez testé TA3D, venez partager votre expérience
Post Reply
surge
Posts: 3
Joined: Wed Mar 12, 2008 3:29 pm

User compile report (linux)

Post by surge » Sun Aug 02, 2009 6:44 am

Hi, this is my report on issues when I tried to compile TA3D. The system is
32bit x86 running Debian/linux v5.0. gcc is version 4.3.2, libc version 2.7.
There is some nitpicking here, feel free to ignore those points.

*) According to http://www.ta3d.org/linuxdl-en.php, 0.5.4 release is not
available in any format, despite news entry claiming it is ready. (7z is a
esoteric format too, and last time I tried (6months ago) even after compiling
latest version of 7zip, the files were reported as corrupt; use plain zip)

FIX: Used svn trunk from ~ 02-08-2009 1400 GMT+1000.

*) Documentation fix?:
ran ccmake and set:
CMAKE_INSTALL_PREFIX /opt/ta3d
generate and configure. All requirements met from a previous attempt. No
errors on compile.
Does not appear to need fmod or allegro anymore? ldd on
resulting executable doesnt report links to either.

*) make gave alot of integer -> floating point warnings. Could be a problem.
(Other warnings like GLUbyte -> int and sign mismatches are usually fine;
use typecasting to shut the compiler up)

*) ta3d/src/ta3d/docs is in the wrong place/makefile broken. On `make install`:
CMake Error at ta3d/cmake_install.cmake:36 (FILE):
file INSTALL cannot find file "/opt/ta3d/svn/ta3d/src/ta3d/docs" to
install.
Call Stack (most recent call first):
cmake_install.cmake:39 (INCLUDE)

FIX: cp -r /opt/ta3d/svn/ta3d/docs /opt/ta3d/svn/ta3d/src/ta3d/

*) ta3d/src/ta3d/Changelog is in the wrong place/makefile broken. On `make
install`:
CMake Error at ta3d/cmake_install.cmake:120 (FILE):
file INSTALL cannot find file "/opt/ta3d/svn/ta3d/src/ta3d/ChangeLog" to
install.
Call Stack (most recent call first):
cmake_install.cmake:39 (INCLUDE)

FIX: cp /opt/ta3d/svn/ta3d/ChangeLog /opt/ta3d/svn/ta3d/src/ta3d/ChangeLog

*) Minor irritation. On `make install`:
-- Installing: /opt/ta3d/games/ta3d
I asked for /opt/ta3d/ta3d

FIX: cp /opt/ta3d/games/ta3d /opt/ta3d/

*) Runtime failure:
[Sun Aug 2 14:50:25 2009] [error] [tdf] Unable to open `/home/surge/.ta3d/ta3d.cfg`
[Sun Aug 2 14:50:25 2009] [error] [settings] Impossible to load the settings from `/home/surge/.ta3d/ta3d.cfg`

FIX: `touch /home/surge/.ta3d/ta3d.cfg`

[Sun Aug 2 14:52:43 2009] [warns] [tdf] The file `/home/surge/.ta3d/ta3d.cfg` is empty (file size=0).
[Sun Aug 2 14:52:43 2009] [error] [settings] Impossible to load the settings from `/home/surge/.ta3d/ta3d.cfg`

Is this really an error?

*) Further down in the output... Runtime failure:
[Sun Aug 2 14:52:43 2009] [error] RESOURCES ERROR
RESOURCES ERROR

I assume this is because it cant find its various resource files - they were
reported as installed by `make install` in /opt/ta3d/share/...

A strace shows:
stat64("/usr/share/games/ta3d/", 0xbfc9c5dc) = -1 ENOENT (No such file or directory)
stat64("/usr/share/games/ta3d/resources/", 0xbfc9c5dc) = -1 ENOENT (No such file or directory)
stat64("/opt/ta3d/./resources/", 0xbfc9c5dc) = -1 ENOENT (No such file or directory)

These were the only attempts to load anything from '*share/games/*', so I'm
stumped for now.


I would have preferred to just use a stable branch, and thus not bother you
with complaints about this, but see 1st point.

Hope this helps.

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

Re: User compile report (linux)

Post by zuzuf » Sun Aug 02, 2009 11:16 am

You can get the source of the stable releases from SVN too (in tags/ for 0.5 branch, in archives/ for older versions). I didn't make source packages for last 0.5.x versions because it was time consuming and source can be grabbed from SVN and there are packages for Ubuntu/Mandriva (and I know someone makes packages too for SUSE Linux), I didn't test the Ubuntu package on Debian, it may work.

Currently 0.6 install process is completely broken, if you want to run it, then run cmake with -DDEV:bool=true and run ta3d from where it is. Once there, you'll have to install TA HPI files (at least totala1.hpi and some maps) to play, you can do that using the ota_resources_installer.sh script and your TA CDs.
As you already noticed, 0.6 doesn't use Allegro and FMod any more, we switched everything to SDL(SDL, SDL_image, SDL_net, SDL_mixer) in order to have more control and fix a few things.

Several run time errors can be safely ignored (like the config file reading error which is normal during the first run of TA3D since the file doesn't exist, it disappears after the first successful start of the program).

Concerning 7zip, it's the first time I see a problem with it, but it's too late to come back on this choice, 7zip will become a dependency of TA3D (we use it to extract mods archives downloaded from the mod repository system). It's really strange, I have been using Debian 5.0 for a while too and I didn't have problems with 7zip ...

Thank you for reporting.
=>;-D Penguin Powered

surge
Posts: 3
Joined: Wed Mar 12, 2008 3:29 pm

Re: User compile report (linux)

Post by surge » Tue Aug 04, 2009 1:19 am

So, heres my 2nd go. This time I used 0.5.4 from svn. There was
still alot of jumping through hoops. I made some patches you might want
to add to a minor revision, say 0.5.5?

Since it worked, I'm now engrossed in playing(!). What follows is just a cut
and paste of notes I made as I was compiling, so please forgive how disjointed
it is. If I don't send it now, I'll probably forget, and you'd never get the
patches. Hopefully it's still useful for other reasons too.

base=/opt/ta3d
cd $base
tar xzf allegro-4.2.2.tar.gz
cd allegro-4.2.2
./configure --prefix=/opt/ta3d --bindir=/opt/ta3d --sbindir=/opt/ta3d --sysconfdir=/opt/ta3d #--enable-static=yes --enable-shared=no
make install

cd $base
tar xjf alleggl-0.4.3.tar.bz2
cd alleggl
PATH=/opt/ta3d:$PATH LD_LIBRARY_PATH=/opt/ta3d/lib:$LD_LIBRARY_PATH ./configure --prefix=/opt/ta3d --bindir=/opt/ta3d --sbindir=/opt/ta3d --sysconfdir=/opt/ta3d # --enable-static=yes --enable-shared=no
make install

cd $base
svn co http://svn.ta3d.org/ta3d/tags/ta3d_0_5_4 0.5.4
cd 0.5.4
#CPPFLAGS="-I/opt/ta3d/include -I/opt/fmodapi42006linux/api/inc/"
#LDFLAGS="-L/opt/ta3d/lib -L/opt/fmodapi42006linux/api/lib"
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ta3d/lib:/opt/fmodapi42006linux/api/lib
#PKG_CONFIG_PATH=/opt/ta3d PATH=$PATH:/opt/ta3d
# Sigh, cmake ignores standard environment, we have to do them manually...
cmake -DCMAKE_CXX_FLAGS:STRING="-O2 -Wall -ffast-math -pipe -I/opt/ta3d/include" \
-DCMAKE_C_FLAGS:STRING="-O2 -Wall -ffast-math -pipe -I/opt/ta3d/include" \
#-DCMAKE_MODULE_LINKER_FLAGS:STRING="-L/opt/ta3d/lib -L/opt/fmodapi42006linux/api/lib" \
-DCMAKE_EXE_LINKER_FLAGS:STRING="-L/opt/fmodapi42006linux/api/lib" \

-DCMAKE_INSTALL_PREFIX:STRING=/opt/ta3d \
-DALLEGRO_CONFIG_BIN:FILEPATH=/opt/ta3d/allegro-config \
-DVAR_LIB_ALLEG_GL:FILEPATH=/opt/ta3d/lib/libagl.so \
-DVAR_LIB_FMODEX:FILEPATH=/opt/fmodapi42006linux/api/lib/libfmodex.so .

*) CMake Error at CMakeLists.txt:242 (STRING):
string sub-command LENGTH requires two arguments.

patch -p0 -l CMakeLists.txt - << 'EOF'
239c239
< EXECUTE_PROCESS( COMMAND allegro-config --libs release OUTPUT_VARIABLE ALLEGRO_CONFIG )
---
> EXECUTE_PROCESS( COMMAND ${ALLEGRO_CONFIG_BIN} --libs release OUTPUT_VARIABLE ALLEGRO_CONFIG )
EOF


-- TA3D will be installed in: /opt/ta3d
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/ta3d/0.5.4

*) make

In file included from /opt/ta3d/include/alleggl.h:85,
from /opt/ta3d/0.5.4/src/stdafx.h:117,
from /opt/ta3d/0.5.4/src/TA3D_hpi.cpp:7:
/opt/ta3d/include/alleggl_config.h:59:1: warning: "PACKAGE_VERSION" redefined
In file included from /opt/ta3d/0.5.4/src/stdafx.h:33,
from /opt/ta3d/0.5.4/src/TA3D_hpi.cpp:7:
/opt/ta3d/0.5.4/src/../config.h:12:1: warning: this is the location of the previous definition

patch -p0 src/stdafx.h - << 'EOF'
32,33d31
< // Include the config options generated by the configure script
< # include "../config.h"
34a33,63
> /*
> ** The Allegro library
> */
> # if defined TA3D_PLATFORM_WINDOWS //&& defined TA3D_PLATFORM_MSVC
> # ifdef TA3D_PLATFORM_MSVC
> # pragma warning(disable : 4554)
> # pragma warning(disable : 4996)
> # pragma comment( lib, "tools/win32/libs/alleg.lib" )
> # pragma comment( lib, "tools/win32/libs/agl.lib" )
> # pragma comment( lib, "opengl32.lib" )
> # pragma comment( lib, "glu32.lib" )
> # pragma comment( lib, "glaux.lib" )
> # pragma comment( lib, "tools/win32/libs/glew32.lib" )
> # include "tools/win32/include/gl/glew.h"
> // Cire: I had to setup a pragma on c4312, 4005 warnings, because allgero include
> // was generating alot of compiler noise.
> # pragma warning( disable : 4312 )
> # pragma warning( disable : 4005 )
> # endif
> # include <alleggl.h> // alleggl also includes allegro
> // Cire: Restore warning states
> # ifdef TA3D_PLATFORM_MSVC
> # pragma warning( default : 4005 )
> # pragma warning( default : 4312 )
> # endif
> # else
> // Cire:
> // Other platfroms may wish to adjust how allegro is included, for
> // now its this way.
> # include <alleggl.h>
> #endif
36a66,76
> // zuzuf: to prevent some warnings
> # undef PACKAGE_BUGREPORT
> # undef PACKAGE_NAME
> # undef PACKAGE_TARNAME
> # undef PACKAGE_STRING
> # undef PACKAGE_VERSION
> // Include the config options generated by the configure script
> # include "../config.h"
>
89,120d128
< ** The Allegro library
< */
< # if defined TA3D_PLATFORM_WINDOWS //&& defined TA3D_PLATFORM_MSVC
< # ifdef TA3D_PLATFORM_MSVC
< # pragma warning(disable : 4554)
< # pragma warning(disable : 4996)
< # pragma comment( lib, "tools/win32/libs/alleg.lib" )
< # pragma comment( lib, "tools/win32/libs/agl.lib" )
< # pragma comment( lib, "opengl32.lib" )
< # pragma comment( lib, "glu32.lib" )
< # pragma comment( lib, "glaux.lib" )
< # pragma comment( lib, "tools/win32/libs/glew32.lib" )
< # include "tools/win32/include/gl/glew.h"
< // Cire: I had to setup a pragma on c4312, 4005 warnings, because allgero include
< // was generating alot of compiler noise.
< # pragma warning( disable : 4312 )
< # pragma warning( disable : 4005 )
< # endif
< # include <alleggl.h> // alleggl also includes allegro
< // Cire: Restore warning states
< # ifdef TA3D_PLATFORM_MSVC
< # pragma warning( default : 4005 )
< # pragma warning( default : 4312 )
< # endif
< # else
< // Cire:
< // Other platfroms may wish to adjust how allegro is included, for
< // now its this way.
< # include <alleggl.h>
< #endif
<
< /*
208,214d215
< // zuzuf: to prevent some warnings
< # undef PACKAGE_BUGREPORT
< # undef PACKAGE_NAME
< # undef PACKAGE_TARNAME
< # undef PACKAGE_STRING
< # undef PACKAGE_VERSION
<
EOF

Ideally stdafx.h should be restructured more to put, for example, X11 and OpenGL
include before allegro, but that patch was long enough and it seemd to work.


*) In file included from /opt/ta3d/include/allegrogl/gl_ext.h:27,
from /opt/ta3d/include/alleggl.h:73,
from /opt/ta3d/0.5.4/src/stdafx.h:117,
from /opt/ta3d/0.5.4/src/TA3D_hpi.cpp:7:
/opt/ta3d/include/allegrogl/GLext/gl_ext_api.h:1827: error: ‘<anonymous>’ has incomplete type
/opt/ta3d/include/allegrogl/GLext/gl_ext_api.h:1827: error: invalid use of ‘GLvoid’
make[2]: *** [src/CMakeFiles/hpi.dir/TA3D_hpi.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/hpi.dir/all] Error 2
make: *** [all] Error 2

Fix applied as per http://www.allegro.cc/forums/thread/593588/703467

make install


*)
rm -rf ~/.ta3d/
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ta3d/lib/:/opt/fmodapi42006linux/api/lib/ games/ta3d --install

[Tue Aug 4 07:26:40 2009] [debug] [audio] loading sound file reclaim1
[Tue Aug 4 07:26:40 2009] [debug] [audio] Reading: Done.
[Tue Aug 4 07:26:44 2009] [debug] [menu::introduction] Done.
[Tue Aug 4 07:26:44 2009] [debug] [menu::main] Entering...
[Tue Aug 4 07:26:44 2009] [error] [tdf] Unable to open `gui/main.area`
surge@animal:/opt/ta3d$ ls -l /opt/ta3d/share/games/ta3d/gui/main.area
-rw-r--r-- 1 surge games 127 2009-08-04 05:02 /opt/ta3d/share/games/ta3d/gui/main.area

Clearly it's ignoring the configured install path. Why make multiple copies of
the data all over the place?
surge@animal:/opt/ta3d$ grep RESOURCES 0.5.4/config.h
# define TA3D_RESOURCES_PATH "/usr/share/games/ta3d/"
Hmm. cmake ignored it too.
Inferred from http://www.ta3d.org/forums/viewtopic.php?f=3&t=979:

cp ~/.ta3d/resources/* /opt/ta3d/share/games/ta3d/
rm -rf ~/.ta3d/resources/
ln -s /opt/ta3d/share/games/ta3d ~/.ta3d/resources

SUCCESS! First impressions:
- Grouping doesnt work. Nor do map bookmarks. Different controls?
- queued build numbers missing on construction base items.
- Multiplayer didnt seem to work. May have to holepunch firewall for it though.
- It's a little slow. Slower than I think it should be. This may be allegros
fault (thankfully its not used anymore in v0.6).
- skirmish/multiplayer options missing ('game ends' etc.)

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Re: User compile report (linux)

Post by Balthazar » Tue Aug 04, 2009 5:59 am

Why don`t you try 0.6.x branch? It have a HUGE amount of changes compared to 0.5.4.

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

Re: User compile report (linux)

Post by zuzuf » Tue Aug 04, 2009 7:46 am

hm, that's odd, I left 0.5.x in a working state (it seemed), maybe some library update broke something (allegro is bad for this).
Also I made a small update to AllegroGL (only fixes), you can get it from http://ta3d.org/files/libraries/alleggl-0.4.4.tar.bz2
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests