Compiling issues

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
h4zard
On Lightcycle Grid
Posts: 22
Joined: Thu Mar 22, 2012 7:01 am

Compiling issues

Post by h4zard »

Out of the box everything works fine when I run make uptil the part where it starts running python scripts namely sortresources.py, some errors where easily fixed with ( and ) but i'm not a python programmer, if I fix those issues then it complains that the StringIO module doesn't exist, I have both python 2.7 and python 3 and to my knowledge StringIO comes with 2.7, I guess what I'm asking is if this is a distribution issue/package issue or a programming issue ?, main reason I'm doing this is i want a vanilla compilable release, so I could see if I might be able to fix that really pesky respawn system, so that I could run a server like .D.o.g.f.i.g.h.t. which I assume uses some non distributed patch as the respawn there isn't borked.

EDIT 06/13: Suppose I should have mentioned I have this issue with both sty+ct and with regular releases of 2.8. I'd assume this is a distribution issue but I'm kinda hoping its an easy fix as I'd rather not switch distro's just to compile.
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Re: Compiling issues

Post by dlh »

In Python 3 the StringIO class is now in the io module, and the StringIO module was removed. It's an easy fix, but I'm not sure if anything else in the script needs to be changed to support Python 3.

The sortresources script directly calls “python”, so right now there is no user-configurable way to use a different python executable (like, python2.7). Two solutions for you right now: Your distribution might have a way for you to select a default version of Python (/usr/bin/python). Otherwise, as a quick fix you can modify batch/make/sortresources to use your Python 2.7 executable.

We'll need to either update the script to support Python 3, or restrict it to version 2.x during the configure step (with an option to use a different python executable).
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Compiling issues

Post by Z-Man »

We have it fixed to work with either version on 0.4, haven't we? It wasn't really trivial. I'd say just make the bash script call python2 (with fallback to plain python if that doesn't exist) on 0.2.8. It's a non-issue for source tarball releases anyway, the script shouldn't be called there.
h4zard
On Lightcycle Grid
Posts: 22
Joined: Thu Mar 22, 2012 7:01 am

Re: Compiling issues

Post by h4zard »

thanks guys I'll try that, hmm haven't tried the tarball releases I pulled straight from the bzr suppose i should have used the tarballs first.

EDIT 06/15:

I Found away around that sortresources.py script, works for sty+ct and regular bzr pulls.
(assuming your using linux) Just follow these steps:

1. ./bootstrap.sh
2. ./configure #plus whatever options you want like --enable-respawn etc.
3. cd src/
4. make
5. make install

without using the configure prefix option everything winds up in /usr/local/
which is fine as most distro's include /usr/local/bin in the $PATH env.

if you are compiling a dedicated server then you will need to start it like this:

armagetronad_main -d --datadir /usr/share/games/armagetronad/ #assuming you haven't renamed the binary and you have the client installed from your distros repo.

I guess that about does it hopefully this will help anyone trying to compile their own server or sty+ct clients and servers or dev-snapshots from bzr.
h4zard
On Lightcycle Grid
Posts: 22
Joined: Thu Mar 22, 2012 7:01 am

Re: Compiling issues

Post by h4zard »

I've got everything working but just now noticed that I need zthreads to login same round with out a pause. however I can't compile zthreads because my autotools are too new. and I'm not aware of how I would compile it manually. if someone would be kind enough to explain how to get around this or whip up a makefile I'd be most appreciative.
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Compiling issues

Post by Z-Man »

Don't run autotools on zthread, just use a tarball and use their generated files.
h4zard
On Lightcycle Grid
Posts: 22
Joined: Thu Mar 22, 2012 7:01 am

Re: Compiling issues

Post by h4zard »

yeah the tarballs the issue, I even wrote my own makefile but I get alot of undefined references when I compile. guess I'll just deal with the pauses unless someone has and i686 lib built already.
Post Reply