UFO:Alien Invasion

Development => Coding => Topic started by: tureba on April 24, 2006, 01:51:46 pm

Title: compile requirements
Post by: tureba on April 24, 2006, 01:51:46 pm
Hi, I have been trying to compile the UFO:AI code at home and at my college but I am having a hard time at it. Mostly because of libraries required for the compilation. (Not even worth describing all of them.)

Since at home I have no connection to the internet and at my college I cannot install libraries,  it would be of great help to know even before starting what libraries are required.
Perhaps you could make a list of libraries needed for the compilation so that I can just go after them all at once instead of having to fetch and/or skip them as the problems arise.

Something on the readme file would be just perfect. And with the minimum versions, if possible, since it seems to be one of the problems I am having at college (amongst others).

No hurry, though - it is just a suggestion to make some people's lives easier. :wink:

By the way, thanks for the cool game. I do not know the original ones, but this one is pretty good.   :D
Title: compile requirements
Post by: Hoehrer on April 24, 2006, 02:43:31 pm
I think it would be a good idea if you tell us what you use to compile the game ... operation system, compiler, what source code (svn/archive) etc...

You might also have a look at the following threads:
* Coding » Dev-cpp (http://ufo.myexp.de/phpBB2/viewtopic.php?t=70)
* FAQ » How can I install UFO? (http://ufo.myexp.de/phpBB2/viewtopic.php?t=17)
* FAQ » Building UFO:AI in Win XP (http://ufo.myexp.de/phpBB2/viewtopic.php?t=96)

Werner
Title: compile requirements
Post by: Mattn on April 24, 2006, 05:33:38 pm
there is also a new readme now - which covers a few of these topics:

http://svn.sourceforge.net/viewcvs.cgi/ufoai/ufoai/trunk/README?view=log

just click view on the newest revision

btw. could someone please spellcheck :-D
Title: compile requirements
Post by: tureba on April 24, 2006, 10:28:37 pm
Thanks for the README!! That was just what I was looking for.

I use Fedora Core 5 at home; and Debian is installed at my college. Every time I typed "make" on either I would find out that there was still another lib to which I didn't have the header files or something like that. Specially on the Debian machines, on which I do not have root access to install the missing stuff: libogg, libvorbis and a few others.  FC5 was giving me a hard time since it has a SDL package and a SDL-devel package, but a SDL_tty package is nowere to be found on Extras or whatever (and it's not included on SDL). Some other stuff was wrong on it too, but I just gave up on it quickly since I think it is a pain to install anything (rpm, src, etc) without an internet connection.
GCC:     FC5 -> 4.1     Debian -> 3.3.5

Oh, and I use the svn version of ufoai. I tried to compile it this morning, before posting the cry for help. It took me a couple of hours of head breaking before I gave up and asked for help.

Thanks for the links, but most of them are for windows and the "how to install" I had already read. My problem was not knowing how to compile, but what libs to have before starting.  :)  Besides, I really think you guys were lacking the tradicional and very useful README file, so I asked for it.

Thanks again. I will give it a try again in a couple of days, when I get another few hours of free time to put into it.
Title: compile requirements
Post by: kilrathi on May 01, 2006, 09:03:04 pm
I'm trying to compile the svn version and get something like this:
Code: [Select]

...
/usr/lib/libc_nonshared.a(atexit.oS)(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx':
: multiple definition of `__i686.get_pc_thunk.bx'
/usr/lib/gcc-lib/i486-linux/3.3.5/crtbeginS.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first defined here
collect2: ld returned 1 exit status
make[1]: *** [debugi386/ref_glx.so] Błąd 1
make[1]: Leaving directory `/home/kilrathi/ufo/src/linux'
make: *** [build_debug] Błąd 2


I am no "code-guru" so i don't have any idea what to do.
I guess i need to install something more?
Could you help me?
Title: compile requirements
Post by: Mattn on May 01, 2006, 09:16:40 pm
which distribution? which system?
Title: compile requirements
Post by: kilrathi on May 01, 2006, 09:32:38 pm
I checked out today - revision 711 i guess.
I try to compile it on Debian Etch (or something like Etch).
I have installed all stuff mentioned here (http://svn.sourceforge.net/viewcvs.cgi/ufoai/ufoai/trunk/README?view=markup&rev=711)


No. It's README rev. 711 - I don't know witch revision of source do i have.
Title: compile requirements
Post by: Mattn on May 02, 2006, 07:39:44 am
can you please give it a try with gcc 4.x?
Title: compile requirements
Post by: kilrathi on May 02, 2006, 08:49:40 am
gcc4 works fine. thanks.

next thing:
map compilation said:
Code: [Select]
make: qbsp3: Polecenie nie znalezione
make: *** [villaged/vil_h02.bsp] Błąd 127

where"polecenie nie znalezione" means "command not found"
i copied qbsp3 and qrad3 from /src/tools to /usr/bin and it worked. (But it's not mentioned in readme)

and then i get another error:
Code: [Select]

************ ERROR ************
Error opening /home/kilrathi/ufo/base/base/pics/colormap.pcx: No such file or directory
make: *** [villaged/vil_h02.bsp] Błąd 1


i guess i need to download some other game files which are not in svn (i'll try to solve problem that way) but there's nothing about it in readme.
Title: compile requirements
Post by: Mattn on May 02, 2006, 10:02:28 am
Quote from: "kilrathi"

Code: [Select]

************ ERROR ************
Error opening /home/kilrathi/ufo/base/base/pics/colormap.pcx: No such file or directory
make: *** [villaged/vil_h02.bsp] Błąd 1


i guess i need to download some other game files which are not in svn (i'll try to solve problem that way) but there's nothing about it in readme.


this is a bug in the compile tools - look at the path and you will notice, that there is base/base... this needs to be fixed.
Title: compile requirements
Post by: XCOMTurcocalypse on May 02, 2006, 12:08:24 pm
Viel Glück zu alle,ich wünsche alle viel Erfolg mit diesem Spiel,das wenigstens an Ufo Aftermath rachen kann.Oder so hoffe ich.
Title: compile requirements
Post by: kilrathi on May 02, 2006, 04:12:01 pm
I'm only one step from happiness:
I compiled everything, and trying to run the game.
Code: [Select]

====== UFO Initialized ======

Changing to Singleplayer
recursive shutdown
Error: ...could not find font: f_small


is there something more missing?
Title: compile requirements
Post by: Mattn on May 02, 2006, 04:38:48 pm
did you compile with -DUSE_SDL_TTF?
if so, check that the truetype fonts (which are defined in base/ufos/fonts.ufo) are in base/media/*.ttf

if not - there have to be pics named f_small.tga and f_big.tga in base/pics

depends on which fontsystem you use...
Title: compile requirements
Post by: kilrathi on May 02, 2006, 08:19:16 pm
There are some ttf fonts in directory You mentioned. I just didn't know that I have to compile the source with this parameter.
I compiled without it and there are the .tga files in /base/pics
I'll try compiling source with -DUSE_SDL_TTF
Title: compile requirements
Post by: Mattn on May 02, 2006, 08:26:57 pm
have a look at the makefile - you see some parameters at the top... there you can activate the SDL_ttf font engine.
Title: compile requirements
Post by: kilrathi on May 03, 2006, 03:18:36 pm
Quote from: "Mattn"
(which are defined in base/ufos/fonts.ufo)


There is no such file in my base/ufos directory.
Title: compile requirements
Post by: Mattn on May 03, 2006, 05:42:13 pm
http://svn.sourceforge.net/viewcvs.cgi/ufoai/ufoai/trunk/base/ufos/fonts.ufo?view=log

^^it's in the repository. maybe you have to do a "svn up" in ufo-svn dir
Title: problems
Post by: Gill_Bates on May 03, 2006, 06:41:59 pm
When I try to compile the latest version of maps under windows I get one of two problems:
Make: this method failed from the start since it tried to use the windows version of find.exe, even after adding a different find.exe (GNU-find utils based), naming it vfind it still fails claiming that:
vfind: paths must precede expression
Usage: vfind [-H] [-L] [-P] [path...] [expression]

So I tried using the perl script, but, the problem is that the qrad3 fails on the first map (Africa04 I think) because it concatenates a unix style folder name to the windows style, it appears like this:
Error opening E:\UFOAI\ufoai\base/pics/colormap.pcx: No such file or directory

Well, how about that?

P.S. I had trouble with earlier versions: the defined value SHADER wasn't defined and compilation failed. If you know what might have caused it and what am I missing, or if it was solved it would help me save time after the map compilation problem is solved.
Title: Re: problems
Post by: Mattn on May 03, 2006, 07:07:07 pm
Quote from: "Gill_Bates"
So I tried using the perl script, but, the problem is that the qrad3 fails on the first map (Africa04 I think) because it concatenates a unix style folder name to the windows style, it appears like this:
Error opening E:\UFOAI\ufoai\base/pics/colormap.pcx: No such file or directory

This should be no problem - but verify the path - there is a bug in qrad3 that searches the colormap.pcx at the wrong place. this is known. currently you need to copy the colomap.pcx to the place qrad3 searches for it.

Quote from: "Gill_Bates"
P.S. I had trouble with earlier versions: the defined value SHADER wasn't defined and compilation failed. If you know what might have caused it and what am I missing, or if it was solved it would help me save time after the map compilation problem is solved.

I think this should be fixed... if not - please give more infos
Title: compile requirements
Post by: Gill_Bates on May 03, 2006, 11:30:30 pm
OK, the perl script started working after I created a folder with the file where it searched.

now qbsp3 fails in ufo_hangar map because:
"No gamedir in E:\UFOAI\ufoai\trunk\base\maps\./b/g/ufo_hangar"

what does that mean?
Title: compile requirements
Post by: Hoehrer on May 04, 2006, 11:14:13 pm
I get the same error...
Code: [Select]
trunk/base/maps$ make
qbsp3 b/g/ufo_hangar.map
---- qbsp3 ----

************ ERROR ************
No gamedir in trunk/base/maps/b/g/ufo_hangar.map
make: *** [b/g/ufo_hangar.bsp] Fehler 1

... but i haven't found a solution yet :-/

Werner
Title: compile requirements
Post by: Malick on June 02, 2006, 01:55:25 pm
Hi,

As I'm quite a noob in compile related problems, I'd like to know if there is a way to download the latest source files at once, not downloading each revised file one by one from svn... Or am I missing something here ?

BTW, I'm under WinXP with C++ Builder 6

Malick
Title: compile requirements
Post by: BTAxis on June 02, 2006, 01:57:13 pm
You can get the whole source in one go if you use a SVN client. Have a look here:
http://ufo.myexp.de/wiki/index.php/Getting_the_source
Title: compile requirements
Post by: Malick on June 02, 2006, 03:34:13 pm
Raaah

I get this message each time I try to import/check out the source files:

Code: [Select]
Error: PROPFIND request failed on '/viewcvs.cgi/ufoai/ufoai/trunk'  
Error: PROPFIND of '/viewcvs.cgi/ufoai/ufoai/trunk': 200 OK (http://svn.sourceforge.net)  


Malick
Title: compile requirements
Post by: BTAxis on June 02, 2006, 03:37:48 pm
Import is for actually putting stuf into the SVN (yes, it makes little sense). Try export. I just tried it, and it works for me.
Title: compile requirements
Post by: Malick on June 02, 2006, 03:41:48 pm
No luck, same error message...
I may have to check the configuration and firewall.

Malick
Title: compile requirements
Post by: Malick on June 05, 2006, 03:38:28 pm
OK, I'm a dumbass :D

Managed to get it to work, I didn't enter the correct URL in TortoiseSVN... Should have read the manual ! Thanks anyway.

Malick
Title: compile requirements
Post by: trapiste on April 20, 2007, 12:08:36 am
Sorry to bore everybody with the same error message : I compiled the game for Linux Ubuntu 6.10 amd64. But I can't make maps. I am a newbee in compilation and I don't see where is the error when I type make maps:
Code: [Select]

************ ERROR ************
Error opening /home/patrice/sources/ufoai-2.1-source/base/pics/colormap.pcx for reading: No such file or directory
make[1]: *** [frozenn/st_drop.bsp] Erreur 1
make[1]: quittant le répertoire « /home/patrice/sources/ufoai-2.1-source/base/maps »
make: *** [maps] Erreur 2

I tried to search this colormap.pcx file in other directory, but didn't found it.
Please, did I forgot something ?
Thanks in advance
Title: compile requirements
Post by: Mattn on April 20, 2007, 07:48:39 am
are you using the pk3 files (linux installer or ufoai-2.1-data.tar)? or are you using the svn? if you are using the pk3 files (normal zip files with pk3 prefix) then you have to extract the colormap.pcx from base/0pics.pk3 to the path where ufo2map is searching for it
Title: compile requirements
Post by: trapiste on April 22, 2007, 11:03:19 pm
thanks a lot,
in fact I didn't understood that I needed the data.tar. I downloaded
- ufoai-2.1-source.tar.bz2
- ufoai-2.1-mapsource.tar.bz2
- music.tar.bz2

After your message, I aded the data.tar, extracted the colormap.pcx and the maps compilation went fine.
It seems to works ok. I made the first mission, without any trouble (computer trouble, I mean :wink: )

By the way, is There other files to extract from the data.tar ?  :?:
Title: compile requirements
Post by: Mattn on April 23, 2007, 06:50:12 am
no, only the colormap.pcx, but you need those pk3's in your base/ dir, too