Compiling a mod under GNU/Linux


(Alan) #41

In my opinion you should’nt use QT3 Designer. He isn’t made for that.

That is a hard work. I can say that because i have made a makefile for MinGW.
Cons (WET_Source ET) builds a complete source tree for each library.
And i don’t know how to force KDevelop using cons or some custom makefiles.

I use “perl cons – release gcc3”, but a GUI could be useful :wink:

Alan


(fretn) #42

like I said, use anjuta (edit the project files to make it execute ‘scons’)
example:


preferences.make=scons
project.source.target=./run


(imnes) #43

Well the files compile without any changes under Solaris 11 (using gcc 3.x compilers). Is there complete source out there to build the entire game? Would really like to play this under solaris :slight_smile:

NIck


(jaybird) #44

!revive

Let me just say thank god for the new scons stuff.


(Mr.Mxyzptlk) #45

No. Carmack has not yet released Quake3 engine source to the public. He has stated
sometime in the future he will. Even when he does, it would still take efforts to build
the client on Solaris 10+, which now has Nvidia OpenGL drivers. Sound on Solaris
also might be a an issue to build the engine on. Then, SplashDamage would either
have to release their engine tweaks, and/or release Solaris x86 binaries of et.x86 and
etded.x86. This probably won’t happen anytime soon, though I would indeed volunteer
to do an engine port to Solaris x86.


(jaybird) #46

According to his blog it was going to be pretty soon, but they just signed another major license with it, so he wants to hold on just a little longer so that the company doesn’t feel cheated, which is entirely justified. Just patience :slight_smile:


(SCDS_reyalP) #47

Just recently at qcon it was announced that the Q3 engine source would be released very soon. Of course, as Mr.Mxyzptlk said, making that ET compatible wouldn’t be entirely trivial.


(nUllSkillZ) #48

I’ve been looking for this “cons” file (also searched for that file).
But I can’t find it.
I’m using Ubuntu 6.06 LTS and have installed “et-linux-2_60-sdk_x86.run”.
Unfortunately I don’t know anymore from where I’ve downloaded that file.
Any help is much appreciated.
Thnx.


(kamikazee) #49

“cons” used to be the script used for compiling the older versions of the SDK. Since 2.60, SCons is used which is a tool similar to “make”. (It uses Python, so you’ll need that too.)
Once installed, just go to the src directory and invoke it like this:

scons build=release

(The build=release parameter is only needed the first time, it will get saved to site.conf so you can invoke “scons” as it is after that.)


(nUllSkillZ) #50

Thnx for the answer.
I’ve now read the readme :smiley:
After “scons” I’ve got an error message.
So I have to look for the other conditions (python, gcc).

Edit:

  • python installed
  • gcc installed

Error message:
“scons: *** No SConstruct file found.
File “/usr/lib/python2.4/site-packages/SCons/Script/init.py”, line 870, in _main”

[edit1]
“cd /usr/local/games/enemy-territory-sdk” must be “cd /usr/local/games/enemy-territory-sdk/src” I guess.

After “scons -c” I receive the following error message:
“scons: Reading SConscript files …
cpu: x86
sh: gcc: command not found
dumpversion:
gcc major:
sh: gcc: command not found
os: Linux
IOError: [Errno 13] Permission denied: ‘site.conf’:
File “SConstruct”, line 185:
site_file = open(conf_filename, ‘w’)”
[/edit1]


(kamikazee) #51

I told you to go to the src directory… :wink:

Now, can you invoke gcc just by typing “gcc” in a console? (Never encountered that SCons couldn’t execute it)
If it doesn’t, check if gcc is installed properly and if your path variables are set correctly. If you don’t have a simple gcc command but a longer one like gcc-linux-x86, try to make an alias so gcc runs the longer named executable.

As for the IOError: check site.conf’s permissions. It seems you cannot write to it, which is necessary if you start SCons with a parameter.


(jaybird) #52

If ‘which gcc’ gives you an error, you need to get gcc in your path, or install it if it’s not already installed. To execute scons, there must be the configuration files in the current working directory. For the ET SDK, they exist in SDK/src/, so that’s where you need to be to invoke it.

