Compiling for linux version


(JBudOne) #1

So I’ve got Windows and I’d like to compile the source code for Wolfenstein as .so files, for my linux server. So I use Cygwin and get this:


$ perl cons -- release gcc3

Set up gcc environment - 4.1.2
The system cannot find the path specified.
Enemy Territory version 2.56
cpu : x86
OS  : CYGWIN_NT-5.1
libc:
configured for release build, in directory release-x86-CYGWIN_NT-5.1-
CFLAGS: -pipe -fsigned-char -DMISSIONPACK -DNDEBUG -O6 -mcpu=pentiumpro -march=p
entium -fomit-frame-pointer -ffast-math -fno-strict-aliasing -fstrength-reduce -
falign-loops=2 -falign-jumps=2 -falign-functions=2
which: no ccache in (/usr/local/bin:/usr/bin:/usr/bin:/usr/X11R6/bin:/cygdrive/c/Program Files/Autodesk/Maya2008/bin:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/c/Program Files/Samsung/Samsung PC Studio 3/)
Ignoring missing script "C:\WET_Source\src\extractfuncs\Conscript" (script::Buil
d in Construct, line 334) at cons line 749.
cons: don't know how to construct "release-x86-CYGWIN_NT-5.1--gcc3\cgame\src\uni
x\cgame.mp.i386.so"

I’ve already looked all around google and this website and I couldn’t find anything on this. Can anyone tell me what I’m doing wrong or what I can do to fix this? It’s be greatly appreciated =] Thank you.


(nUllSkillZ) #2

Not sure but I think you can’t compile for linux under windows (other way around is fine though).
You could try to install a linux distribution as virtual machine in a virtualisation environment.
virtualbox is a virtualisation environment.
Don’t worry your actual operating system isn’t affected at.
Except the installation of virtualbox.

Another possibility:
Dual boot windows + linux or a second PC.

The option of virtualisation is in my opinion the best possibility (no costs and no risk (to loose data from your now used operating system)).

Additional note:
You must have a Mac to compile for Mac.


(JBudOne) #3

Thanks so much, but I’ve already tried using a VM. I’ve tried Ubuntu, but the problem was


perl cons -- release gcc3
Enemy Territory version 2.56
cpu : x86
OS: Linux
libc: 2.8
configured for release build, in directory release-x86-Linux-2.8
CFLAGS: -pipe -fsigned-char -DMISSIONPACK -DNDEBUG -06 -mcpu=pentiumpro -march=pentium
  -fomit-frame-pointer -ffast-math -fno-strict-aliasing -fstrength-reduce -falign-loops=2 -falign-jumps=2
  -falign-functions=2
Ignoring missing script "/home/jbudone/Desktop/src/extractfuncs/Concscript" (script::Build in Construct, line 334) at cons line 749.
gcc -pipe -fsigned-char -DMISSIONPACK -DNDEBUG -06 -mcpu=pentiumpro -march=pentium
  -fomit-frame-pointer -ffast-math -fno-strict-aliasing -fstrength-reduce -falign-loops=2 -falign-jumps=2
  -falign-functions=2 -fPIC -DCGAMEDLL -I/home/jbudone/Desktop/src/game -I/home/jbudone/Desktop/src/ui -c release-x86-Linux-2.8-gcc3/cgame/src/cgame/cg_atmosphere.c -o release-x86-Linux-2.8-gcc3/cgame/src/cgame/cg_atmoshperic.o
`-mcpu=' is deprecated. Use `'-mtune=' or '-march=' instead.
gcc -pipe -fsigned-char -DMISSIONPACK -DNDEBUG -06 -mcpu=pentiumpro -march=pentium
  -fomit-frame-pointer -ffast-math -fno-strict-aliasing -fstrength-reduce -falign-loops=2 -falign-jumps=2
  -falign-functions=2 -fPIC -DCGAMEDLL -I/home/jbudone/Desktop/src/game -I/home/jbudone/Desktop/src/ui -c release-x86-Linux-2.8-gcc3/cgame/src/cgame/cg_atmosphere.c -o release-x86-Linux-2.8-gcc3/cgame/src/cgame/cg_commandmap.o
[B]`-mcpu=' is deprecated. Use `'-mtune=' or '-march=' instead.[/B]

.... (repeated complaint with the deprecation for, I'm pretty sure, every .o file it goes through)

So how would I fix that up? Do I really have to go through every .o file and manually replace -mcpu=' with-mtune=’ ? I heard that you can only compile Wolfenstein ET under gcc 4.1.x, if that’s true then maybe that’s what’s causing the problems cause I’m using gcc 4.3.2 for this. Anyways, I’ll try looking around for gcc 4.1 and I’ll post back here with the results when I get it =] Thanks


(kamikazee) #4

What’s with the “perl cons” line? Why aren’t you using scons?


(JBudOne) #5

Hey guys =] Sorry for the long wait on the reply. I did finally compile it, you were right kamikazee, I have no idea how I got that cons stuff with the linux released source code =S But when I got the source code again I found that all you have to do is type this:

scons build=release

Which I actually found on google from one of your posts Kamikazee =P

So now that I got it compiled, I tried testing it out on the server, and it didn’t work at all, it didn’t even turn on. I’m not sure if I’m supposed to do anything extra, but I just copied over the qagame.mp.i386.so file and replaced it with the server’s current one. Am I missing something? Should I maybe drag the other .so files over too? I didn’t make any changes in the source, I just tried compiling it as it was when I dl’d it. Thanks =]


(nUllSkillZ) #6

Did you start a dedicated server?

You should always create a new subdirectory for the mod and not replace existing files.


(JBudOne) #7

I’m not sure if I understand… I’m supposed to make a subdirectory for my compiled version of the game? How do I point the game to use my mod then? And what should I include in there, just that one .so file?


(nUllSkillZ) #8

If you start a dedicated server at command line you have to add “+set fs_game MYMOD”.
MYMOD is the name of the subdirectory that contains your mod.
But you have to also add some other commands.
It isn’t that trivial.

A much easier way is to start W:ET.
In “main” menu choose “mods” and load your mod.

The mod directory must contain all the changed files.
So you should put all your created files in that directory.
And there’s a mp_bin.pk3 file.
You should have a look in the “etmain” which files it contain.