Compiling a mod under GNU/Linux


(Wang) #21

I am running Mandrake Linux 9.1 I have the right directory set for perl in the /src/unix/cons file.

My problem is that I don’t know very much about linux and have zero knowledge of how to compile under linux.

What I need help with, is how do I make the cons file executable :???: :???:

TIA!!!


(SCDS_reyalP) #22

chmod u+x cons

You also want to be sure it (and the other cons files and sources) are in unix text format, or you will get various errors. See dos2unix.


(Wang) #23

Below is the error message that I receive when trying to compile it:

Enemy Territory version 2.56
cpu : x86
OS  : Linux
libc: 2.3
configured for debug build, in directory debug-x86-Linux-2.3
CFLAGS: -pipe -fsigned-char -DMISSIONPACK -D_DEBUG -g -Wall -O
sh: line 1: gcc-2.95: command not found
which: no ccache in (/usr/X11R6/bin:/usr/local/bin:/bin:/usr/bin:/usr/games:/home/jim/bin)
Ignoring missing script "/home/jim/WET_Source/src/extractfuncs/Conscript" (script::Build in Construct, line 334) at cons line 749.
cons: error in file "Conscript-game" (cons: variable "CC" exported but not defined by file "Construct")
cons: error in file "Conscript-cgame" (cons: variable "CC" exported but not defined by file "Construct")
cons: error in file "Conscript-ui" (cons: variable "CC" exported but not defined by file "Construct")
cons: script errors encountered: construction aborted

any ideas on what I should do different?

this is my first time using linux to compile anything.

Thanks


(SCDS_reyalP) #24

sh: line 1: gcc-2.95: command not found

Perhaps your system has only gcc3 ?


(S. Monkey) #25

I’ve been getting the same error as most people (bad intepretter) despite having copied the path from ‘which perl’ into cons. I’ve also tried extracting the entire ‘unix’ directory under linux, but this hasn’t changed anything. Re-extracting the entire source code is not an option, as the source has already been modified in windows.

Anybody have any suggestions? I’m running RedHat 9 btw.


(S. Monkey) #26

Resolved this problem by adding ‘-l’ to the end of the first line of cons. Now I’ve got a new problem

After compiling the mod, a directory is created with a really wierd directory structure in it, apparantly derived from the directory structure of the source code folder. I found the .so files though, and put them into a folder in /usr/local/games/enemy-territory for a test

However, when I try to start ET with the mod the spam says:

Sys_LoadDll(/home/pete/.etwolf/etmain/ui.mp.i386.so)…
Sys_LoadDll(/home/pete/.etwolf/etmain/ui.mp.i386.so) failed:

And ET then goes on to start without the mod.

I’m puzzled.

EDIT: I’m also to stupid to use the command line parameters properly. Problem solved.


(Wang) #27

Resolved this problem by adding ‘-l’ to the end of the first line of cons. Now I’ve got a new problem

After compiling the mod, a directory is created with a really wierd directory structure in it, apparantly derived from the directory structure of the source code folder. I found the .so files though, and put them into a folder in /usr/local/games/enemy-territory for a test

However, when I try to start ET with the mod the spam says:

Sys_LoadDll(/home/pete/.etwolf/etmain/ui.mp.i386.so)…
Sys_LoadDll(/home/pete/.etwolf/etmain/ui.mp.i386.so) failed:

And ET then goes on to start without the mod.

I’m puzzled.

EDIT: I’m also to stupid to use the command line parameters properly. Problem solved.[/quote]http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=7051

Try the above link for some light on your problem


(Alan) #28

Hi,
I had a problem to compile the source code under GNU/Linux.
which perl -> /usr/bin/perl , so the beginning of cons was #!/usr/bin/perl
But i had this message “:No such file or directory

The solution is that i call perl : “perl cons – release gcc3
instead of “./cons – release gcc3

Alan


([MOS]StiloMAN.pl) #29

Hi!

(Sorry 4 my English :stuck_out_tongue: )

I’m using Aurox 9 Linux (PL version of RH9)…

I extract ZIP file using ark, simple program distributed with RH… type ark and press enter to see it. so I extracted files, started console, changed attributes for cons file and try:

./CONS -- relase gcc3

but I get following error:

: bad interpreter: Nie ma takiego pliku ani katalogu
(in english: 
: bad interpreter: No such file or directiory

What I can do? Did I extracted files well ??
Plz help me…

:blah:


(SCDS_reyalP) #30

you need to convert at least the cons files to unix format.


([MOS]StiloMAN.pl) #31

ok, I found dos2unix for linux… then I converted all files in unix directory and started console.

Next problem:
when I try:


./cons -- relase gcc3

I get this error:


[stilo@localhost unix]$ ./cons -- relase gcc3
Error
  cons: Unknown command line option: [ relase ]
[stilo@localhost unix]$

But when I try:


./cons

It works… hmm… compilation is finished and I didn’t get any errors…
Can I use only ./cons command without – relase ??

(Really, sorry 4 my English :slight_smile: )


(Rain) #32
(rain@portal:~) dict relase                                  (09:01pm/2/pts/20)
No definitions found for "relase", perhaps you mean:
gcide:  Release  Relapse  Relade  Relate
wn:  release  relapse  relace  relate
foldoc:  release

([RW]FRED) #33

the argument is release not relase.
explore unix/Construct to understand alll. this is the file used to configure all things specific to ET.


([MOS]StiloMAN.pl) #34

omg! :banghead:

release works… thX


(uber_noob) #35

I build the unmodified 2.56 sources as release on a linux kernel 2.3 and gcc 3.3 based system. It did build with quite some warnings, but it seems like the .so files do work. But they are between 100 kb and 200 kb bigger than the original ones, how comes this? Did I do something wrong or is there a magic switch I forgot?

When I build the .dlls on windows, they have the right size.

I never had this happen with other apps I build from source.


(Rain) #36

It likely has to do with different gcc/libc versions being used than the original builds. The actual, generated machine code is probably quite a lot different, due to improved optimizations and compiler bug fixes. gcc will generally prefer speed over binary size, although -Os in recent versions will optimize for size instead (caveat: you’re more likely to run into a compiler bug than with the standard optimization modes.)


(FREAK!!!) #37

to compile my mod under linux, i’ve now installed the first time linux on some of my pcs.

i installed Mandrake 9.2, because this is the only Linux i have, thats not years old.
Mandrake comes along with a C++ tool Qt3 Designer
can i compile the source code with this tool to get the linux files?
btw. what have i to do, to compile with it? has anyone experience with it?

edit
Qt3 Designer shows the SConscript.ui file from src i the open-a-file pop up, but if i try to open it, i get “Couldn’t load file /bla/bla/bla/src/SConscript.ui” :frowning:

can’t Qt3 Designer handle these files?


(SCDS_reyalP) #38

Trying to run the cons scripts from a GUI is just going to add another layer of problems.


(fretn) #39

anjuta is pretty usefull if you link it to scons, double click on an error makes it jump to the right file <3


(lovedaddy) #40

Isn’t QT3 designer mainly a QT widget designer? You could import all the cgame/game code into KDevelop (Suse should have this installed if it has QT Designer), then create yourself a new make file for it to use.

As for the .ui files not being opened, its probably because they are being treated as a ‘widget’ file - so its trying to create a QT layout from the info in there (and failing).

If you persist with KDevelop, I’d be very interested to hear how you got along