The build directives you pass should be upper case. I’ve had issues when using lower case before.
i.e. scons BUILD=release BUILDBUNDLE=1


(nUllSkillZ) #53

It’s gcc.
i thought it’s installed because gcc-3.3-base and gcc-4.0-base are installed.
Not sure which one I should use.
I guess I have to install the plain gcc package?

Edit:

yep, gcc installed (in addition some packeages that depend on gcc).
But I get still an error message.


oliver@oliver-desktop:/usr/local/games/enemy-territory-sdk/src$ scons -c
scons: Reading SConscript files ...
cpu: x86
dumpversion: 4.0.3
gcc major: 4
os: Linux
IOError: [Errno 13] Permission denied: 'site.conf':
  File "SConstruct", line 185:
    site_file = open(conf_filename, 'w')

So I guess I have to change permissions in the “/usr/local/games/enemy-territory-sdk/src” directory and it’s subdirectories.

Linux is so complex.
Oh wait, I’m such a noob
:slight_smile:


(kamikazee) #54

Check site.conf’s permissions. It probably hasn’t got the write permission set, or you set it for the wrong entity (It has permissions for the file owner, file’s group and “the others”)


(nUllSkillZ) #55

I’ve copied the whole “/usr/local/games/enemy-territory-sdk” directory into my home directory (exactly to “/home/oliver/et/modding”).
“scons -c” is running without an error (although not sure what this is doing).
But running “scons” or “scons BUILD=release” returns several errors.
Mainly that some files aren’t found that are included (think so) in “q_shared.h”.


...
cgame/../game/q_shared.h:85:20: Fehler: assert.h: No such file or directory
cgame/../game/q_shared.h:86:18: Fehler: math.h: No such file or directory
cgame/../game/q_shared.h:87:19: Fehler: stdio.h: No such file or directory
cgame/../game/q_shared.h:89:20: Fehler: string.h: No such file or directory
cgame/../game/q_shared.h:90:20: Fehler: stdlib.h: No such file or directory
cgame/../game/q_shared.h:91:18: Fehler: time.h: No such file or directory
cgame/../game/q_shared.h:92:19: Fehler: ctype.h: No such file or directory
...

Edit:

Seems that I’ve de-installed needed packages.

Edit:

No.
I’ve installed an additional package “libc6-dev”.
Now it seems to run.
But creates several warnings.
Mainly with arrays.
“xxx[y] could be used uninitialized in this function”


...
game/g_trigger.c: In Funktion »Think_SetupObjectiveInfo«:
game/g_trigger.c:1300: Warnung: »team[1]« könnte in dieser Funktion uninitialisiert verwendet werden
...

But at the end is:


...
Install file: "build/release/cgame/libcgame.so" as "cgame.mp.i386.so"
Install file: "build/release/game/libqagame.so" as "qagame.mp.i386.so"
Install file: "build/release/ui/libui.so" as "ui.mp.i386.so"
scons: done building targets.


(jaybird) #56

Those are just warnings, though you should take care of them. Looks like you got it all worked out!


(nUllSkillZ) #57

Problem with these warnings is:
I haven’t changed the source.

Thanks for all your help.

Next:
Cross compiling.
:smiley:


(jaybird) #58

Different gcc versions report different warnings. That you are getting warnings should not be cause for alarm. The version of gcc they were using probably didn’t complain at all. Still, it would be wise to at least look at the code and clean it up.


(nUllSkillZ) #59

Cross compiling under Ubuntu is declared in the following thread (near the end):
Compiling for Windows under Linux - cross-scons.sh

Edit:

Tutorial in german language @ ubuntuuser.de forum:
ET Modding: Kompilierung des Source Codes


(nUllSkillZ) #60

I don’t get it.
The day before it worked (I thought).
Now I get the following:


copy /usr/local/games/enemy-territory/etmain/ui.mp.i386.so to /home/oliver/.etwolf/gibbable/ui.mp.i386.so
...
copy /usr/local/games/enemy-territory/etmain/cgame.mp.i386.so to /home/oliver/.etwolf/gibbable/cgame.mp.i386.so

The mod-".so"-files are overwritten by the original files.
:frowning: