How to Compile on Linux
by Rodney Rindels - Torqued · in Torque Game Builder · 10/13/2006 (7:38 am) · 25 replies
While its been said in other places, this being the new linux forum. I wanted to start throwing down some topics that are going to be frequently asked going forwards for new users.
First you need to get a copy of the Linux download or Windows download, get them onto your linux box as effectively as you can. While not a big fan of SAMBA, it works really well for this process.
Here you need to make a decision about which compilers, which targets, and such.
If you run make you'll get some instructions if things are not already set
run make -f configure.mk
Get more instructions
Here you'll need to decide a few things about your system.
1. Which OS you'll be using "WIN32 BEOS LINUX OpenBSD FreeBSD Solaris"
For my system I have LINUX
2. Which Compiler your using. "CW6 VC6 GCC2 GCC3 GCC3.4 GCC4"
For my systems I have both GCC3 and GCC4 But Im testing GCC3 right now so I'm going to use it.
3. Build Type. "DEBUG or RELEASE"
I always attempt DEBUG releases first. So thats what I'll use here.
Redo your make command with the following based on your choices
Once this is ran, it will echo your responses back to you and show you if they are valid or not.
at this point your ready to attempt a build.
just run make
Now keep an eye on things.. you'll see some warnings about the extra line GCC likes not being on alot of files with a message like warning: no newline at end of file. This is a safe warning to ignore in most cases.
If you get through the compile, your binary will get linked and tossed into games directory at the top of the tree.
here I simply run my binary... and enjoy..
I know there are some other things to consider. If I missed any due diligence steps , please feel free to add them in, correct me, or flame me as is expected of a good linux community.
--Rod
First you need to get a copy of the Linux download or Windows download, get them onto your linux box as effectively as you can. While not a big fan of SAMBA, it works really well for this process.
cd engine/compilers/make
Here you need to make a decision about which compilers, which targets, and such.
If you run make you'll get some instructions if things are not already set
Makefile:5: *** Configuration file not defined. Please run make -f configure.mk
run make -f configure.mk
make -f configure.mk
Get more instructions
ERROR: OS variable not set or is an illegal value
ERROR: COMPILER variable not set or is an illegal value
ERROR: BUILD variable not set or is an illegal value
Current Configuration: this config is INVALID
OS:
COMPILER:
BUILD:
DIR.OBJ: out
To change the current configuration type:
make -f configure.mk {arguments, ...}
required arguments:
OS={WIN32 BEOS LINUX OpenBSD FreeBSD Solaris}
COMPILER={CW6 VC6 GCC2 GCC3 GCC3.4 GCC4}
BUILD={DEBUG RELEASE}
optional arguments:
DIR.OBJ={path to store intermediate obj files}
Note: all arguments are case sensitive.Here you'll need to decide a few things about your system.
1. Which OS you'll be using "WIN32 BEOS LINUX OpenBSD FreeBSD Solaris"
For my system I have LINUX
2. Which Compiler your using. "CW6 VC6 GCC2 GCC3 GCC3.4 GCC4"
For my systems I have both GCC3 and GCC4 But Im testing GCC3 right now so I'm going to use it.
3. Build Type. "DEBUG or RELEASE"
I always attempt DEBUG releases first. So thats what I'll use here.
Redo your make command with the following based on your choices
make -f configure.mk OS=LINUX COMPILER=GCC3 BUILD=DEBUG
Once this is ran, it will echo your responses back to you and show you if they are valid or not.
Current Configuration: this config is VALID
OS: LINUX
COMPILER: GCC3
BUILD: DEBUG
DIR.OBJ: outat this point your ready to attempt a build.
just run make
make
Now keep an eye on things.. you'll see some warnings about the extra line GCC likes not being on alot of files with a message like warning: no newline at end of file. This is a safe warning to ignore in most cases.
If you get through the compile, your binary will get linked and tossed into games directory at the top of the tree.
cd /home/rrindels/tgb/games
here I simply run my binary... and enjoy..
./TGB_DEBUG.bin
I know there are some other things to consider. If I missed any due diligence steps , please feel free to add them in, correct me, or flame me as is expected of a good linux community.
--Rod
#22
Gary (-;
12/05/2006 (11:02 am)
Have you tried making your own build of TGB from the windows 1.1.3 version? From your other forum post, I assume you have source access.Gary (-;
#23
12/05/2006 (11:02 am)
Also, what's the floating point exception, and where is it?
#24
12/06/2006 (2:08 pm)
I'll stick my miserable results in the other thread ;)
#25
AFAIK, there is nothing in the EULA that would prohibit someone like yourself from compiling a TGB binary and releasing it. The power of TGB lies in the *editors*, not in the binary (because the binary is the same from game to game).
Even so, I've seen links get removed for doing less offensive things though (just from quick snap judgements by editors). But even if that were to happen, the link could be re-added and I think it would withstand the second examination by the editors.
The real thing that they don't want freely distributed is the unlocked editors that come with the full version of TGB -- the binary is pretty much free game.
My $0.02.
--clint
01/19/2007 (8:25 pm)
Gary -- I believe you are correct. You are perfectly within the EULA to release a binary like that.AFAIK, there is nothing in the EULA that would prohibit someone like yourself from compiling a TGB binary and releasing it. The power of TGB lies in the *editors*, not in the binary (because the binary is the same from game to game).
Even so, I've seen links get removed for doing less offensive things though (just from quick snap judgements by editors). But even if that were to happen, the link could be re-added and I think it would withstand the second examination by the editors.
The real thing that they don't want freely distributed is the unlocked editors that come with the full version of TGB -- the binary is pretty much free game.
My $0.02.
--clint
Torque 3D Owner Ronny Bangsund
Torque Cheerleaders
and Gary's build crashes with a floating point exception. I've added to the
Ubuntu bug report, but it's been ignore for two months, which is the
usual problem with any bug reports I make there.
Building my own SDL package to see if it fixes anything - I've had luck with
that on previous Ubuntu bugs.