Tnl Compilation problems on ubuntu 14.04 on 86-64 platform

Tnl Compilation problems on ubuntu 14.04 on 86-64 platform

Postby wirser » 25 Mar 2016, 18:17

If all goes as planned this will be the topic for my continuing efforts to compile TnL

If you want short and sweet go elsewhere now


All further post will probably be long and boring
When I eventually succeed I will post a new topic on how to compile on ubuntu linux
wirser
 
Posts: 15
Joined: 25 Feb 2016, 18:21

compilation progress report 3-26-2016

Postby wirser » 25 Mar 2016, 18:18

3-26-2016
IO language -Thunder and Lightning {Tnl} compilation progress report
Hi
buy stumbling on - software project Thunder and Lightning http://tnlgame.net/
I was introduced to IO http://iolanguage.org/
I have attempted to compile Tnl and reported my findings

As seen I am generating lots of data and am probably needing to find better avenues to report my findings
For Tnl I probably can do a separate topic on you forums
UPDATE on Tnl Contributions forum I started a seperate topic
For IO I feel that using the Github issue feature may not be the best method I'd like not to get on facebook and either would like either a forum based methode or direct email

Developers please inform me of your preferences I am capable to generate lots of potentially useful data logs searches and such

At the moment I have lots of time but atm limited computer access, in a couple of weeks I will be able to increase availability of compilation resources however it will be only 32 bit but I will still have 64 bit limited access cross compiling will be possible

I hope tyo be helpfull to both projects
Phil Wirtz

***********************Latest compilation report***********************

attempting to use IO-git tag io-2010.06.06.zip was suggest as a possible remedy to compilation problems experienced attempting to compile tnl git from 2-22-2016 on ubuntu 14.04 86-64. This attempt failed for the following reasons (work arounds aloso included)

IO
make compiled without errors
sudo make install completed without errors
However the header files for the vm did not install

TnL

using
./configure --with-io-cflags=-I/home/none/build/io-2010.06.06/_build/headers --with-opengl-cflags=-I/usr/include/GL --with-openal-cflags=-I/usr/include/AL --with-io-libs=-L/home/none/build/io-2010.06.06/_build/dll/ LIBS=-lCEGUIBase

resulted in errors

g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src -g -O2 -fpermissive -I/home/none/build/io-2010.06.06/_build/headers -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/CEGUI -MT ActorMapping.o -MD -MP -MF .deps/ActorMapping.Tpo -c -o ActorMapping.o ActorMapping.cc
ActorMapping.cc: In static member function ‘static void {anonymous}::ActorMapping::addMapping(Ptr<IGame>, IoState*)’:
ActorMapping.cc:25:48: error: ‘IoState_registerProtoWithId_’ was not declared in this scope
IoState_registerProtoWithId_(state, self, id);

In file included from ActorMapping.cc:10:0:
ActorMapping.cc: In static member function ‘static IoObject* {anonymous}::ActorMapping::create(Ptr<IActor>, IoState*)’:
mappings.h:216:36: error: ‘IoState_protoWithId_’ was not declared in this scope
IoState_protoWithId_(state, (ID)));

using grep to attempt to locate the needed fil(s) to include resulted in no returns

grep -r "IoState_registerProtoWithId_" ~/build/io-2010.06.06/
grep -r "IoState_ProtoWithId_" ~/build/io-2010.06.06/

********************************
also reported but not tracked down were these errors among others which is identical to errors received compiled using IO git from 02-23-2016 which prohibits successful compilation on ubuntu linux
***********************************

