Trying to Set Up FoF Sources on GNU/Linux

Discuss mods and get help with mods ONLY
This topic is 16 years and 8 months old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
evilynux
Member
Posts: 382
Joined: July 2nd, 2008
Location: Montréal, Canada
Reputation: 0
Contact:

Postby evilynux » Wed Aug 13, 2008 1:22 am

I'm trying to build MFH-Alarian Mod v2.9x binaries (64bit and/or 32bit) on Debian GNU/Linux unstable.

I've tried the following both natively (amd64) and in a 32bit (i386) chroot.
Moreover, i've tried both python2.4 and python2.5.

I've installed python-opengl 3.0.0~b3, python-pyglew 0.1.2, python-pygame 1.7.1release-4.2 and python-xml 0.8.4.
I managed to find amanith 0.3 sources, patched them¹ and built the code.
I got PyAmanith 0.3.35, patched the code¹ and built it.
I got cx_Freeze 3.0.3 and built it.

I grabbed RF-mod 4.15 code and copied over the source files from Alarian 2.950. I then took the Makefile.unix from latest fretsonfire subversion code, modified it and always came with the same problem.

cx_Freeze outputs:

Code: Select all

Missing modules:
[...]
? OpenGL.platform.GL imported from OpenGL.GL.exceptional, OpenGL.GLU.projection
? OpenGL.platform.GLU imported from OpenGL.GL.exceptional, OpenGL.GLU.quadrics, OpenGL.GLU.tess
? OpenGL.platform.PLATFORM imported from OpenGL.GLU.glunurbs, OpenGL.GLU.quadrics, OpenGL.GLU.tess
? OpenGL.platform.createBaseFunction imported from OpenGL.GL.exceptional, OpenGL.GLU.quadrics, OpenGL.GLU.tess
[...]

Running the binary results in the following error:

Code: Select all

Traceback (most recent call last):
 Ã‚ File "/tmp/cx_Freeze-3.0.3/initscripts/Console.py", line 27, in ?
 Ã‚   exec code in m.
 Ã‚ File "src/FretsOnFire.py", line 36, in ?
 Ã‚ File "src/GameEngine.py", line 23, in ?
 Ã‚ File "/usr/share/pyshared/OpenGL/GL/.py", line 2, in ?
 Ã‚   from OpenGL.raw.GL import *
 Ã‚ File "/usr/share/pyshared/OpenGL/raw/GL/.py", line 6, in ?
 Ã‚   from OpenGL.raw.GL.constants import *
 Ã‚ File "/usr/share/pyshared/OpenGL/raw/GL/constants.py", line 7, in ?
 Ã‚   from OpenGL import platform, arrays
 Ã‚ File "/usr/share/pyshared/OpenGL/platform/.py", line 57, in ?
 Ã‚   _load()
 Ã‚ File "/usr/share/pyshared/OpenGL/platform/.py", line 40, in _load
 Ã‚   plugin_class = _findPlatform( platform )
 Ã‚ File "/usr/share/pyshared/OpenGL/platform/.py", line 28, in _findPlatform
 Ã‚   return entrypoint.load()
 Ã‚ File "/usr/share/pyshared/pkg_resources.py", line 1912, in load
 Ã‚   entry = (self.module_name, globals(),globals(), [''])
ImportError: No module named glx

Looking at MFH-Alarian 2.900 32bit GNU/Linux binary package, i noticed i was missing at least three files from my dist/ directory, namely:
OpenGL.GL.ARB.multisample.so, OpenGL.GL.GL_.so and OpenGL.GLU.GLU_.so .

Another side effect of cx_Freeze not finding what it needs?
Is this caused by a too recent version of python-opengl (using 3.0.0~b3)?
Am I missing another library/package?
Is there an amd64-specific issue [that would also affect the 32bit chroot]?

Someone else seem to have hit the wall.
From the Arch distro forum:
http://bbs.archlinux.org/viewtopic.php?pid=356778

Any help or suggestion is welcome.

¹ I can provide the patches I used, they were mainly to make it build on Debian unstable e.g. with Qt4.
evilynux
Member
Posts: 382
Joined: July 2nd, 2008
Location: Montréal, Canada
Reputation: 0
Contact:

Postby evilynux » Thu Aug 14, 2008 12:18 am

I managed to get something to work by excluding OpenGL when calling cx_Freeze 3.0.3.