make[3]: Entering directory `/home/none/build/Thunder-Lightning-mod/TnL-source/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -I/usr/include/GL -I/usr/include/AL -g -O2 -fpermissive -I/home/none/build/io-2010.06.06/_build/headers -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/CEGUI -MT game.o -MD -MP -MF .deps/game.Tpo -c -o game.o game.cc
In file included from game.cc:49:0:
/home/none/build/io-2010.06.06/_build/headers/IoState_inline.h: In function ‘IoObject* IOTRUE(IoObject*)’:
/home/none/build/io-2010.06.06/_build/headers/IoState_inline.h:41:20: error: redefinition of ‘IoObject* IOTRUE(IoObject*)’
IOINLINE IoObject *IOTRUE(IoObject *self)
^
In file included from /home/none/build/io-2010.06.06/_build/headers/IoState.h:200:0,
from /home/none/build/io-2010.06.06/_build/headers/IoObject_inline.h:12,
from /home/none/build/io-2010.06.06/_build/headers/IoObject.h:241,
from ./interfaces/IActor.h:4,
from ./modules/collide/Collidable.h:5,
from ./modules/collide/CollisionManager.h:11,
from game.cc:25:
/home/none/build/io-2010.06.06/_build/headers/IoState_inline.h:41:20: error: ‘IoObject* IOTRUE(IoObject*)’ previously defined here
IOINLINE IoObject *IOTRUE(IoObject *self)
^
wirser
 
Posts: 15
Joined: 25 Feb 2016, 18:21

Re: Tnl Compilation problems on ubuntu 14.04 on 86-64 platfo

Postby wirser » 26 Apr 2016, 17:46

Good News
I have suceeded in compiling Thunder and Lighting on a ubuntu linux 14.04 on a T22 IBM Thinkpad (yeah I know a dinosaur)
I Even succeeded in ¨running¨ it (fps dropped to zero REAL quick)

The bad news is that it took some work 8⁽(
also it starts but does not start new mission

While I am sure there are better ways to solve some of these issues
I may even in time find and post about them
I have even repeated the steps to insure other may follow ;^ )

I am even have a 64 bit build on the same linux

first most of the problems come from the usage of IO
upon investigating both source and known Deb packages I found

First and foremost is the libraries needed by TnL from IO are not normally Installed.
But are compiled in the IO source tree (IOVM) which are

{path to io source}/_build/dll/libiovmall.so
which requires
libbasekit.so
libcoroutine.so
libgarbagecollector.so

which also need but are in normal locations and thus are found without extra effort
(numbers may differ depending on build system)
libc.so.6
lidl.so.2

The second involves CEGUI include locations and link libs while not as complicated as IO difficulties still are notable

Third was installing sigc++1.2 dev (it seems to behave along sigc++2.0 but wont compile against it )

______________________Steps to Compile___________________________
Step one - Compiling IO ( I used io-2013.12.04 version so other versions may have different file locations)
obtain IO source from github at:
I made a folder named build and unpacked it there
cd into IO source tree
mkdir build
~/build/io-2013.12.04$ cd build
~/build/io-2013.12.04/build$ cmake ..

I got an error about "drawstuff" not found in addons connected to ODE addon
to get cmake to run without error: in {path to IO source}/addons edit "CMakeLists.txt"
and comment out (put # at begining of line) the offending object -
you do not need any addons to compile Tnl

~/build/io-2013.12.04/build$ make

if all goes well you are ready to compile TNL

Step two - Compiling TnL
for this example I got the source from Github and put it in a folder under my build folder
cd into TnL source folder then into ¨TnL-source¨ folder
The INSTALL file says to ¨autoreconf¨ which will error

configure.in:125: error: required file './compile' not found
configure.in:125: 'automake --add-missing' can install 'compile'
Makefile.am: error: required file './README' not found
so ¨touch ./README¨ and then ¨automake --add-missing¨ then ¨autoreconf¨
or to make it easy
touch ./README && automake --add-missing && autoreconf

now the fun begins fwiw this is my configure line
replace {path to io source} with the absolute path not relative like using ~/build/io-blah/ or such
./configure --with-io-cflags=-I{path to io source}/build/io-2013.12.04/build/_build/headers --with-opengl-cflags=-I/usr/include/GL --with-openal-cflags=-I/usr/include/AL --with-io-libs=-L{path to io source}/build/io-2013.12.04/build/_build/dll/ LIBS=-lCEGUIBase

Pay attention to the output or you may need to later install some dependancies
now you can issue the ¨make¨ command, this will not go well
The first error (after figuring io include problems) is

MainGUI.cc:1:29: fatal error: CEGUIBase/CEGUI.h: No such file or directory
#include <CEGUIBase/CEGUI.h>
change ¨CEGUIBase/¨ to ¨CEGUI/¨ BE CAREFULL NOT changing CEGUIBase.h to CEGUI.h
in the following files
/scr/modules/ui/MainGUI.cc:
/scr/modules/ui/MainGUI.h
/scr/modules/ui/MainMenu.h
/scr/modules/ui/MissionSelector.cc
/scr/modules/ui/MissionSelector.h
/scr/modules/ui/SettingsDlg.cc
/scr/modules/ui/SettingsDlg.h
/src/game.cc
/src/CEGUIEventFilter.cc
/src/TnlCeguiLogger.h:

from
CEGUI/RendererModules/CEGUIOpenGLRenderer.h
to
CEGUI/RendererModules/OpenGL/CEGUIOpenGLRenderer.h
in file
/src/game.cc

this error

sound.cc: In function ‘void check(ALCdevice*)’:
sound.cc:333:56: error: invalid conversion from ‘const ALCchar* {aka const char*}’ to ‘const ALbyte* {aka const signed char*}’ [-fpermissive]
const ALbyte * errtxt = alcGetString(NULL,error);
^
sound.cc: In constructor ‘ALSoundMan::ALSoundMan(Ptr<IConfig>)’:
sound.cc:355:54: error: invalid conversion from ‘const ALCchar* {aka const char*}’ to ‘const ALCbyte* {aka const signed char*}’ [-fpermissive]
alcGetString(device, ALC_DEVICE_SPECIFIER);

needs

in {path to tnl source}/TnL-source/src/Makefile add ¨-fpermissive¨ to the following line so that

CXXFLAGS = -g -O2 -I{path to io source}/build/_build/headers -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/CEGUI

becomes this

CXXFLAGS = -g -O2 -fpermissive -I/{path to io source}/build/_build/headers -I/usr/lib/sigc++-1.2/include -I/usr/include/sigc++-1.2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/CEGUI

also add ¨-L{path to io source}/build/_build/dll/ -liovmall -lbasekit -lgarbagecollector
to
tnl_bin_LDADD = $(tnl_libs) -L/usr/lib/i386-linux-gnu -lSDL -lsigc-1.2 -lGL -lGLU -lpthread \
-lopenal -lalut -lopenal -lpng
to become
tnl_bin_LDADD = $(tnl_libs) -L/usr/lib/i386-linux-gnu -lSDL -lsigc-1.2 -lGL -lGLU -lpthread \
-lopenal -lalut -lopenal -lpng -L{path to io source}/build/_build/dll/ -liovmall -lbasekit -lgarbagecollector
finally change this from
LIBS =-lCEGUIBase
to
LIBS = -lCEGUIOpenGLRenderer -lCEGUIBase

__________________________To Run_______________________________-

copy data files from
{path to tnl source}/TnL-data/share
to
{path to tnl source}/TnL-source/share

cd {path to tnl source}/TnL-source/src

LD_LIBRARY_PATH={path to io source}/build/_build/dll
export LD_LIBRARY_PATH
./tnl-bin

_______________________________more bad news_______________________
The game does start but when i was attempting a new game it crashes with the following output

Executing /home/none/build/Thunder-Lightning-mod/share/tnl/scripts/MissionManager.io.
Executing /home/none/build/Thunder-Lightning-mod/share/tnl/scripts/Mission.io.
Io Exception

Exception: Faction does not respond to 'HOSTILE'
---------
Faction HOSTILE Mission.io 67
Object doFile Z_Importer.io 65
Call relayStopStatus A4_Exception.io 24
Call delegateToMethod simulation_init.io 20
FileImporter importPath Z_Importer.io 49
FileImporter tryToImportProtoFromFolder Z_Importer.io 34
FileImporter import Z_Importer.io 125
List detect Z_Importer.io 125
true and Z_Importer.io 125
MissionManager Mission MissionManager.io 11
Importer import Z_Importer.io 138
MissionManager init MissionManager.io 39
Object doFile Z_Importer.io 65
Call relayStopStatus A4_Exception.io 24
Call delegateToMethod simulation_init.io 20
FileImporter importPath Z_Importer.io 49
FileImporter tryToImportProtoFromFolder Z_Importer.io 34
FileImporter import Z_Importer.io 125
List detect Z_Importer.io 125
true and Z_Importer.io 125
Object MissionManager IoState_doCString 1
Importer import Z_Importer.io 138

Couldn't retrieve number of missions from MissionManager
(MissionManager numMissions) must return a number.
Caught exception: Couldn't receive number of missions from MissionManager
terminate called after throwing an instance of 'std::runtime_error'
what(): Couldn't receive number of missions from MissionManager
Aborted (core dumped)
wirser
 
Posts: 15
Joined: 25 Feb 2016, 18:21

Re: Tnl Compilation problems on ubuntu 14.04 on 86-64 platfo

Postby charlie » 06 May 2016, 10:19

Well done!

I would try to submit a pull request on github:

https://github.com/indyjo/Thunder-Lightning
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2131
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Tnl Compilation problems on ubuntu 14.04 on 86-64 platfo

Postby wirser » 16 May 2016, 17:28

Well I'm currently in the middle of upgrading to ubuntu 16.04 (have many issues)

Secondly What if any benifit would there be in making a "pull request" ?

Let me explain my plan of attack
due to issues in the build systems of both Tnl and more so IO I am currently studying bot autotool and cmake systems
While in doing this I hope to both help Tnl but also gain knowledge I can apply to getting gainfully employed
Having said this, as far as Tnl issues
I figure for the #include modifications I am currently thinking a patch would be good
for the issue with the compile error in

sound.cc:333:56: error: invalid conversion from ‘const ALCchar* {aka const char*}’ to ‘const ALbyte* {aka const signed char*}’ [-fpermissive]

being my work around involved modifying the Makefile I'm not comfortable in doing this on a permanent basis. I feel the underlying code error should be fixed ( beyond my current abilities)

IO however is a source a many build issues which will prevent any mainstream Linux version even considering having packages sanctioned for their distros. I am sure that rewritting the various cmake files will solve most of the problems, I didn't count on this when first looking into Tnl compiling. the biggest question is wether IO developer(s) actually want these modifications made therefore allowing linux packages to be made for IO removing most if not all problems for Tnl packages be made ( once it is running of course)
wirser
 
Posts: 15
Joined: 25 Feb 2016, 18:21

Re: Tnl Compilation problems on ubuntu 14.04 on 86-64 platfo

Postby charlie » 17 May 2016, 10:50

A pull request would mean he just merges your changes on github. Otherwise he has to manually copy them over from here, which (if he's not got Linux to test on) means an additional step open to human error. You just fork hit repo on github, commit your changes, and then the pull request and everybody's life is easier and your changes are much quicker to transition to the official repo.
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2131
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Tnl Compilation problems on ubuntu 14.04 on 86-64 platfo

Postby wirser » 28 May 2016, 17:44

Well that clarifies that up to some extent

But, given the types and numbers of troubles I've ran into , for the present it is not an option (at least from Tnl repo)

I've decided to focus on the building of IO
being Tnl relies so much on IO and the IO-libs it seams important that "proper installation " is needed
While the libs for the addons (which are not used by Tnl) are installed the "IOVM libs" are not
This creates a situation (at least for me) of hardcoding them in a non-linux or perhaps better stated non-dynamic manner
The required extra steps for linking IO are at best not for the novice :?

I think my first real attempt will involve creating a new IO source tree, and changing/ editing the (C)make files to be able to compile and install just the IOVM and libs for IOVM. .After this I may (or not ) work with the existing IO tree/cmake system

The only other choice is to have every IO lib statically linked so at least once Tnl is built it would be somewhat portable


Time will tell

I almost forgot I have not gotten it to run yet (also seemingly IO related)
wirser
 
Posts: 15
Joined: 25 Feb 2016, 18:21

Re: Tnl Compilation problems on ubuntu 14.04 on 86-64 platfo

Postby wirser » 01 Jun 2016, 20:10

UPDATE

Over the weekend I got my daily requirement of digital self-abuse by working on IO

The good new is that I have been able to remove and build the required IO dynamic libs in a separate build tree.
In doing so I will be able to install just what is needed for TnL any where I want without the rest of the add-ons
It took some doing to try to understand how IO built things, but by following the Cmake tutorial as an example I eventually figured it out and even cleaned some of the build tree.

I have more work to do but what I already got is repeatable
wirser
 
Posts: 15
Joined: 25 Feb 2016, 18:21

Who is online

Users browsing this forum: No registered users and 1 guest