The resulting binary is slow and mostly unplayable but allowed me to confirm that analog killswitch xbox inverse works with my gibson xplorer (360).

I've also tried cx_Freeze 4.x (available from sourceforge) but couldn't get better results.
trinidude4
Member
Posts: 395
Joined: March 22nd, 2008
Reputation: 0

Postby trinidude4 » Thu Aug 14, 2008 12:40 am

You could try pyopoengl 2.0.2.01. That was the only version that worked for the Mac versions. Anything higher had opengl errors.
evilynux
Member
Posts: 382
Joined: July 2nd, 2008
Location: Montréal, Canada
Reputation: 0
Contact:

Postby evilynux » Thu Aug 14, 2008 10:21 am

Indeed, works great with PyOpenGL 2.0.1.09!
I'll do some stability test and if it's good i'll make it available for others.

Thanks for the tip trinidude4!

Both 32bit and 64bit binaries are available in MFH-Alarian 2.900 thread there.
Last edited by evilynux on Tue Aug 19, 2008 11:19 pm, edited 1 time in total.
evilynux
Member
Posts: 382
Joined: July 2nd, 2008
Location: Montréal, Canada
Reputation: 0
Contact:

Postby evilynux » Fri Sep 26, 2008 11:58 pm

Mostly at .liquid. and Lysdestic...
(Answering here for the greater good. It's a sort of follow up).

Please allow me to answer you both at the same time since your questions converge. You guys are asking how the hell am i building the GNU/Linux binaries.

I must say it was a pain to set this up. Even now, the situation is not up to my taste, but _it works_.

First thing first, you'll have to get a couple of things installed. Some trivial (especially under any distro with a good packaging system e.g. Debian/Ubuntu, Fedora, OpenSUSE, ...), others a real pain in the ass.

Among the trivial ones: libsdl1.2, libsdl-image1.2, libsdl-mixer1.2, python2.4, python-imaging, python-numpy, python-numeric, etc.

cxFreeze might not be trivial, but it's easy to get to work. You just need to make sure you use the 3.x branch, not 4.x . At least, i failed at getting python-opengl (PyOpenGL) to work with the latter.

Pain in the ass: Amanith (just finding the source is a pain as the upstream authors pulled the plug, plus it required heavy patching to get to build), PyAmanith (required some patching to get to build) and...

There's also a special twist: you'll need PyOpenGL 2.x instead of 3.x. That may require a separate download (in my case i had to get the latest 2.x package from Debian archives). Greetings go to trinidude for hinting that GNU/Linux might be in the same boat as MacOSX.
I also had to make a minor patch to PyOpenGL (hint: version variable in .py).
Last edited by evilynux on Sat Sep 27, 2008 12:06 am, edited 1 time in total.
Dr. Professor Logic
User avatar
Lysdestic
Member
Posts: 2939
Joined: December 14th, 2007
Reputation: 7
Contact:

Postby Lysdestic » Sat Sep 27, 2008 12:18 am

I'll give that a shot when 3.0 comes out, but I doubt I'll make it.

I'll probably still have to await your release... :laugh:
Last edited by Lysdestic on Sat Sep 27, 2008 12:23 am, edited 1 time in total.
User avatar
Azzco
Member
Posts: 1308
Joined: August 15th, 2007
Location: Trelleborg, Scania, Sweden
Reputation: 0
Contact:

Postby Azzco » Sat Sep 27, 2008 11:04 pm

I've tried a bit, but I ran into errors..

Code: Select all

Traceback (most recent call last):
  File "/usr/src/packages/BUILD/cx_Freeze-3.0.3/initscripts/ConsoleKeepPath.py", line 15, in <module>
  File "FreezePython.py", line 194, in <module>
  File "/usr/lib/python2.5/modulefinder.py", line 125, in import_hook
    m = self.load_tail(q, tail)
  File "/usr/lib/python2.5/modulefinder.py", line 191, in load_tail
    raise ImportError, "No module named " + mname
ImportError: No module named OpenGL.arrays
make: *** [dist] Error 1

I have no real idea of what could be wrong.. I'm using the 3.03 freeze package, Python-OpenGL 2.01. Okay I read through the thread once again and saw hat I'm using the correct python opengl...

I'm clueless right now =/


Okay it turned out I had the wrong makefile. I managed to compile it but I guess I missed something on the road because I keep getting the old GMatrix error

Code: Select all

Azzco@Skyscraper:~/working dir/compile/FoF-MFH3_00> ./dist/FretsOnFire
Traceback (most recent call last):
 Ã‚ File "/usr/lib/python-cx-freeze/initscripts/Console.py", line 27, in <module>
 Ã‚   exec code in m.
 Ã‚ File "src/FretsOnFire.py", line 104, in <module>
 Ã‚ File "src/GameEngine.py", line 363, in
 Ã‚ File "src/Svg.py", line 77, in
 Ã‚ File "src/Svg.py", line 240, in
AttributeError: 'module' object has no attribute 'GMatrix33'


I have no idea how to fix this and I can't find any useful info except for downgrading to 1.2.451. :p
Last edited by BlackFate on Sun Sep 28, 2008 6:26 am, edited 1 time in total.
Image
(k)Ubuntu 8.10 skyscraper 2.6.27-11-generic i686 GNU/Linux KDE 4.2.0
It's not like I dislike sleeping, I really do like it to be honest. It's the whole wake up/go to sleep business I don't like.
evilynux
Member
Posts: 382
Joined: July 2nd, 2008
Location: Montréal, Canada
Reputation: 0
Contact:

Postby evilynux » Sun Sep 28, 2008 11:23 pm

Did you build cxFreeze and PyAmanith with python2.4?
Did you install amanith and PyAmanith?
Do you have libamanith.so.1 and _amanith.so in dist/ ?
Is ./dist/FretsOnFire a script overriding LD_LIBRARY_PATH or the binary?

You can test that your libamanith.so.1 and _amanith.so are good by running from the src/ folder. e.g. "cd src/ && LD_LIBRARY_PATH=../dist python2.4 FretsOnFire.py". (You may want to try with my versions of those .so files...)¹

¹ While being at it, it's one option to test new versions w/o having to build the binaries. Make sure you've got the .so files and use LD_LIBRARY_PATH to help python find them.
Last edited by evilynux on Sun Sep 28, 2008 11:28 pm, edited 1 time in total.
User avatar
Azzco
Member
Posts: 1308
Joined: August 15th, 2007
Location: Trelleborg, Scania, Sweden
Reputation: 0
Contact:

Postby Azzco » Sun Sep 28, 2008 11:55 pm

I copied the startup script from your 2.995 release. cxFreeze is most likely built with python 2.5 but as I can't fof running from the sources this is not relavant. I've copied amanith files from a release as well. That shouldn't be any major issue should it?

Right now I just went into your 3.05 release src directory. and since python2.4 is not a command, I tried.

LD_LIBRARY_PATH=../ python FretsOnFire.py

The amanith.so files are in the game root dir so I thought that should do it but I still get the GMatrix error. Is it caused because the amanith packages are not found?
Image
(k)Ubuntu 8.10 skyscraper 2.6.27-11-generic i686 GNU/Linux KDE 4.2.0
It's not like I dislike sleeping, I really do like it to be honest. It's the whole wake up/go to sleep business I don't like.
evilynux
Member
Posts: 382
Joined: July 2nd, 2008
Location: Montréal, Canada
Reputation: 0
Contact:

Postby evilynux » Mon Sep 29, 2008 1:26 pm

@Azzco:
1) If cx_Freeze is built with python2.5 this just can't work.
2) You need to have a proper PyAmanith build and installed for python2.4, else cx_Freeze won't find it and won't be able to build against it
3) Executing FretsOnFire.py with python2.5 is bound to fail unless everything is python2.5-capable
4) You still get the GMatrix error as cxFreeze wasn't able to resolve that symbol, cxFreeze wasn't able to find your PyAmanith files.
5) You won't be able to execute FoF from sources unless you get either get python2.4 or ( build PyAmanith against python2.5 AND make sure FoF works with python2.5 )

Again, unless you port FoF and PyAmanith to python2.5 you won't be able to make it without python2.4.
I'm really surprised that your distro doesn't include both 2.4 and 2.5...

Did i mention how much of a pain it was to get a properly working setup up and running? :-/
Last edited by evilynux on Mon Sep 29, 2008 1:27 pm, edited 1 time in total.

Return to “FOF Mod Discussion and Support”

Who is online

Users browsing this forum: No registered users and 7 guests